/* ============================================================
   REFLECT · Foundational tokens (colors + type)
   ============================================================
   Bilingual conversation card game. Editorial, warm, botanical.
   Sage greens, deep forest text, terracotta/sienna line art.

   Sampled directly from the physical card deck PDF.
   ------------------------------------------------------------ */

/* ─── Web fonts (Google Fonts substitution — see README) ─── */
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..900;1,8..60,300..900&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300..700&display=swap");

:root {
  /* ─── Brand colors (sampled from cards) ─── */
  --sage-50:  #EDF1E2;   /* card highlight, lifted surface */
  --sage-100: #DDE5C9;   /* hovers, subtle stripe */
  --sage-200: #C7D5B2;   /* canonical card background */
  --sage-300: #B0C497;   /* heavier sage / accents */
  --sage-400: #8FA77A;   /* divider, muted illustration */
  --sage-500: #708F70;   /* muted French-side text on cards */

  --forest-300: #5B8676; /* hover / pressed forest */
  --forest-500: #2C6B57; /* canonical "REFLECT" + English-side text */
  --forest-700: #1F4E40; /* heavier emphasis */
  --forest-900: #11302A; /* near-black headings on light bg */

  --sienna-200: #E4CFB8; /* lightest line-art tone */
  --sienna-400: #C39C7F; /* roots / branches tint */
  --sienna-500: #A88273; /* canonical botanical line-art */
  --sienna-700: #8A5C48; /* deeper illustration shadow */

  --cream-50:  #FAF7EE;  /* off-white, paper warm */
  --cream-100: #F2EBD8;  /* card stock back, light cream */
  --cream-200: #E7DCC0;  /* warm divider on cream */

  --ink:       #1A2620;  /* darkest forest, for body type on cream */
  --ink-muted: #4F5B53;  /* muted body */

  /* ─── Semantic palette (light, "card-stock" surface) ─── */
  --bg:        var(--cream-50);
  --bg-elev:   #FFFFFF;
  --surface:   var(--sage-200);          /* the deck's signature surface */
  --surface-2: var(--sage-100);
  --fg:        var(--forest-900);
  --fg-muted:  var(--forest-500);
  --fg-faded:  var(--sage-500);
  --accent:    var(--sienna-500);
  --line:      rgba(31, 78, 64, 0.18);   /* hair-thin botanical line */
  --line-2:    rgba(31, 78, 64, 0.08);

  /* ─── Dark/sage surface alternates ─── */
  --on-sage-strong: var(--forest-700);   /* English-side text on sage */
  --on-sage-muted:  var(--sage-500);     /* French-side text on sage */
  --on-sage-art:    var(--sienna-500);   /* line illustrations on sage */

  /* ─── Type system ─── */
  --font-display: "PT Serif", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-serif:   "Source Serif 4", "PT Serif", Georgia, "Times New Roman", serif;
  --font-ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* fluid type scale (editorial — generous) */
  --text-xs:   0.75rem;   /* 12 — captions */
  --text-sm:   0.875rem;  /* 14 — meta */
  --text-base: 1rem;      /* 16 — body */
  --text-md:   1.125rem;  /* 18 */
  --text-lg:   1.375rem;  /* 22 — card body */
  --text-xl:   1.75rem;   /* 28 */
  --text-2xl:  2.25rem;   /* 36 — section head */
  --text-3xl:  3rem;      /* 48 — page head */
  --text-4xl:  4.25rem;   /* 68 — display */
  --text-5xl:  6rem;      /* 96 — wordmark / hero */

  --leading-tight:  1.08;
  --leading-snug:   1.18;
  --leading-normal: 1.4;
  --leading-relax:  1.55;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-wider:  0.14em;  /* for ALL-CAPS section labels */

  /* ─── Spacing scale (8pt-based, generous) ─── */
  --s-0:  0;
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* ─── Radius ─── */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-card: 22px;   /* the physical cards are rounded ~22px @ print */
  --r-pill: 999px;

  /* ─── Elevation (soft, "paper" feel — no harsh shadows) ─── */
  --shadow-1: 0 1px 2px rgba(31, 78, 64, 0.05),
              0 1px 1px rgba(31, 78, 64, 0.04);
  --shadow-2: 0 2px 6px rgba(31, 78, 64, 0.07),
              0 8px 18px -8px rgba(31, 78, 64, 0.08);
  --shadow-card: 0 18px 28px -16px rgba(17, 48, 42, 0.28),
                 0 6px 10px -6px rgba(17, 48, 42, 0.18);
  --shadow-inset-paper: inset 0 0 80px rgba(31, 78, 64, 0.04);

  /* ─── Motion ─── */
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  140ms;
  --dur-base:  240ms;
  --dur-slow:  420ms;
}

/* ============================================================
   Semantic typography
   ============================================================ */

html, body {
  font-family: var(--font-serif);
  color: var(--fg);
  background: var(--bg);
  font-size: var(--text-base);
  line-height: var(--leading-relax);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* The wordmark logo uses the display serif at bold weight, letter-spacing
   tightened to match the printed REFLECT mark. */
.wordmark, h1.display, .display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-5xl);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--forest-500);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--forest-900);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--forest-900);
}

h3, .h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--forest-700);
}

h4, .h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-md);
  line-height: var(--leading-snug);
  color: var(--forest-700);
}

p, .body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: var(--leading-relax);
  color: var(--fg);
  text-wrap: pretty;
}

.body-card {
  /* the look of question text on a physical card */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--on-sage-strong);
  text-wrap: balance;
}

.body-card-muted {
  /* the secondary-language pairing on a card */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--on-sage-muted);
  text-wrap: balance;
}

.caption {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--fg-faded);
}

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: var(--leading-relax);
  color: var(--fg-muted);
  text-wrap: pretty;
}

blockquote, .quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--forest-700);
  border-left: 2px solid var(--accent);
  padding-left: var(--s-5);
}

code, .mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* ─── Sub-page back nav ─── */
.back-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: rgba(250, 247, 238, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17,48,42,0.08);
}
.back-nav__logo { height: 22px; }
.back-nav__back {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest-500);
  text-decoration: none;
}
.back-nav__back:hover { color: var(--forest-700); }
