/* SonaNote — sonanote.app
   The app's own design language: a page world and a board world, joined by the
   chalk-yellow underline. Colours are lifted from design/Theme.kt so the site
   and the app cannot drift apart. */

:root {
  --page:        #FBF9F3;
  --page-raised: #FFFFFF;
  --ink:         #1E2822;
  --ink-2:       #4A5852;
  --ink-3:       #77857E;
  --board:       #22312A;
  --board-deep:  #1A261F;
  --board-raise: #2B3C33;
  --chalk:       #F4F1E4;
  --chalk-dim:   rgba(244, 241, 228, .66);
  --chalk-faint: rgba(244, 241, 228, .38);
  --chalk-line:  rgba(244, 241, 228, .22);
  --yellow:      #E8C46A;
  --green:       #2F6B54;
  --green-chalk: #9CD3B4;
  --blue-chalk:  #9FBFD1;
  --hairline:    #E4DFD2;
  --measure:     68ch;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.018em; line-height: 1.15; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
  font-weight: 500;
}

/* ── The signature: a hand-drawn chalk underline ───────────── */
.mark {
  display: block;
  width: 62px;
  height: 5px;
  border-radius: 4px;
  background: var(--yellow);
  margin-top: 10px;
}

/* ── Board strip (legal pages + site header) ───────────────── */
.board-strip {
  background: var(--board-deep);
  color: var(--chalk);
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  color: var(--chalk);
  text-decoration: none;
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.wordmark .mark { width: 42px; height: 4px; margin-top: 5px; }
.board-strip nav { display: flex; gap: 20px; }
.board-strip nav a { color: var(--chalk-dim); text-decoration: none; font-size: 15px; }
.board-strip nav a:hover { color: var(--yellow); }

/* ── Landing hero ──────────────────────────────────────────── */
.hero {
  background: var(--board-deep);
  color: var(--chalk);
  padding: 76px 24px 88px;
}
.hero-inner { max-width: 940px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 680;
  margin: 22px 0 0;
  max-width: 15ch;
}
.hero .lede {
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--chalk-dim);
  max-width: 54ch;
  margin: 22px 0 0;
}
.hero .mark { width: 88px; height: 6px; margin-top: 28px; }
.hero-eyebrow { color: var(--yellow); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin: 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 34px; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--chalk);
  color: var(--board-deep);
  font-weight: 600;
  font-size: 16px;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
}
.cta:hover { background: var(--yellow); color: var(--board-deep); }
.cta-note { color: var(--chalk-faint); font-size: 14.5px; }

/* ── The five stages of a study kit ────────────────────────── */
.stages { background: var(--board); color: var(--chalk); padding: 0 24px 78px; }
.stages-inner { max-width: 940px; margin: 0 auto; }
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 1px;
  background: var(--chalk-line);
  border: 1px solid var(--chalk-line);
  border-radius: 12px;
  overflow: hidden;
}
.stage { background: var(--board); padding: 22px 20px; display: flex; flex-direction: column; gap: 7px; }
.stage .n { font-size: 12px; color: var(--yellow); font-weight: 600; letter-spacing: .1em; }
.stage h3 { font-size: 17px; font-weight: 620; }
.stage p { margin: 0; font-size: 14.5px; color: var(--chalk-dim); line-height: 1.5; }

/* ── Page-world feature sections ───────────────────────────── */
.band { padding: 78px 24px; }
.band-inner { max-width: 940px; margin: 0 auto; }
.band h2 { font-size: clamp(27px, 3.6vw, 36px); font-weight: 660; max-width: 20ch; }
.band > .band-inner > p { max-width: var(--measure); color: var(--ink-2); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 22px;
  margin-top: 42px;
}
.feature {
  background: var(--page-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.feature h3 { font-size: 18px; font-weight: 640; }
.feature p { margin: 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.feature .tag {
  align-self: flex-start;
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green);
  background: rgba(47, 107, 84, .1);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ── Legal documents ───────────────────────────────────────── */
.doc {
  max-width: 74ch;
  margin: 0 auto;
  padding: 52px 24px 20px;
}
.doc h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 680; margin: 10px 0 26px; }
.doc h2 {
  font-size: 21px;
  font-weight: 640;
  margin: 40px 0 4px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.doc p { color: var(--ink-2); margin: 14px 0; }
.doc ul { margin: 14px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.doc li {
  color: var(--ink-2);
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}
.doc li::before { content: "—"; color: var(--yellow); font-weight: 700; }

/* ── Footer ────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--hairline);
  padding: 34px 24px 56px;
  color: var(--ink-3);
  font-size: 14.5px;
}
.foot > * { max-width: 940px; margin-left: auto; margin-right: auto; }
.foot p { margin: 6px auto; }
.foot .fine { font-size: 13px; color: var(--ink-3); }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }

/* ── Dark: the whole site moves to the board world ─────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page:        #161F1A;
    --page-raised: #22312A;
    --ink:         #F4F1E4;
    --ink-2:       rgba(244, 241, 228, .72);
    --ink-3:       rgba(244, 241, 228, .5);
    --hairline:    rgba(244, 241, 228, .16);
    --green:       #8FC3AA;
  }
  :root:not([data-theme="light"]) .feature .tag {
    color: var(--green-chalk);
    background: rgba(156, 211, 180, .13);
  }
  :root:not([data-theme="light"]) .cta { background: var(--yellow); }
  :root:not([data-theme="light"]) .cta:hover { background: var(--chalk); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
