/*
  Osita landing — Direction B "Nightlight" (docs/brand/2026-07-05-osita-brand-brief.md §6B).
  Dark-first; full light support via prefers-color-scheme. All token pairs are the
  brief's AA-verified values, used verbatim. No JS: theme follows the OS.
*/

/* ---- Tokens: dark is the base (Nightlight is dark-native) ---- */
:root {
  --surface: #13201A;   /* pine black */
  --card:    #1C2B24;
  --text:    #E4EDE7;   /* moonlight   — 14.1:1 on surface */
  --text-2:  #A8BBB0;   /* secondary   —  8.3:1 */
  --accent:  #82CFAC;   /* sage glow   —  9.2:1 (actions/links) */
  --warm:    #F5BE5E;   /* honey       —  9.9:1 (reminders, the bear) */
  --btn-bg:  #F5BE5E;
  --btn-label: #13201A; /* 9.9:1 */
  --border:  #2C4136;
  --hairline: rgba(228, 237, 231, 0.08);
  --shadow: 0 1px 2px rgba(0,0,0,.28), 0 12px 32px rgba(0,0,0,.30);

  /* the mark tile is constant across themes: honey bear on pine */
  --tile-bg: #13201A;
  --tile-fg: #F5BE5E;

  --maxw: 1080px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --font-head: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --surface: #F6F8F6; /* paper */
    --card:    #FFFFFF;
    --text:    #1E2B26; /* ink green — 13.8:1 */
    --text-2:  #51645B; /*  5.9:1 */
    --accent:  #166A4C; /* evergreen — 6.2:1 */
    --warm:    #8A5B00; /* honey-text — 5.5:1 (text-grade warm signal) */
    --btn-bg:  #166A4C;
    --btn-label: #FFFFFF; /* 6.6:1 */
    --border:  #DCE5DF;
    --hairline: rgba(30, 43, 38, 0.10);
    --shadow: 0 1px 2px rgba(28,43,36,.06), 0 14px 34px rgba(28,43,36,.08);
  }
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

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

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.skip-link {
  position: absolute; left: -9999px; top: 0.5rem;
  background: var(--card); color: var(--text); padding: 0.6rem 1rem;
  border-radius: 8px; border: 1px solid var(--border); z-index: 20;
}
.skip-link:focus { left: 0.75rem; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  margin: 0 0 0.85rem;
}

/* ---- The sentinel mark ---- */
.sentinel { display: block; }
.sentinel--nav { width: 34px; height: 34px; }
.sentinel--demo { width: 52px; height: 52px; border-radius: 13px; box-shadow: var(--shadow); }
.sentinel--closer { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow); }
.sentinel--foot { width: 28px; height: 28px; }

/* A slow, settled breath — the bear is alive, not animated theater. */
@keyframes breathe {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.04) translateY(-1px); }
}
.sentinel--demo, .sentinel--closer {
  animation: breathe 4.5s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .sentinel--demo, .sentinel--closer { animation: none; }
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 66px; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand__word { font-family: var(--font-head); font-weight: 700; font-size: 1.28rem; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 1.75rem); }
.nav-links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav-links a:hover { color: var(--text); }

/* ---- Hero: value prop + the transformation, together above the fold ---- */
.hero { padding: clamp(1.75rem, 4.5vw, 3rem) 0 clamp(2rem, 5vw, 3.25rem); }
.hero__top {
  display: grid; gap: clamp(1rem, 3vw, 2.25rem);
  align-items: end; margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
@media (min-width: 880px) { .hero__top { grid-template-columns: 1.15fr 1fr; } }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); max-width: 13ch; }
.hero__side { display: grid; gap: 1.15rem; justify-items: start; }
.hero__lede {
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  color: var(--text-2);
  max-width: 44ch;
}

/* ---- App-store badges (placeholders until launch) ---- */
.badges { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.95rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); cursor: default;
}
.badge svg { flex: none; }
.badge__meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.badge__meta small { font-size: 0.64rem; color: var(--text-2); letter-spacing: 0.02em; }
.badge__meta strong { font-size: 0.98rem; font-weight: 600; }

