/* ==========================================================================
   Glimmer Health — site styles
   Palette: Dracula PRO, desaturated ~45% (see uploads/design-notes.md)
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:          #16151d;
  --bg-alt:      #1b1a24;
  --surface:     #22212c;
  --surface-2:   #2a2938;
  --border:      #454158;

  /* Text */
  --text:        #f8f8f2;
  --text-muted:  #b8b4c8;
  --text-dim:    #7970a9;

  /* Accents */
  --accent:       #a296dc;
  --accent-light: #c7bef0;
  --accent-deep:  #7970a9;
  --cyan:         #a3e9dd;
  --green:        #9ada95;

  /* Layout */
  --maxw:      1120px;
  --maxw-prose: 920px;
  --gutter:    clamp(20px, 4vw, 32px);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utilities ------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  transition: transform .15s ease;
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--bg); }

.shell {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--prose { max-width: var(--maxw-prose); }
.shell--narrow { max-width: 760px; }

.disp {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.tnum { font-variant-numeric: tabular-nums; }

/* Brand mark ------------------------------------------------------------ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}
.brand:hover { color: var(--text); }

.blob {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-deep));
  border-radius: 44% 56% 58% 42% / 56% 44% 56% 44%;
}

/* Header / nav ---------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 10;
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}
/* :not(.btn) so these never win over button colours on specificity */
.nav a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav a:not(.btn):hover { color: var(--text); }

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--light {
  background: var(--text);
  color: var(--bg);
  padding: 15px 26px;
  border-radius: 14px;
}
.btn--light:hover {
  color: var(--bg);
  background: #fff;
  box-shadow: 0 10px 30px rgba(199, 190, 240, .18);
}

/* Matches the in-app primary button ("Log with Coach"): accent on dark ink */
.btn--pill {
  background: var(--accent);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 999px;
}
.btn--pill:hover {
  background: var(--accent-light);
  color: var(--surface);
}

.btn--text {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 15px 4px;
}

.btn svg { flex-shrink: 0; }

/* Eyebrow badge --------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  margin-bottom: 26px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* Hero ------------------------------------------------------------------ */

.hero .shell {
  padding-block: clamp(32px, 6vw, 64px) 40px;
  display: grid;
  gap: clamp(40px, 6vw, 60px);
  align-items: center;
}

.hero__title {
  font-size: clamp(34px, 6.2vw, 52px);
  line-height: 1.06;
  margin-bottom: 22px;
}

.hero__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Split sections -------------------------------------------------------- */

.split .shell {
  padding-block: clamp(56px, 9vw, 100px);
  display: grid;
  gap: clamp(40px, 6vw, 60px);
  align-items: center;
}

.split__title {
  font-size: clamp(28px, 4.6vw, 38px);
  line-height: 1.14;
  margin-bottom: 20px;
}

.split__body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}
.split__body + .split__body { margin-top: 20px; }

/* Trust bar ------------------------------------------------------------- */

.trustbar {
  border-top: 1px solid var(--surface-2);
  border-bottom: 1px solid var(--surface-2);
  margin-top: 20px;
}
.trustbar ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  flex-wrap: wrap;
  padding-block: 22px;
}
.trustbar li {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

/* Privacy pillars ------------------------------------------------------- */

.pillars {
  background: var(--bg-alt);
  padding-block: clamp(56px, 9vw, 100px);
}

.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(28px, 4.6vw, 38px);
  margin-bottom: 16px;
}
.section-head p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 28px;
}
.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 9px;
}
.card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 18px;
}

.pillars__more { text-align: center; margin-top: 40px; }
.pillars__more a { font-size: 15px; font-weight: 600; }

/* Final CTA ------------------------------------------------------------- */

.cta .shell {
  padding-block: clamp(56px, 9vw, 100px);
  text-align: center;
}
.cta h2 {
  font-size: clamp(30px, 5.2vw, 42px);
  margin-bottom: 20px;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--surface-2);
  padding: 32px var(--gutter);
  text-align: center;
}
.site-footer p { font-size: 13px; color: var(--text-dim); }
.site-footer nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
}

/* ==========================================================================
   Phone mockups
   ========================================================================== */

.mock {
  justify-self: center;
  width: min(300px, 100%);
  background: var(--surface);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .5);
}
.mock--tilt-r { transform: rotate(2deg); }
.mock--tilt-l { transform: rotate(-2deg); }

@media (max-width: 640px) {
  .mock--tilt-r, .mock--tilt-l { transform: none; }
}

.mock__notch {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock__notch::after {
  content: "";
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
}

.mock__head { padding: 6px 18px 4px; }
.mock__greeting { font-size: 19px; font-weight: 700; }
.mock__streak {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-dim);
}
.mock__streak::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.mock__rings {
  margin: 12px 18px 0;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  justify-content: space-around;
}

