/* Inchworm — shared styles for the public site (landing, features, how-it-works,
   faq, privacy, terms, support). On-brand with the app + the "Buddy v2" mockups:
   warm paper ground, teal = control, apricot = a start was witnessed (celebrate),
   Bricolage Grotesque display + Inter body (with system fallbacks). Light + dark. */

:root {
  /* mapped names — legal pages already consume these */
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-2: #F6F2EC;
  --ink: #1C1A17;
  --muted: #7C756B;
  --faint: #A79E93;
  --line: #EDE8E1;
  --accent: #256B60;
  --accent-ink: #205C52;
  --accent-soft: #EBF3F1;
  --celebrate: #E68A28;
  --radius: 18px;
  --maxw: 720px;

  /* new tokens — marketing components + phone mockups */
  --card: #FFFFFF;
  --card-2: #F6F2EC;
  --divider: #EDE8E1;
  --bezel: #E7E1D8;
  --bezel-edge: #D8D1C6;
  --teal: #256B60;
  --teal-ink: #205C52;
  --teal-50: #EBF3F1;
  --teal-100: #DAE9E5;
  --apricot-500: #E68A28;
  --apricot-400: #EE9F45;
  --apricot-100: #FCE3C7;
  --apricot-50: #FEF4E9;
  --apricot-700: #A85E14;
  --shadow: 0 10px 30px rgba(46,134,119,0.10), 0 2px 6px rgba(28,26,23,0.04);
  --shadow-soft: 0 8px 24px rgba(46,134,119,0.10);

  --display: "Bricolage Grotesque", ui-rounded, "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1A17;
    --surface: #2E2A26;
    --surface-2: #262320;
    --ink: #FAF8F5;
    --muted: #A8A096;
    --faint: #8A8177;
    --line: #45403A;
    --accent: #6FBBAD;
    --accent-ink: #6FBBAD;
    --accent-soft: rgba(37,107,96,0.22);
    --celebrate: #EE9F45;

    --card: #2E2A26;
    --card-2: #262320;
    --divider: #45403A;
    --bezel: #3A352F;
    --bezel-edge: #4A443D;
    --teal-ink: #6FBBAD;
    --teal-50: rgba(37,107,96,0.22);
    --teal-100: rgba(37,107,96,0.34);
    --apricot-100: #653A19;
    --apricot-50: rgba(230,138,40,0.14);
    --apricot-700: #F2C79A;
    --shadow: 0 12px 34px rgba(0,0,0,0.45);
    --shadow-soft: 0 8px 24px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  font-weight: 700;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* header + nav */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1.4) blur(8px);
  z-index: 10;
}
.site-header .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7fd0c1, var(--accent));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent);
}
.site-header nav { margin-left: auto; display: flex; gap: 20px; align-items: center; font-size: 15px; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a.btn { color: #fff; }

/* layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 46px 22px 40px; }
.wide { max-width: 1080px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 8px 22px; }

.eyebrow {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 700; margin: 0 0 10px;
}
h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 8px; }
.updated { color: var(--faint); font-size: 14px; margin: 0 0 34px; }

h2 { font-size: 22px; margin: 40px 0 12px; }
h3 { font-size: 17px; margin: 26px 0 8px; }
p, li { color: var(--ink); }
.lede { font-size: 19px; color: var(--muted); }
ul, ol { padding-left: 22px; }
li { margin: 7px 0; }
strong { font-weight: 650; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 18px 0;
}
.note {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--ink);
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 34px 22px;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
}
.site-footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.site-footer nav a { color: var(--muted); }
.disclaimer { max-width: 520px; margin: 12px auto 0; line-height: 1.5; }

/* buttons + pills */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 14px 26px; border-radius: 999px; font-weight: 650; font-size: 16px;
  border: none; cursor: pointer; font-family: var(--body);
}
.btn:hover { text-decoration: none; background: var(--accent-ink); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn-sm { padding: 9px 16px; font-size: 14.5px; }
.pill { display:inline-block; font-size:13px; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:4px 12px; margin-top:14px; }

/* honeypot — off-screen, bots fill it, humans never see it */
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* App Store badge (launch-ready; "coming soon" until the store URL exists) */
.hero-badges { display: flex; justify-content: center; margin: 6px 0 4px; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 13px; padding: 9px 16px; text-decoration: none;
}
.appstore-badge:hover { text-decoration: none; opacity: 0.9; }
.appstore-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.appstore-badge svg { width: 22px; height: 22px; fill: #fff; flex: none; }
.appstore-badge .ab-t { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-badge .ab-t small { font-size: 10px; letter-spacing: 0.02em; opacity: 0.92; }
.appstore-badge .ab-t b { font-size: 18px; font-weight: 600; font-family: var(--display); letter-spacing: -0.01em; }
.appstore-badge.coming { cursor: default; }

/* landing hero */
.hero { text-align: center; padding: 56px 0 20px; }
.hero .orb {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 30px;
  background: radial-gradient(circle at 36% 30%, #8fd8ca 0%, var(--accent) 62%, var(--accent-ink) 100%);
  box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero h1 { font-size: clamp(34px, 7vw, 60px); }
.hero .lede { max-width: 34ch; margin: 14px auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.hero .phone { margin: 24px auto 0; }

/* the loop (four steps) */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 30px 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px;
  font-family: var(--display);
}
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- section header ---------- */
.sec-head { max-width: 64ch; margin: 60px auto 30px; text-align: center; }
.sec-ey { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-ink); }
.sec-ey .num { color: var(--faint); margin-right: 8px; font-variant-numeric: tabular-nums; }
.sec-head h2 { font-size: clamp(23px, 3.4vw, 30px); margin: 10px 0 0; }
.sec-sub { color: var(--muted); font-size: 16px; margin: 12px auto 0; max-width: 54ch; }

/* ---------- feature block ---------- */
.feature {
  display: grid; grid-template-columns: 1fr minmax(260px, 320px);
  gap: 40px; align-items: center; max-width: 1000px; margin: 0 auto; padding: 44px 0;
}
.feature.rev { grid-template-columns: minmax(260px, 320px) 1fr; }
.feature.rev .copy { order: 2; }
.feature.rev .art { order: 1; }
.feature .art { display: flex; justify-content: center; }
.feature .sec-ey { text-align: left; }
.feature h2 { margin: 10px 0 12px; font-size: clamp(23px, 3.2vw, 30px); }
.feature p { color: var(--muted); font-size: 16.5px; }
.feature .more { display: inline-block; margin-top: 6px; font-weight: 600; }

/* ---------- promise + cta band ---------- */
.promise {
  max-width: 620px; margin: 30px auto; text-align: center;
  background: var(--apricot-50); border-radius: 22px; padding: 28px 26px;
}
.promise .display { font-size: 21px; }
.promise p { color: var(--muted); margin: 8px 0 0; }
.cta-band {
  max-width: 760px; margin: 60px auto 0; text-align: center;
  background: var(--card); border-radius: 24px; padding: 36px 26px; box-shadow: var(--shadow-soft);
}
.cta-band h2 { margin: 0; font-size: clamp(22px, 3.2vw, 28px); }
.cta-band p { color: var(--muted); margin: 10px 0 0; }

/* ---------- waitlist form ---------- */
.waitlist { display: flex; gap: 10px; max-width: 460px; margin: 20px auto 0; flex-wrap: wrap; justify-content: center; }
.waitlist input[type=email] {
  flex: 1; min-width: 220px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 16px; font-family: var(--body);
}
.waitlist input[type=email]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field-ok {
  display: none; margin: 18px auto 0; max-width: 460px;
  background: var(--apricot-50); border-radius: 16px; padding: 14px 18px; color: var(--ink); font-size: 15px;
}
.field-ok.show { display: block; }
.form-fine { font-size: 12.5px; color: var(--faint); margin-top: 12px; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 680px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; font-size: 17px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); margin: 0 0 16px; font-size: 16px; }

/* ---------- multi-phone stage (buddy showcase) ---------- */
.stage { display: flex; flex-wrap: wrap; gap: 30px 34px; justify-content: center; align-items: flex-start; margin-top: 12px; }
.stage .col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.state-label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }
.state-label span { color: var(--faint); font-weight: 500; }

/* ---------- phone mockup (ported from the app tokens) ---------- */
.phone {
  width: 300px; background: var(--bezel); border: 1px solid var(--bezel-edge);
  border-radius: 46px; padding: 11px; box-shadow: var(--shadow);
}
.screen {
  position: relative; border-radius: 36px; overflow: hidden; background: var(--bg);
  min-height: 604px; display: flex; flex-direction: column;
}
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.statusbar .r { display: flex; gap: 5px; align-items: center; opacity: 0.85; }
.notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 78px; height: 20px; background: rgba(0,0,0,0.28); border-radius: 999px; z-index: 3; }
@media (prefers-color-scheme: dark) { .notch { background: rgba(0,0,0,0.55); } }

.app-body { flex: 1; display: flex; flex-direction: column; padding: 8px 18px 20px; }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.starter-chip { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--apricot-100); color: var(--apricot-700); }
.title-d { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; max-width: 22ch; color: var(--ink); }
.sub-m { color: var(--muted); font-size: 15px; }
.quote-card { background: var(--card); border-radius: 16px; padding: 11px 15px; font-size: 15px; color: var(--ink); box-shadow: var(--shadow-soft); max-width: 24ch; }

.emoji-row { display: flex; gap: 12px; justify-content: center; }
.tile {
  width: 62px; height: 62px; border-radius: 22px; background: var(--card);
  display: grid; place-items: center; font-size: 30px; border: none; box-shadow: var(--shadow-soft);
}
.ghost { background: none; border: none; color: var(--teal-ink); font-weight: 600; font-size: 14.5px; font-family: var(--body); cursor: default; padding: 8px; }

/* in-phone button (namespaced so it never clashes with the site .btn pill) */
.s-btn { width: 100%; border: none; border-radius: 16px; padding: 14px; font-size: 15.5px; font-weight: 600; font-family: var(--body); background: var(--teal); color: #fff; }
.app-body .footer-slot { padding-top: 10px; }

/* session timer render */
.timer-ring { width: 152px; height: 152px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--teal) 32%, var(--teal-50) 0); }
.timer-ring .inner { width: 120px; height: 120px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow-soft); }
.timer-num { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); }