/* ---- The transformation: school email in, family feed out ---- */
.demo { display: grid; gap: 1.1rem; align-items: stretch; }
@media (min-width: 880px) { .demo { grid-template-columns: 1fr auto 1fr; gap: 1.4rem; } }
.demo__col { display: grid; grid-template-rows: auto 1fr; gap: 0.6rem; min-width: 0; }
.demo__tag {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-2);
}
.demo__tag--feed { color: var(--warm); }
.demo__mid {
  display: grid; gap: 0.55rem; justify-items: center; align-content: center;
  color: var(--text-2);
}
.demo__midcap { font-size: 0.82rem; font-weight: 500; }
.demo__arrow { color: var(--warm); }
@media (max-width: 879.98px) { .demo__arrow { transform: rotate(90deg); } }

/* The email: dense, real, a note pinned slightly askew. */
.mail {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.15rem 1.25rem 0;
  box-shadow: var(--shadow); transform: rotate(-1.1deg);
  overflow: hidden; max-height: 340px;
}
@media (prefers-reduced-motion: reduce) { .mail { transform: none; } }
.mail__head {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.85rem;
}
.mail__avatar {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--warm); color: var(--btn-label);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
}
.mail__who { display: grid; gap: 0.1rem; min-width: 0; }
.mail__who strong { font-size: 0.92rem; }
.mail__subj { font-size: 0.88rem; color: var(--text-2); }
.mail__time { margin-left: auto; flex: none; font-size: 0.78rem; color: var(--text-2); }
.mail__body {
  font-size: 0.88rem; line-height: 1.55; color: var(--text-2);
  display: grid; gap: 0.65rem; padding-bottom: 2.5rem;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 96%);
}
.mail__body em { font-style: normal; color: var(--text); font-weight: 500; }

/* The feed: what the family actually gets. */
.feed { display: grid; gap: 0.6rem; align-content: start; }
.item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.7rem 0.9rem; box-shadow: var(--shadow);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}
.item, .feed__calm { animation: rise 0.5s ease-out backwards; }
.item:nth-child(1) { animation-delay: 0.15s; }
.item:nth-child(2) { animation-delay: 0.3s; }
.item:nth-child(3) { animation-delay: 0.45s; }
.item:nth-child(4) { animation-delay: 0.6s; }
.feed__calm { animation-delay: 0.8s; }
@media (prefers-reduced-motion: reduce) { .item, .feed__calm { animation: none; } }
.item__kind {
  flex: none; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 999px;
}
.item__kind--event { color: var(--warm); box-shadow: inset 0 0 0 1.5px currentColor; }
.item__kind--task  { color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; }
.item__kind--fyi   { color: var(--text-2); box-shadow: inset 0 0 0 1.5px currentColor; }
.item__main { display: grid; gap: 0.05rem; min-width: 0; margin-right: auto; }
.item__chips { display: flex; gap: 0.4rem; margin-left: auto; flex-wrap: nowrap; }
.item__main strong { font-size: 0.94rem; font-weight: 600; }
.item__src { font-size: 0.76rem; color: var(--text-2); }
.chip {
  flex: none; font-size: 0.76rem; font-weight: 600;
  padding: 0.22rem 0.6rem; border-radius: 999px;
}
.chip--date { color: var(--warm); background: color-mix(in srgb, var(--warm) 14%, transparent); }
.chip--kid  { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.feed__calm {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.86rem; color: var(--text-2); padding: 0.3rem 0.2rem 0;
}
.feed__calm svg { flex: none; color: var(--accent); }

/* ---- Sections ---- */
section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-head { max-width: 40ch; margin-bottom: clamp(1.8rem, 4vw, 2.75rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin-bottom: 0.75rem; }
.section-head p { color: var(--text-2); font-size: 1.08rem; }

/* ---- How it works: a short walk down the page, not three matched tiles ---- */
.how__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 820px) { .how__grid { grid-template-columns: 1fr 1.25fr; } }
.how .section-head { margin-bottom: 0; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem; counter-reset: step;
}
.step { position: relative; padding-left: 3.1rem; counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; font-family: var(--font-head); font-weight: 700;
  font-size: 1.05rem; color: var(--btn-label); background: var(--warm);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 16.5px; top: 42px; bottom: -1.3rem;
  width: 1px; background: var(--border);
}
.step h3 { font-size: 1.18rem; margin-bottom: 0.35rem; }
.step p { color: var(--text-2); }
.step p .keep { color: var(--text); font-weight: 500; }

/* ---- Shared load ---- */
.load { background: var(--card); border-block: 1px solid var(--border); }
.load__grid { display: grid; gap: clamp(1.5rem, 5vw, 3rem); align-items: center; }
@media (min-width: 820px) { .load__grid { grid-template-columns: 1fr 1fr; } }
.stat { display: grid; gap: 1.1rem; }
.stat__row { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.9rem 1rem; align-items: baseline; }
.stat__fig {
  font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 2.9rem); color: var(--warm); line-height: 1;
  white-space: nowrap;
}
.stat__lbl { color: var(--text-2); font-size: 0.98rem; }
.load__copy h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 1rem; }
.load__copy p { color: var(--text-2); margin-bottom: 1rem; }
.load__cite { font-size: 0.8rem; color: var(--text-2); }
.load__cite a { color: var(--text-2); }

