/* Aura Kids website: same "calm premium" system as the Android app.
   Paper background, one evergreen accent, Plus Jakarta Sans for reading, Baloo 2 for kid moments. */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --sunk: #efeee9;
  --line: #e6e4dd;
  --fg: #15201e;
  --muted: #6b7471;
  --faint: #9ea5a2;
  --ink: #1e5148;
  --ink-soft: #e4eeea;
  --ink-deep: #123a33;
  --sun: #ffc34d;
  --coral: #e8705c;
  --leaf: #3fa772;
  --sky: #d3ecff;
  --kid-text: #2e2414;

  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "Noto Sans Devanagari", sans-serif;
  --f-kid: "Baloo 2", "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(21, 32, 30, .04), 0 12px 32px -12px rgba(21, 32, 30, .12);
  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* Component display rules must never beat the hidden attribute (tab panels, form notices). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); }
/* Inline icons fill their box; specific components set the box size. */
[data-icon] { display: inline-flex; flex: none; }
[data-icon] svg { width: 100%; height: 100%; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 60ch; }
.overline { font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 48px; }
.center { text-align: center; margin-inline: auto; justify-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 26px; border-radius: 18px; border: 0; cursor: pointer;
  font: 700 1rem var(--f-body); text-decoration: none; transition: transform .15s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-deep); }
.btn-ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 20px; height: 20px; }

