/* ============================================================
   CLEAR CONNECT — Feature Walkthrough
   Starry-night lottie backdrop, lightened, with legible glass cards.
   ============================================================ */
.cc-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Mono', monospace;
  color: #f3effd;
  background: #2a1a52; /* fallback under the lottie */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Backdrop layers ── */
.cc-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.cc-bg lottie-player {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  display: block;
}
/* Lighten the deep-purple lofi space: a lavender wash brightens the darks. */
.cc-bg-lighten {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(214, 196, 255, 0.40) 0%, transparent 55%),
    linear-gradient(180deg, rgba(167, 139, 250, 0.22) 0%, rgba(124, 58, 237, 0.10) 100%);
  mix-blend-mode: screen;
}
/* Subtle readability scrim so light text always has contrast. */
.cc-bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 12, 45, 0.30) 0%, rgba(20, 12, 45, 0.45) 100%);
}

/* ── Back button ── */
.cc-home-dot {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: calc(14px + env(safe-area-inset-left, 0px));
  z-index: 20;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.3rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* ── Content shell ── */
.cc-container {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(78px + env(safe-area-inset-top, 0px)) 18px calc(40px + env(safe-area-inset-bottom, 0px));
}

/* ── Hero ── */
.cc-hero { text-align: center; margin-bottom: 26px; }
.cc-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #d6c4ff;
  margin-bottom: 10px;
}
.cc-title {
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -1px;
  line-height: 1.02;
  text-shadow: 0 2px 24px rgba(124, 58, 237, 0.55);
}
.cc-title-accent {
  background: linear-gradient(135deg, #c4b5fd 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cc-tagline {
  margin: 12px auto 16px;
  max-width: 46ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e6dffb;
}
.cc-privacy-pill {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #000000;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.4);
  padding: 8px 16px;
  border-radius: 100px;
}

/* ── Section scaffolding ── */
.cc-section { margin-bottom: 22px; }
.cc-section-title {
  font-size: 0.78rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #c4b5fd;
  margin: 0 0 12px 4px;
  font-weight: 700;
}

.cc-card {
  background: rgba(38, 26, 72, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(10, 6, 30, 0.4);
}

/* ── Metric chips ── */
.cc-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(124, 58, 237, 0.30);
  border: 1px solid rgba(196, 181, 253, 0.4);
  padding: 9px 14px;
  border-radius: 100px;
}
.cc-chip-emoji { font-size: 1.05rem; }

/* ── Steps (how it works) ── */
.cc-how-layout {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 16px;
  align-items: start;
}
.cc-how-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(196, 181, 253, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cc-fitness-illustration {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
}
.cc-steps { display: flex; flex-direction: column; gap: 10px; }
.cc-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  background: rgba(38, 26, 72, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-left: 3px solid #6ee7b7;
  border-radius: 16px;
  padding: 14px 16px;
}
.cc-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #2a1a52;
  background: linear-gradient(135deg, #c4b5fd, #6ee7b7);
}
.cc-step-body strong { display: block; font-size: 0.95rem; margin-bottom: 3px; color: #fff; }
.cc-step-body span { font-size: 0.84rem; color: #d8d0f0; line-height: 1.45; }

/* ── Device groups ── */
.cc-devices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-device-group { }
.cc-device-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin: 0 0 10px;
  color: #fff;
}
.cc-platform-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
}
.cc-badge--ios { background: rgba(147, 197, 253, 0.25); border: 1px solid rgba(147, 197, 253, 0.5); color: #dbeafe; }
.cc-badge--android { background: rgba(110, 231, 183, 0.22); border: 1px solid rgba(110, 231, 183, 0.5); color: #d1fae5; }
.cc-badge--both { background: rgba(196, 181, 253, 0.25); border: 1px solid rgba(196, 181, 253, 0.5); color: #ede9fe; }
.cc-device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cc-device-list li {
  font-size: 0.82rem;
  color: #e6dffb;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(196, 181, 253, 0.14);
  border-radius: 10px;
}
.cc-device-list li strong { color: #fff; }

.cc-both { margin-top: 12px; }

/* ── Note ── */
.cc-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #fef9c3;
}
.cc-note-icon { font-size: 1.2rem; flex-shrink: 0; }
.cc-note--info {
  background: rgba(147, 197, 253, 0.14);
  border-color: rgba(147, 197, 253, 0.35);
  color: #e0f2fe;
}

/* HealthKit / Health Connect disclosure — platform-specific blocks */
.cc-health-disclosure {
  border-color: rgba(34, 197, 94, 0.35);
}

.cc-health-disclosure-heading {
  margin: 0 0 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #bbf7d0;
}

.cc-health-disclosure-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(196, 181, 253, 0.2);
  font-size: 0.84rem;
  line-height: 1.5;
  color: #e6dffb;
}

.cc-health-disclosure-block p {
  margin: 0 0 10px;
}

.cc-health-disclosure-block p:last-child {
  margin-bottom: 0;
}

.cc-health-disclosure-policy {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(196, 181, 253, 0.2);
  font-size: 0.84rem;
}

.cc-health-disclosure-policy a {
  color: #93c5fd;
  font-weight: 700;
}

html.capacitor-ios .cc-health-disclosure--android,
html.capacitor-ios .cc-health-disclosure--web {
  display: none;
}

html.capacitor-android .cc-health-disclosure--ios,
html.capacitor-android .cc-health-disclosure--web {
  display: none;
}

html:not(.capacitor-ios):not(.capacitor-android) .cc-health-disclosure--ios,
html:not(.capacitor-ios):not(.capacitor-android) .cc-health-disclosure--android {
  display: none;
}

.cc-lead {
  margin: 14px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #e6dffb;
}
.cc-muted {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #c9bff0;
}
.cc-card--muted {
  background: rgba(30, 20, 58, 0.45);
  border-color: rgba(196, 181, 253, 0.14);
}

.cc-metric-defs {
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cc-metric-def {
  padding-top: 12px;
  border-top: 1px solid rgba(196, 181, 253, 0.16);
}
.cc-metric-def:first-of-type {
  border-top: none;
  padding-top: 0;
}
.cc-metric-def dt {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.cc-metric-def dd {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.48;
  color: #d8d0f0;
}

.cc-bullet-list,
.cc-flow-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #e6dffb;
}
.cc-bullet-list li,
.cc-flow-list li {
  margin-bottom: 8px;
}
.cc-bullet-list li:last-child,
.cc-flow-list li:last-child {
  margin-bottom: 0;
}
.cc-flow-list {
  list-style: decimal;
}

.cc-disclaimer {
  margin-top: 12px;
  padding: 14px 16px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 14px;
}
.cc-disclaimer strong {
  color: #fef3c7;
}

/* ── CTA ── */
.cc-cta-wrap { text-align: center; margin-top: 28px; }
.cc-cta {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  color: #2a1a52;
  background: linear-gradient(135deg, #c4b5fd 0%, #6ee7b7 100%);
  box-shadow: 0 10px 34px rgba(124, 58, 237, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cc-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124, 58, 237, 0.6); }
.cc-cta-sub { margin: 12px 0 0; font-size: 0.74rem; color: #c9bff0; }
.cc-cta-sub a { color: #d6c4ff; }

/* Web store CTA vs in-app (requires platform-flags.js in <head>) */
.cc-cta--native { display: none; }
html.capacitor-app .cc-cta--web { display: none; }
html.capacitor-app .cc-cta--native { display: inline-block; }

@media (max-width: 480px) {
  .cc-devices { grid-template-columns: 1fr; }
  .cc-how-layout {
    grid-template-columns: 1fr;
  }
  .cc-how-illustration {
    max-width: 220px;
    margin: 0 auto 4px;
  }
}