/* ---- Privacy ---- */
.privacy__lead { max-width: 46ch; }
.seesaw { display: grid; gap: 1.1rem; margin: clamp(1.8rem, 4vw, 2.5rem) 0; }
@media (min-width: 720px) { .seesaw { grid-template-columns: 1fr 1fr; } }
.seesaw__col { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 1.6rem; }
.seesaw__col--never { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.seesaw__col h3 {
  font-size: 1.02rem; font-family: var(--font-ui); font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.seesaw__col--sees h3 { color: var(--warm); }
.seesaw__col--never h3 { color: var(--accent); }
.seesaw ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.seesaw li { color: var(--text-2); padding-left: 1.5rem; position: relative; }
.seesaw li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 999px; }
.seesaw__col--sees li::before { background: var(--warm); }
.seesaw__col--never li::before { background: none; box-shadow: inset 0 0 0 2px var(--accent); }
.seesaw li strong { color: var(--text); font-weight: 600; }

.promises { display: grid; gap: 0.85rem; margin-top: 0.5rem; }
.promise {
  display: flex; gap: 0.85rem; align-items: flex-start;
  font-size: 1.06rem; color: var(--text);
}
.promise svg { flex: none; margin-top: 0.18rem; color: var(--accent); }
.privacy__more { margin-top: 1.8rem; font-size: 0.98rem; }

/* ---- Closer ---- */
.closer { border-top: 1px solid var(--hairline); }
.closer__inner {
  display: grid; gap: 1rem; justify-items: center; text-align: center;
  max-width: 46rem;
}
.closer h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.closer p { color: var(--text-2); font-size: 1.08rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: clamp(2.5rem, 6vw, 3.5rem) 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; }
.foot-brand { display: inline-flex; align-items: baseline; gap: 0.55rem; }
.foot-brand .sentinel { align-self: center; }
.foot-brand strong { font-family: var(--font-head); font-weight: 700; }
.foot-mean { color: var(--text-2); font-size: 0.85rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; }
.foot-links a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.foot-links a:hover { color: var(--text); }
.foot-note { width: 100%; color: var(--text-2); font-size: 0.85rem; margin-top: 0.5rem; }

/* ---- Legal / doc page ---- */
.doc { padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(3rem, 8vw, 5rem); }
.doc__head { max-width: 60ch; margin-bottom: 2.5rem; }
.doc__head h1 { font-size: clamp(2.1rem, 5.5vw, 3.1rem); margin-bottom: 0.9rem; }
.doc__meta { color: var(--text-2); font-size: 0.92rem; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }
.prose p, .prose li { color: var(--text-2); }
.prose p { margin-bottom: 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.prose strong { color: var(--text); }
.callout {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--warm); border-radius: 12px;
  padding: 1.15rem 1.3rem; margin: 1.5rem 0; color: var(--text-2);
}
.faq { display: grid; gap: 1rem; margin-top: 1rem; }
details.qa {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.4rem 1.2rem;
}
details.qa summary {
  cursor: pointer; padding: 0.85rem 0; font-weight: 600; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; font-weight: 400; }
details.qa[open] summary::after { content: "\2013"; }
details.qa p { padding-bottom: 1rem; margin: 0; }
