/* OkayHonee — stylesheet for the hand-authored static pages (/about, /how-it-works, /decode-him,
   /safety, /404).

   WHY THIS FILE EXISTS: those pages live in public/ and are copied into dist/ verbatim, so they can
   never reference the app's hashed bundle (/assets/index-<hash>.css changes every build). They need a
   stable filename. Tokens below are copied from src/index.css — if you change a token there, change it
   here too. Component recipes are lifted from the CSS Modules so the static pages and the app look like
   one site.

   Theme: pages either inherit :root (HER, honey) or pin data-mode="him" on <html> (orchid). */

/* ── Tokens · HER (default) — mirrors src/index.css ─────────────────────────── */
:root {
  --honey-50: #fff9ed;
  --honey-100: #fdefcb;
  --honey-200: #fbe3a3;
  --honey-300: #f6d07a;
  --honey-500: #e8a317;
  /* Darkened for WCAG AA — see the matching note in src/index.css. Change both files together. */
  --honey-600: #c5870e;
  --honey-700: #906309;

  --ink-900: #2a2320;
  --ink-700: #4a413b;
  --ink-500: #7a6e64;
  --ink-300: #b6ab9f;
  --cream: #fffdf8;
  --card: #ffffff;
  --border: #eee6d8;
  --border-strong: #e2d6c1;

  --likely: #2f6b43;
  --likely-bg: #e8f4ec;
  --maybe: #8a5e00;
  --maybe-bg: #fdf2d8;
  --wildcard: #93304c;
  --wildcard-bg: #f9e7ee;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(42, 35, 32, 0.06);
  --shadow: 0 6px 20px rgba(42, 35, 32, 0.08);
  --shadow-lg: 0 18px 44px rgba(42, 35, 32, 0.12);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --maxw: 760px;

  --toggle-active-ink: #3a2e12;
  --chip-strong-ink: #7a5200;
  --spark: #e8a317;

  color-scheme: light;
}

/* ── Tokens · HIM "Orchid Nectar" — mirrors src/index.css ───────────────────── */
:root[data-mode="him"] {
  --honey-50: #fff4f9;
  --honey-100: #fbe0ed;
  --honey-200: #f6c3dc;
  --honey-300: #ee9dc4;
  --honey-500: #c81e6b;
  --honey-600: #ad175f;
  --honey-700: #8e1450;

  --ink-900: #2a1f26;
  --ink-700: #4a3a43;
  --ink-500: #7a6b73;
  --ink-300: #b8a7b1;
  --cream: #fff9fc;
  --card: #ffffff;
  --border: #f0dde6;
  --border-strong: #e6cdd9;

  --toggle-active-ink: #ffffff;
  --chip-strong-ink: #8e1450;

  --shadow-sm: 0 1px 2px rgba(42, 31, 38, 0.07);
  --shadow: 0 6px 20px rgba(42, 31, 38, 0.1);
  --shadow-lg: 0 18px 44px rgba(42, 31, 38, 0.14);
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

/* NOTE: the app sets html,body,#root { height: 100% } for its flex shell. These are scrolling
   documents, so min-height instead — height:100% would clip a long page. */
html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background:
    radial-gradient(1100px 480px at 50% -220px, var(--honey-100), transparent 70%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

:root[data-mode="him"] body {
  background:
    radial-gradient(820px 360px at 80% -130px, rgba(232, 163, 23, 0.1), transparent 60%),
    radial-gradient(760px 420px at 20% -70px, rgba(200, 30, 107, 0.15), transparent 62%),
    radial-gradient(1100px 520px at 50% -220px, var(--honey-100), transparent 70%),
    var(--cream);
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--honey-700);
}

::selection {
  background: var(--honey-200);
}

/* One consistent keyboard ring, matching the app. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--honey-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* The app has no skip link — these pages do. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--honey-500);
  color: var(--toggle-active-ink);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* The app ships no reduced-motion guard. These pages do. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Top bar (mirrors LegalPage .top) ───────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 249, 237, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

:root[data-mode="him"] .topbar {
  background: rgba(255, 244, 249, 0.92);
}

.topbar a {
  font-size: 14px;
  font-weight: 600;
  color: var(--honey-700);
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-900);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(200, 138, 14, 0.25));
}

.wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.honee {
  color: var(--honey-600);
}

:root[data-mode="him"] .honee {
  background: linear-gradient(90deg, var(--spark), var(--honey-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Document shell (mirrors LegalPage .doc) ────────────────────────────────── */
.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--honey-700);
  background: var(--honey-100);
  border: 1px solid var(--honey-200);
  padding: 5px 12px;
  border-radius: 999px;
}

.title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 14px 0 4px;
  line-height: 1.2;
}