.ring { position: relative; width: 86px; height: 86px; }
.ring svg { transform: rotate(-90deg); }
.ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.ring__value { font-size: 16px; font-weight: 700; }
.ring__unit { font-size: 8px; color: var(--text-dim); }

.mock__stat {
  margin: 10px 18px 0;
  background: var(--surface-2);
  border-radius: 16px;
  padding: 13px 14px;
}
.mock__stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}
.mock__stat-row .tnum { font-size: 11px; font-weight: 400; color: var(--text-dim); }
.mock__stat-row .tnum b { color: var(--text); font-weight: 600; }

.bar {
  height: 7px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--green);
}

.mock__cta {
  margin: 10px 18px 20px;
  background: var(--accent);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  border-radius: 13px;
}

/* Coach chat mock */
.mock__chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 12px;
  border-bottom: 1px solid var(--surface-2);
  font-size: 13px;
  font-weight: 700;
}
.mock__avatar {
  width: 26px;
  height: 26px;
  background: var(--accent-deep);
  border-radius: 46% 54% 52% 48% / 54% 46% 56% 44%;
}
.mock__thread {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble--user {
  align-self: flex-end;
  max-width: 80%;
  background: var(--accent);
  color: var(--surface);
  border-radius: 13px 13px 3px 13px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 500;
}
.bubble--card {
  background: var(--surface-2);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bubble--card .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.bubble--card .row .tnum { color: var(--accent); }
.bubble--card hr { height: 1px; background: var(--border); border: 0; margin: 0; }
.bubble--card .confirm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
}
.bubble--card .confirm::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

/* Awards mock */
.mock__title { padding: 2px 18px 4px; font-size: 16px; font-weight: 700; }
.mock__awards {
  padding: 14px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.award {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.award--featured {
  background: linear-gradient(160deg, #2a2938 0%, #322f47 100%);
  border: 1px solid var(--border);
}
.award__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.award--featured .award__icon {
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-light), var(--accent-deep));
}
.award__name { font-size: 12px; font-weight: 600; }
.award__meta { font-size: 10px; color: var(--text-dim); margin-top: 1px; }

.badges {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 12px 15px 14px;
}
.badges__title { margin-bottom: 10px; font-size: 11px; font-weight: 600; }
.badges ul { display: flex; gap: 10px; }
.badges li {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  background: var(--surface);
}
.badges li:nth-child(1) { background: linear-gradient(145deg, var(--accent-light), var(--accent)); }
.badges li:nth-child(2) { background: linear-gradient(145deg, #e0d8ff, var(--accent-light)); }
.badges li.is-locked { border: 1.5px dashed var(--border); }

/* ==========================================================================
   Privacy / how-it-works page
   ========================================================================== */

.page-hero { padding-block: 40px 0; }
.page-hero h1 {
  font-size: clamp(32px, 5.6vw, 44px);
  margin-bottom: 20px;
}
.page-hero__lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: clamp(36px, 6vw, 56px);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--surface-2);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: clamp(36px, 6vw, 56px);
}
.detail {
  background: var(--surface);
  padding: 26px 28px;
  display: flex;
  gap: 20px;
}
.detail__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.detail h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.detail p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.endcap {
  background: var(--surface-2);
  border-radius: var(--radius-card);
  padding: 32px;
  text-align: center;
  margin-bottom: 100px;
}
.endcap p {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 20px;
}

.breadcrumbs {
  font-size: 13px;
  color: var(--text-dim);
  padding-block: 4px 0;
}
.breadcrumbs ol {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--border); }

/* 404 ------------------------------------------------------------------- */

.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--gutter);
}
.notfound h1 { font-size: clamp(32px, 6vw, 44px); margin-bottom: 16px; }
.notfound p { color: var(--text-muted); margin-bottom: 28px; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .hero .shell,
  .split .shell {
    grid-template-columns: 1fr 1fr;
  }
  /* Coach section: mock on the left, copy on the right */
  .split--reverse .split__copy { order: 2; }
  .split--reverse .mock { order: 1; }
}

@media (max-width: 560px) {
  /* Brand on its own row, nav centred beneath it — avoids horizontal overflow */
  .site-header .shell {
    justify-content: center;
    gap: 14px;
    padding-block: 22px;
  }
  .nav {
    width: 100%;
    justify-content: center;
    gap: 18px;
  }
  .nav .btn--pill { padding: 10px 16px; }
  .hero__actions { gap: 8px; }
  .hero__actions .btn--light { width: 100%; }
  .detail { padding: 22px 20px; gap: 14px; }
}

@media print {
  .mock, .site-header .btn, .cta { display: none; }
  body { background: #fff; color: #000; }
}