/* ---------- Nav ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: rgba(246, 245, 241, .92);
}
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(246, 245, 241, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--fg); text-decoration: none; letter-spacing: -0.02em; }
.brand .mark { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 12px; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--fg); background: var(--sunk); }
.nav .btn { height: 44px; padding: 0 18px; border-radius: 14px; font-size: .92rem; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.menu-btn svg { margin: auto; }
@media (max-width: 900px) {
  .nav-links, .nav .btn-primary { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .nav.open .nav-links {
    display: grid; position: absolute; left: 0; right: 0; top: 72px; padding: 12px 20px 20px; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { padding: 14px 12px; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 96px);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 40%; height: 120%;
  background: radial-gradient(closest-side, rgba(211, 236, 255, .9), transparent 70%),
              radial-gradient(closest-side at 70% 70%, rgba(255, 228, 176, .7), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--ink); }
.hero .lede { margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--fg); }
.chip svg { width: 16px; height: 16px; color: var(--ink); }
.hero-buddies { display: flex; margin-top: 36px; align-items: center; gap: 14px; color: var(--muted); font-size: .92rem; }
.hero-buddies .stack { display: flex; }
.hero-buddies .stack svg { width: 44px; height: 44px; margin-right: -12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone-col { order: 2; }
}

/* ---------- Interactive phone ---------- */
.phone-stage { display: grid; justify-items: center; gap: 16px; }
.phone {
  width: min(340px, 100%); aspect-ratio: 9 / 18.5; max-width: 100%;
  border-radius: 46px; background: #121816; padding: 11px; box-shadow: 0 40px 80px -30px rgba(18, 58, 51, .45), 0 0 0 1px rgba(255,255,255,.05) inset;
}
.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.screen.kid { background: linear-gradient(180deg, #d3ecff, #eef6ff 55%, #fff6e6); font-family: var(--f-kid); color: var(--kid-text); }
.statusbar { display: flex; justify-content: space-between; padding: 14px 24px 6px; font: 600 12px var(--f-body); color: var(--fg); }
.mode-toggle { display: inline-flex; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.mode-toggle button { border: 0; background: none; padding: 9px 16px; border-radius: 12px; font: 700 .88rem var(--f-body); color: var(--muted); cursor: pointer; }
.mode-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.stage-hint { font-size: .85rem; color: var(--muted); text-align: center; max-width: 300px; }

.ps { padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; overflow: hidden; }
.ps-greet { font-size: 12px; color: var(--muted); }
.ps-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-top: -8px; }
.card { background: var(--surface); border-radius: 22px; padding: 14px; display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.kid-name { font-weight: 700; font-size: 15px; }
.small { font-size: 12px; color: var(--muted); }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring circle { fill: none; transition: stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1); }
.mini-btn { height: 42px; border-radius: 14px; background: var(--ink); color: #fff; border: 0; font: 700 13px var(--f-body); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mini-btn:hover { background: var(--ink-deep); }
.mini-ghost { height: 42px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); font: 700 13px var(--f-body); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mini-ghost svg { width: 16px; height: 16px; }

.ks { padding: 6px 16px 14px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.ks-head { display: flex; align-items: center; gap: 10px; }
.ks-head .av { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 2px; cursor: pointer; border: 0; }
.ks-head .hi { font-weight: 800; font-size: 21px; flex: 1; }
.star-pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; padding: 4px 10px 4px 8px; font-weight: 800; font-size: 15px; }
.star-pill svg { width: 18px; height: 18px; color: var(--sun); }
.ks-ring { display: grid; justify-items: center; margin: 4px 0 4px; }
.ks-ring .num { font-weight: 800; font-size: 42px; }
.ks-ring .lbl { font-size: 13px; color: #7a6b55; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: rgba(255,255,255,.78); border: 0; border-radius: 22px; padding: 12px 6px 10px; display: grid; justify-items: center; gap: 7px; cursor: pointer; font-family: var(--f-kid); color: var(--kid-text); transition: transform .15s; }
.tile:active { transform: scale(.95); }
.tile .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.tile .ico svg { width: 24px; height: 24px; }
.tile .pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #bfe0fa; }
.tile.resting .ico { opacity: .4; }
.tile.resting .pill { background: #ede7f6; color: #7e6bb5; }
.kbar { margin-top: auto; display: flex; gap: 6px; background: #fff; border-radius: 20px; padding: 5px; }
.kbar button { flex: 1; height: 40px; border: 0; background: none; border-radius: 14px; font: 700 13px var(--f-kid); color: var(--kid-text); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.kbar button:hover { background: #f4f1ea; }
.kbar svg { width: 16px; height: 16px; }

.rest { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: 10px; padding: 18px; }
.rest h4 { margin: 0; font-size: 22px; line-height: 1.1; }
.rest p { font-size: 13px; color: #7a6b55; }
.kbtn { width: 100%; height: 46px; border: 0; border-radius: 16px; font: 800 15px var(--f-kid); cursor: pointer; color: var(--kid-text); }
.kbtn.sun { background: var(--sun); }
.kbtn.white { background: #fff; }

.pinbox { flex: 1; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 16px; font-family: var(--f-body); color: var(--fg); }
.pinbox h4 { margin: 0; font-size: 18px; }
.dots { display: flex; gap: 10px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dots i.f { background: var(--fg); }
.pad { display: grid; grid-template-columns: repeat(3, 52px); gap: 10px; }
.pad button { height: 52px; border-radius: 50%; border: 0; background: #fff; font: 500 20px var(--f-body); cursor: pointer; color: var(--fg); }
.pad button:active { background: var(--ink-soft); }
.grant { display: flex; gap: 8px; width: 100%; }
.grant button { flex: 1; border: 0; background: #fff; border-radius: 18px; padding: 12px 0; font: 800 22px var(--f-kid); color: var(--kid-text); cursor: pointer; }

.toast { position: absolute; left: 14px; right: 14px; bottom: 16px; background: var(--fg); color: #fff; padding: 10px 14px; border-radius: 14px; font: 600 12.5px var(--f-body); text-align: center; animation: pop .3s ease-out; z-index: 4; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.p-card { background: var(--surface); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 12px; align-content: start; }
.p-card .num { font: 800 .8rem var(--f-body); letter-spacing: .1em; color: var(--coral); }
.p-card p { color: var(--muted); }
.reach { grid-column: 1 / -1; background: var(--fg); color: #fff; border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
.reach .lede { color: rgba(255,255,255,.7); }
.reach-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.reach-app { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 14px; display: grid; gap: 8px; cursor: pointer; text-align: left; color: #fff; font: inherit; transition: background .2s, border-color .2s; }
.reach-app:hover { background: rgba(255,255,255,.1); }
.reach-app .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.reach-app .ico svg { width: 22px; height: 22px; }
.reach-app b { font-size: .95rem; }
.reach-app .st { font-size: .8rem; color: rgba(255,255,255,.6); }
.reach-app[aria-pressed="true"] { background: rgba(232, 112, 92, .16); border-color: rgba(232,112,92,.6); }
.reach-app[aria-pressed="true"] .st { color: #ffb3a6; }
.reach-toggle { margin-top: 20px; }
.reach-toggle .btn { height: 48px; }
@media (max-width: 820px) {
  .problem-grid { grid-template-columns: 1fr; }
  .reach { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .reach-apps { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Solutions table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
table.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .95rem; }
.compare th, .compare td { padding: 18px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font-size: .82rem; font-weight: 700; color: var(--muted); vertical-align: bottom; }
.compare thead th.us { color: var(--ink); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td.us { background: var(--ink-soft); }
.compare thead th.us { background: var(--ink-soft); border-radius: 18px 18px 0 0; }
.yes, .no, .part { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.yes { background: #dcf1e5; color: #1e7a4c; }
.no { background: #f3eeee; color: #b4645a; }
.part { background: #fff1d6; color: #9a6512; }
.yes svg, .no svg, .part svg { width: 16px; height: 16px; }
.compare .rowlabel b { display: block; }
.compare .rowlabel span { color: var(--muted); font-size: .85rem; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; color: var(--muted); font-size: .88rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .yes, .legend .no, .legend .part { width: 22px; height: 22px; }
.legend svg { width: 13px; height: 13px; }

/* ---------- Why ---------- */
.tabs { display: inline-flex; padding: 5px; border-radius: 18px; background: var(--sunk); margin-bottom: 32px; }
.tabs button { border: 0; background: none; padding: 12px 22px; border-radius: 14px; font: 700 .95rem var(--f-body); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why-card { background: var(--surface); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 12px; align-content: start; transition: transform .2s; }
.why-card:hover { transform: translateY(-3px); }
.why-card .ico { width: 48px; height: 48px; border-radius: 16px; background: var(--ink-soft); color: var(--ink); display: grid; place-items: center; }
.why-card .ico svg { width: 24px; height: 24px; }
.why-card p { color: var(--muted); font-size: .98rem; }
.why-card.kid { font-family: var(--f-kid); }
.why-card.kid h3 { font-family: var(--f-kid); font-size: 1.35rem; letter-spacing: 0; }
.why-card.kid .ico { background: #fff3d6; color: #b77b10; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- How it works ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 20px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: background .2s, border-color .2s; }
.step:hover { background: rgba(255,255,255,.6); }
.step[aria-selected="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.step .n { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sunk); font-weight: 800; font-size: 1.2rem; color: var(--muted); }
.step[aria-selected="true"] .n { background: var(--ink); color: #fff; }
.step p { color: var(--muted); font-size: .96rem; margin-top: 4px; }
.how-visual { background: linear-gradient(160deg, var(--ink-soft), #fff6e6); border-radius: 36px; padding: clamp(24px, 4vw, 44px); min-height: 440px; display: grid; place-items: center; }
.how-panel { width: 100%; max-width: 360px; display: grid; gap: 12px; animation: pop .35s ease-out; }
.how-panel .card { box-shadow: var(--shadow); }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }

/* ---------- Buddies ---------- */
.buddies { background: linear-gradient(180deg, #d3ecff 0%, #eef6ff 50%, #fff6e6 100%); font-family: var(--f-kid); color: var(--kid-text); }
.buddies h2 { font-family: var(--f-kid); letter-spacing: 0; font-weight: 800; }
.buddy-stage { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.buddy-big { justify-self: center; width: min(320px, 80vw); }
.buddy-big svg { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(46, 36, 20, .14)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.buddy-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 420px; margin-top: 24px; }
.buddy-picker button { aspect-ratio: 1; border-radius: 50%; border: 4px solid transparent; background: none; padding: 4px; cursor: pointer; transition: transform .15s; }
.buddy-picker button:hover { transform: scale(1.05); }
.buddy-picker button[aria-pressed="true"] { border-color: var(--kid-text); }
.buddy-name { font-size: 1.4rem; font-weight: 800; margin-top: 18px; }
.buddy-line { color: #7a6b55; font-size: 1.05rem; }
@media (max-width: 800px) { .buddy-stage { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band { background: var(--ink-deep); color: #fff; border-radius: 36px; padding: clamp(32px, 6vw, 72px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.privacy-band h2 { color: #fff; }
.privacy-band .lede { color: rgba(255,255,255,.72); margin-top: 16px; }
.privacy-list { display: grid; gap: 12px; }
.privacy-list div { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.06); border-radius: 18px; padding: 16px 18px; }
.privacy-list svg { width: 22px; height: 22px; color: #8fd6b3; flex: none; margin-top: 2px; }
.privacy-list b { display: block; }
.privacy-list span { color: rgba(255,255,255,.65); font-size: .92rem; }
@media (max-width: 860px) { .privacy-band { grid-template-columns: 1fr; } }

/* ---------- Languages ---------- */
.lang-demo { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px); display: grid; gap: 20px; box-shadow: var(--shadow); }
.lang-line { font: 800 clamp(1.8rem, 4vw, 2.8rem)/1.2 var(--f-kid); color: var(--kid-text); min-height: 1.25em; }
.lang-sub { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border-radius: var(--r-md); padding: 4px 24px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; font-weight: 400; color: var(--ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); }

/* ---------- CTA + footer ---------- */
.cta-band { text-align: center; display: grid; gap: 20px; justify-items: center; }
.cta-band .stack { display: flex; justify-content: center; }
.cta-band .stack svg { width: 64px; height: 64px; margin: 0 -10px; border-radius: 50%; box-shadow: 0 0 0 4px var(--bg); }
footer { border-top: 1px solid var(--line); padding-block: 48px 40px; color: var(--muted); font-size: .92rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 12px; color: var(--fg); font-size: .95rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-bottom { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- Legal + contact pages ---------- */
.page-hero { padding-block: 56px 32px; }
.page-hero .lede { margin-top: 14px; }
.legal { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; padding-bottom: 96px; }
.toc { position: sticky; top: 96px; display: grid; gap: 4px; font-size: .92rem; }
.toc a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.toc a:hover { background: var(--sunk); color: var(--fg); }
.legal article { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); max-width: 780px; }
.legal article h2 { font-size: 1.4rem; margin: 36px 0 12px; scroll-margin-top: 96px; }
.legal article h2:first-child { margin-top: 0; }
.legal article p, .legal article li { color: #3a4542; }
.legal article p + p { margin-top: 12px; }
.legal article ul { padding-left: 20px; display: grid; gap: 6px; }
.callout { background: var(--ink-soft); color: var(--ink-deep); border-radius: 16px; padding: 16px 18px; margin: 16px 0; font-size: .95rem; }
.note-draft { background: #fff1d6; color: #7a5210; border-radius: 14px; padding: 12px 16px; font-size: .88rem; margin-bottom: 24px; }
@media (max-width: 860px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .toc {
    display: flex; position: sticky; top: calc(72px + env(safe-area-inset-top, 0px)); z-index: 5;
    overflow-x: auto; gap: 6px; margin-inline: -20px; padding: 10px 20px; background: rgba(246, 245, 241, .94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); scrollbar-width: none;
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: .85rem; white-space: nowrap; }
  .legal article { max-width: none; }
  .legal article h2 { scroll-margin-top: 140px; }
}

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; padding-bottom: 96px; align-items: start; }
.form { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: 500 1rem var(--f-body); color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.field .err { color: var(--coral); font-size: .85rem; min-height: 1em; }
.side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.side .card { padding: 24px; border-radius: var(--r-lg); }
.side .card h3 { font-size: 1.05rem; }
.side .card p { color: var(--muted); font-size: .95rem; }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.copy-row a { min-width: 0; overflow-wrap: anywhere; }
.copy-row button { margin-left: auto; border: 0; background: var(--ink-soft); color: var(--ink); font: 700 .85rem var(--f-body); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.form-ok { background: var(--ink-soft); color: var(--ink-deep); border-radius: 16px; padding: 16px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-grid > *, .form, .field { min-width: 0; }
.field select { max-width: 100%; text-overflow: ellipsis; }

.reveal { transition: opacity .6s ease, transform .6s ease; }
.reveal.pre { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal.pre { opacity: 1; transform: none; }
}

/* Brand lockup: product name with the maker underneath */
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .by { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }

/* =====================================================================================
   Mobile-first refinements. Desktop styles above are unchanged; everything here only
   applies on small screens or touch devices.
   ===================================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
.menu-cta, .swipe-hint, .mobile-cta { display: none; }

/* Hover lifts only where a real pointer can hover; on touch they stick after a tap. */
@media (hover: none) {
  .why-card:hover, .buddy-picker button:hover { transform: none; }
  .step:hover { background: transparent; }
  .step[aria-selected="true"]:hover { background: var(--surface); }
}

@media (max-width: 900px) {
  /* Menu becomes a full sheet with large targets and the main action at the bottom. */
  .nav.open .nav-links {
    position: fixed; top: calc(72px + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; right: 0;
    align-content: start; overflow-y: auto; padding: 16px max(20px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0; animation: pop .2s ease-out;
  }
  .nav.open .nav-links a:not(.btn) { font-size: 1.25rem; font-weight: 700; color: var(--fg); padding: 16px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav.open .menu-cta { display: inline-flex; margin-top: 20px; height: 56px; color: #fff; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 72px; }
  .nav-inner { height: 64px; gap: 12px; }
  .nav.open .nav-links { top: calc(64px + env(safe-area-inset-top, 0px)); }
  .section { padding-block: 56px; }
  .section-head { margin-bottom: 28px; gap: 12px; }
  h1 { font-size: clamp(2.3rem, 10.5vw, 2.9rem); line-height: 1.06; }
  h2 { font-size: clamp(1.75rem, 7.6vw, 2.2rem); line-height: 1.12; }
  .lede { font-size: 1.02rem; }

  /* Hero: full-width actions, a compact row of chips, and a smaller demo phone. */
  .hero { padding-block: 20px 40px; }
  .hero .lede { margin-top: 16px; }
  .hero-cta { flex-direction: column; margin-top: 24px; gap: 10px; }
  .hero-cta .btn { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px -20px 0; padding: 2px 20px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .hero-buddies { margin-top: 24px; }
  .phone { width: min(300px, 86vw); border-radius: 40px; padding: 9px; }
  .screen { border-radius: 32px; }
  .phone-stage { gap: 12px; margin-top: 8px; }

  /* Problem */
  .problem-grid { gap: 12px; }
  .p-card { padding: 22px; border-radius: 22px; }
  .reach { padding: 24px 18px; border-radius: 24px; gap: 20px; }
  .reach h3 { font-size: 1.4rem !important; }
  .reach-apps { gap: 8px; }
  .reach-app { padding: 12px; border-radius: 16px; }
  .reach-toggle .btn { width: 100%; }

  /* Comparison: swipe sideways with the feature names pinned on the left. */
  .swipe-hint { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
  .swipe-hint [data-icon] { width: 18px; height: 18px; color: var(--ink); }
  .table-wrap { border-radius: 20px; margin-inline: -4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  table.compare { min-width: 620px; font-size: .88rem; }
  .compare th, .compare td { padding: 14px 10px; }
  .compare th:first-child, .compare td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--surface); width: 148px; min-width: 148px;
    box-shadow: 1px 0 0 var(--line);
  }
  .compare td.us, .compare th.us { scroll-snap-align: end; }
  .compare .rowlabel span { font-size: .78rem; }

  /* Why: a swipeable row of cards instead of six stacked ones. */
  .tabs { display: flex; margin-bottom: 20px; }
  .tabs button { flex: 1; padding: 12px 10px; }
  .why-grid {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%;
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 4px 20px 12px;
    scrollbar-width: none;
  }
  .why-grid::-webkit-scrollbar { display: none; }
  .why-card { scroll-snap-align: start; padding: 22px; border-radius: 22px; }

  /* How it works: preview sits ABOVE the steps, so tapping a step changes what you are looking at. */
  .how { gap: 20px; }
  .how > div:first-child { display: contents; }
  .how .section-head { order: 1; margin-bottom: 0; }
  .how-visual { order: 2; min-height: 0; padding: 20px 14px; border-radius: 26px; }
  .steps { order: 3; gap: 6px; }
  .step { grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; }
  .step .n { width: 44px; height: 44px; border-radius: 14px; font-size: 1.05rem; }

  /* Buddies */
  .buddy-stage { gap: 16px; }
  .buddy-big { width: min(200px, 56vw); }
  .buddy-picker { grid-template-columns: repeat(6, 1fr); gap: 6px; max-width: none; }
  .buddy-picker button { border-width: 3px; padding: 2px; }
  .buddy-name { font-size: 1.2rem; margin-top: 12px; }

  /* Privacy, languages, FAQ, CTA */
  .privacy-band { padding: 28px 20px; border-radius: 26px; gap: 24px; }
  .privacy-band .btn { width: 100%; }
  .privacy-list div { padding: 14px; }
  .lang-demo { padding: 22px 18px; gap: 14px; }
  .lang-demo .mode-toggle { width: 100%; }
  .lang-demo .mode-toggle button { flex: 1; }
  .faq details { padding: 2px 18px; }
  .faq summary { padding: 16px 0; font-size: .98rem; }
  .cta-band .stack svg, .cta-band .stack img { width: 52px; height: 52px; }
  .cta-band .hero-cta { width: 100%; }

  /* Footer: room for the sticky bar so it never hides the last links. */
  footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .foot-bottom { flex-direction: column; }

  /* Sticky early-access bar, shown by site.js once the hero buttons scroll away. */
  .mobile-cta {
    display: flex; align-items: center; gap: 12px; position: fixed; z-index: 40;
    left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--fg); color: #fff;
    box-shadow: 0 16px 40px -12px rgba(18, 58, 51, .5);
    transform: translateY(160%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  }
  .mobile-cta.show { transform: none; }
  .mobile-cta div { flex: 1; display: grid; line-height: 1.25; }
  .mobile-cta span { font-size: .8rem; color: rgba(255, 255, 255, .7); }
  .mobile-cta .btn { height: 46px; padding: 0 22px; border-radius: 14px; background: var(--sun); color: var(--fg); }

  /* Legal pages: chip row sits under the shorter phone nav. */
  .page-hero { padding-block: 32px 20px; }
  .toc { top: calc(64px + env(safe-area-inset-top, 0px)); }
  .legal { gap: 12px; padding-bottom: 56px; }
  .legal article { padding: 22px 18px; border-radius: 22px; }
  .legal article h2 { font-size: 1.2rem; margin-top: 28px; scroll-margin-top: 130px; }

  /* Contact */
  .contact-grid { padding-bottom: 56px; }
  .form { padding: 22px 18px; }
  .form .btn { width: 100%; justify-self: stretch !important; }

  /* Comfortable finger targets (44px) for small controls and footer links. */
  .brand { min-height: 44px; }
  .mode-toggle button { min-height: 44px; padding-inline: 18px; }
  .foot ul { gap: 0; }
  .foot ul a, .foot-bottom a { display: inline-block; padding-block: 12px; }
  .foot a[data-email], .copy-row a { display: inline-block; padding-block: 12px; }

  /* Scroll-in animation: shorter and subtler on phones. */
  .reveal { transition-duration: .4s; }
  .reveal.pre { transform: translateY(10px); }
}

@media (max-width: 360px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .chips, .why-grid, .toc { margin-inline: -16px; padding-inline: 16px; }
  .reach-apps { grid-template-columns: 1fr 1fr; }
  .compare th:first-child, .compare td:first-child { width: 128px; min-width: 128px; }
}