.title .accent {
  color: var(--honey-600);
}

.meta {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0 0 20px;
}

.lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.lede p {
  margin: 0 0 10px;
}

.lede p:last-child {
  margin-bottom: 0;
}

.lede strong {
  color: var(--ink-900);
}

/* Table of contents — ported from LegalPage.module.css so it matches the app's legal pages. Dropped
   the `.toc ol { columns: 2 }` rule from the original: this TOC is an inline run of links, not a list. */
.toc {
  margin: 22px 0 8px;
  padding: 14px 18px;
  background: var(--honey-50);
  border: 1px solid var(--honey-200);
  border-radius: var(--radius);
}

.tocLinks p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-700);
}

.tocLinks a {
  color: var(--ink-700);
  text-decoration: none;
}

.tocLinks a:hover {
  color: var(--honey-700);
  text-decoration: underline;
}

.section {
  margin-top: 26px;
  scroll-margin-top: 64px;
}

.h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* The app defines no h3 anywhere — this is the consistent derivation (no rule, that's what makes h2). */
.h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 18px 0 6px;
}

.body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-700);
}

.body p {
  margin: 0 0 12px;
}

.body ul,
.body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.body li {
  margin: 6px 0;
}

.body a {
  color: var(--honey-700);
  text-decoration: underline;
}

.body strong {
  color: var(--ink-900);
}

/* ── Callout (the decode card's "Your move" recipe) ─────────────────────────── */
.callout {
  border-left: 3px solid var(--honey-500);
  background: var(--honey-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 0 0 12px;
}

.label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--honey-700);
  margin-bottom: 4px;
}

.callout p {
  font-size: 14.5px;
  color: var(--ink-700);
  margin: 0;
}

/* ── Panel + example decode card ────────────────────────────────────────────── */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.said {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 14px;
}

.reply {
  font-size: 15px;
  color: var(--ink-700);
  margin: 0 0 14px;
}

.translationBlock {
  background: linear-gradient(180deg, var(--honey-50), #fff);
  border: 1px solid var(--honey-200);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 14px;
}

.translation {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.3;
}

.readings {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.interpretation {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
}

.why {
  font-size: 13.5px;
  color: var(--ink-500);
  margin-top: 2px;
}

.chip {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-top: 1px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.likely {
  color: var(--likely);
  background: var(--likely-bg);
  border-color: #cfe6d7;
}

.maybe {
  color: var(--maybe);
  background: var(--maybe-bg);
  border-color: #f2e0b0;
}

.wildcard {
  color: var(--wildcard);
  background: var(--wildcard-bg);
  border-color: #efcdd9;
}

.cardFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}

.closer {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-700);
}

.confidence {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--chip-strong-ink);
  background: var(--honey-100);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── Safety note (mode-independent violet, matches DecodeCard .safety) ──────── */
.note {
  background: #fbf7ff;
  border: 1px solid #e6d9f2;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 12px;
}

.noteHead {
  font-weight: 700;
  color: #6b4aa0;
  margin-bottom: 6px;
}

.note p {
  font-size: 15px;
  color: var(--ink-700);
  line-height: 1.55;
  margin: 0 0 10px;
}

.note p:last-child {
  margin-bottom: 0;
}

/* ── Steps (mirrors Hero .steps) ────────────────────────────────────────────── */
.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0 0;
  padding: 0;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-700);
}

.stepNum {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--honey-500);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

/* ── CTA ────────────────────────────────────────────────────────────────────── */
.ctaRow {
  margin: 26px 0 0;
  text-align: center;
}

.cta {
  display: inline-block;
  background: var(--honey-500);
  color: var(--toggle-active-ink);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}

.cta:hover {
  background: var(--honey-600);
  text-decoration: none;
}

.cta:active {
  transform: translateY(1px);
}

.ctaSub {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-500);
}

/* ── Page footer (mirrors LegalPage .pageFooter) ────────────────────────────── */
.pageFooter {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.pageFooter .disclaimer {
  font-size: 13px;
  color: var(--ink-500);
  max-width: 56ch;
  margin: 0 auto 12px;
  line-height: 1.6;
}

.footLinks {
  font-size: 13px;
  margin: 0 0 8px;
}

.footLinks a {
  color: var(--honey-700);
  text-decoration: none;
}

.footLinks a:hover {
  text-decoration: underline;
}

.copy {
  font-size: 12px;
  color: var(--ink-500);
  margin: 0;
}

/* ── Responsive (mirrors the app's 640px content breakpoint) ────────────────── */
@media (max-width: 640px) {
  .title {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 11px 14px;
  }

  .wordmark {
    font-size: 16px;
  }

  .doc {
    padding: 22px 16px 56px;
  }
}