/* lock screen (buddy ping) */
.lock { background:
    radial-gradient(120% 80% at 50% 0%, rgba(230,138,40,0.10), transparent 60%),
    linear-gradient(180deg, #2b2622 0%, #201c19 100%);
  color: #fff; }
.lock .statusbar { color: rgba(255,255,255,0.92); }
.lock-time { text-align: center; margin-top: 26px; }
.lock-time .t { font-family: var(--display); font-size: 66px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.lock-time .d { font-size: 14px; opacity: 0.8; margin-top: 4px; }
.banners { margin-top: 30px; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 11px; }
.banner {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(250,248,245,0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-radius: 20px; padding: 12px 13px; color: #1C1A17; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.banner .av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 17px; background: var(--apricot-100); color: var(--apricot-700); }
.banner .bd { flex: 1; min-width: 0; }
.banner .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.banner .who { font-weight: 700; font-size: 15px; }
.banner .ago { font-size: 12px; color: #8a8177; flex: none; }
.banner .app { font-size: 11px; color: #8a8177; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1px; }
.banner .msg { font-size: 14.5px; line-height: 1.34; margin-top: 3px; color: #1C1A17; }
.banner .msg .quo { color: #4a443d; }
.lock-foot { margin-top: auto; padding: 14px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,0.6); }

/* win / receipt render */
.win { background: radial-gradient(120% 60% at 50% 12%, var(--apricot-50), transparent 60%); }
.win-emoji { font-size: 40px; }
.win-title { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.win-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sharecard { width: 100%; background: var(--card); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); text-align: left; }
.sc-big { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); }
.sc-row { display: flex; gap: 18px; margin-top: 12px; }
.sc-stat .v { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--apricot-500); }
.sc-stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.receipt-slim { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--apricot-50); border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow-soft); }
.receipt-slim .rchip { width: 42px; height: 42px; border-radius: 50%; background: var(--apricot-100); display: grid; place-items: center; font-size: 21px; flex: none; }
.receipt-slim .ln { font-size: 15px; color: var(--ink); }

/* ---------- scroll-reveal motion (JS opt-in, reduced-motion safe) ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
  html.js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .feature, .feature.rev { grid-template-columns: 1fr; }
  .feature.rev .copy, .feature.rev .art { order: 0; }
  .feature .sec-ey { text-align: center; }
  .feature .copy { text-align: center; }
}
@media (max-width: 600px) {
  .site-header .inner { flex-wrap: wrap; justify-content: center; gap: 10px 16px; padding: 12px 16px; }
  .site-header nav { margin-left: 0; width: 100%; justify-content: center; flex-wrap: wrap; gap: 12px 16px; font-size: 14px; }
}
@media (max-width: 520px) {
  .phone { width: 100%; max-width: 320px; }
}
