/* =============================================================================
   THE VELLUM CLASSROOM — Design System
   "A teacher's well-loved study at the end of a long afternoon."
   Cinematic. Editorial. Hand-made. Built carefully.
   ============================================================================= */


/* --- TOKENS ----------------------------------------------------------------- */

:root {
  /* Foundation */
  --ink:        #1B1714;
  --ink-soft:   #322923;
  --ink-quiet:  #6B5E54;
  --cream:      #F4EBDC;
  --cream-deep: #ECDFC8;
  --paper:      #FBF6EC;
  --paper-edge: #EFE5D2;

  /* Warmth */
  --terracotta:      #B8553A;
  --terracotta-deep: #92402A;
  --warm-wood:       #5C3A2A;

  /* Life */
  --sage:      #8A9479;
  --sage-deep: #6F7A60;
  --soft-gold: #C8A86A;

  /* Type */
  --font-display: 'Fraunces', 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-ui:      'Source Sans 3', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Spatial scale (modular, generous) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 9rem;
  --space-12: 12rem;

  /* Type scale — editorial, breathing */
  --text-xs:   0.8125rem;   /* 13px — labels */
  --text-sm:   0.9375rem;   /* 15px — meta */
  --text-base: 1.0625rem;   /* 17px — body */
  --text-lg:   1.25rem;     /* 20px — sub-heads */
  --text-xl:   1.5rem;      /* 24px */
  --text-2xl:  2rem;        /* 32px */
  --text-3xl:  2.75rem;     /* 44px */
  --text-4xl:  3.75rem;     /* 60px */
  --text-5xl:  5rem;        /* 80px — hero */
  --text-hero: clamp(2.75rem, 7.5vw, 6.5rem);

  /* Containers */
  --max-w-reading: 38rem;   /* 608px — prose */
  --max-w-narrow:  46rem;
  --max-w-wide:    74rem;
  --max-w-frame:   84rem;   /* full bleed inner */

  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 8px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- BODY ------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle warm light pooling — the brand "lives in a room someone has lived in" */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  background-image:
    radial-gradient(ellipse 70% 50% at 18% 12%, rgba(200, 168, 106, 0.10), transparent 65%),
    radial-gradient(ellipse 60% 60% at 85% 90%, rgba(138, 148, 121, 0.06), transparent 65%),
    radial-gradient(ellipse 80% 50% at 90% 20%, rgba(184, 85, 58, 0.04), transparent 60%);
}

/* Parchment texture — the paper our seal sits on, site-wide */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.85;
  mix-blend-mode: multiply;
  background-image: url('assets/parchment.jpg');
  background-size: 1400px 1400px;
  background-position: center;
  background-repeat: repeat;
}

/* --- TYPOGRAPHY ------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: "SOFT" 60, "WONK" 0;
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--ink);
}

h1 {
  font-size: var(--text-hero);
  font-weight: 340;
  letter-spacing: -0.028em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.875rem, 4.2vw, var(--text-3xl));
  font-weight: 380;
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, var(--text-xl));
  font-weight: 500;
  font-variation-settings: "SOFT" 30;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  max-width: var(--max-w-reading);
}

p.lede {
  font-size: clamp(1.125rem, 1.6vw, var(--text-lg));
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 380;
}

p.deck {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-style: italic;
  font-variation-settings: "SOFT" 90;
  font-weight: 350;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}

em { font-style: italic; }
strong { font-weight: 600; color: var(--ink); }

a.inline {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 85, 58, 0.45);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a.inline:hover {
  color: var(--terracotta-deep);
  text-decoration-color: var(--terracotta);
}

/* Drop cap — used sparingly on long-form openings */
.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 380;
  font-variation-settings: "SOFT" 100;
  float: left;
  font-size: 4.2em;
  line-height: 0.85;
  margin: 0.08em 0.08em 0 -0.05em;
  color: var(--terracotta);
}

/* --- LAYOUT PRIMITIVES ------------------------------------------------------ */

.container { width: 100%; max-width: var(--max-w-wide); margin: 0 auto; padding: 0 var(--space-5); }
.narrow    { max-width: var(--max-w-narrow);  margin: 0 auto; padding: 0 var(--space-5); }
.reading   { max-width: var(--max-w-reading); margin: 0 auto; padding: 0 var(--space-5); }
.frame     { width: 100%; max-width: var(--max-w-frame); margin: 0 auto; padding: 0 var(--space-5); }

.section { padding: var(--space-8) 0; position: relative; }
.section-tight { padding: var(--space-7) 0; }

@media (max-width: 720px) {
  .section { padding: var(--space-7) 0; }
}

/* Centred section intro — used above .steps and other grids */
.section-intro {
  max-width: 44rem;
  margin: 0 auto var(--space-7);
  padding: 0 var(--space-5);
  text-align: center;
}
.section-intro .lede {
  margin: var(--space-5) auto 0;
  max-width: 36rem;
}

/* --- EYEBROW (small caps label) --------------------------------------------- */

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  display: inline-block;
  margin-bottom: var(--space-4);
}

.eyebrow.center { display: block; text-align: center; }

/* --- BUTTONS ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.95rem 1.6rem;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  border-radius: 999px;          /* pill — soft, hand-pressed */
  transition: all 0.25s var(--ease-out);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}

.btn .arrow {
  width: 1.1em;
  height: 0.75em;
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--terracotta); }

.btn-cream {
  background: var(--cream);
  color: var(--ink);
}
.btn-cream:hover { background: var(--soft-gold); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(27, 23, 20, 0.35);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

/* --- WORDMARK --------------------------------------------------------------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  letter-spacing: -0.012em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  line-height: 1;
}
.wordmark .vel {
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.wordmark .light {
  font-weight: 300;
  font-style: normal;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}
.wordmark .dot {
  width: 2.6em;
  height: 2.6em;
  background: url('assets/seal-header.png') center/contain no-repeat;
  display: inline-block;
  align-self: center;
  flex: 0 0 auto;
  margin-right: -0.15em;
}

/* Standalone seal-mark, used at hero scale on the homepage */
.seal-mark {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}
.seal-mark.lg { max-width: 360px; }

/* Seal chapter break — the seal sits centered between sections like a signet on a page */
.seal-break {
  display: flex;
  justify-content: center;
  padding: var(--space-9) 0 var(--space-7);
}
.seal-break .seal-mark {
  max-width: 240px;
}
@media (max-width: 700px) {
  .seal-break { padding: var(--space-7) 0 var(--space-6); }
  .seal-break .seal-mark { max-width: 180px; }
}

/* --- FULL-BLEED MISSION HERO ----------------------------------------------- */

.hero-bleed {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);   /* fills viewport below the sticky header */
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero-bleed__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  z-index: 0;
}
/* Veil: warm gradient that darkens the right side so overlaid text holds */
.hero-bleed__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(20,12,8,0.10) 0%, rgba(20,12,8,0.25) 35%, rgba(20,12,8,0.62) 70%, rgba(20,12,8,0.78) 100%),
    linear-gradient(to top, rgba(20,12,8,0.25), transparent 35%);
}
.hero-bleed__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}
.hero-bleed__text {
  max-width: 36rem;
  color: var(--cream);
}
.hero-bleed__text h1 {
  color: var(--cream);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin-bottom: var(--space-5);
}
.hero-bleed__text h1 .ital {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--soft-gold);
}
.hero-bleed__text .lede {
  color: rgba(244, 235, 220, 0.92);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  margin-bottom: var(--space-6);
  max-width: 32rem;
}
.hero-bleed__text .btn-primary {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.hero-bleed__text .btn-primary:hover {
  background: var(--terracotta);
  color: var(--cream);
  border-color: var(--terracotta);
}
@media (max-width: 800px) {
  .hero-bleed { min-height: calc(100vh - 64px); }
  .hero-bleed__img { object-position: 30% 38%; }
  .hero-bleed__veil {
    background:
      linear-gradient(to top, rgba(20,12,8,0.85) 0%, rgba(20,12,8,0.55) 55%, rgba(20,12,8,0.25) 100%);
  }
  .hero-bleed__inner { justify-content: flex-start; align-items: flex-end; padding-bottom: var(--space-6); }
  .hero-bleed__text { max-width: 100%; }
}

/* Quiet footer link — used for the discreet teacher portal entry */
.quiet-link {
  color: var(--ink-quiet) !important;
  text-decoration-color: rgba(27,23,20,0.18) !important;
  font-style: italic;
}
.quiet-link:hover {
  color: var(--terracotta) !important;
  text-decoration-color: var(--terracotta) !important;
}

/* --- HEADER / FOOTER -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-4) 0;
  background: rgba(251, 246, 236, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(27, 23, 20, 0.08);
}
.site-header .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
}
.site-header .wordmark { font-size: var(--text-lg); }
.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.site-header nav a.link {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.site-header nav a.link:hover { color: var(--terracotta); }

@media (max-width: 600px) {
  .site-header nav a.link { display: none; }
}

.site-footer {
  padding: var(--space-9) 0 var(--space-7);
  border-top: 1px solid rgba(27, 23, 20, 0.12);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-top: var(--space-10);
  background: var(--paper-edge);
  position: relative;
}
.site-footer .inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-7);
}
@media (max-width: 720px) {
  .site-footer .inner { grid-template-columns: 1fr; gap: var(--space-5); }
}
.site-footer .colophon { max-width: 28rem; font-style: italic; color: var(--ink-quiet); }
.site-footer h4 {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--warm-wood);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.site-footer ul li { margin-bottom: var(--space-2); }
.site-footer .meta {
  border-top: 1px solid rgba(27, 23, 20, 0.1);
  padding-top: var(--space-5);
  margin-top: var(--space-7);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--ink-quiet);
  letter-spacing: 0.02em;
}

/* --- HERO ------------------------------------------------------------------- */

.hero {
  padding: clamp(var(--space-7), 7vw, var(--space-10)) 0 var(--space-9);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(var(--space-6), 5vw, var(--space-9));
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-7); }
}

.hero h1 {
  margin-top: var(--space-3);
  max-width: 11ch;
}

.hero h1 .ital,
h1 .ital,
h2 .ital,
h3 .ital {
  font-style: italic;
  font-weight: 320;
  font-variation-settings: "SOFT" 100;
  color: var(--ink);
}

.hero .lede {
  max-width: 36ch;
  margin: var(--space-6) 0 var(--space-7);
}

.hero-meta {
  display: flex;
  gap: var(--space-6);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  border-top: 1px solid rgba(27, 23, 20, 0.18);
  padding-top: var(--space-4);
  margin-top: var(--space-7);
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
}
.hero-meta li strong {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 380;
  font-size: var(--text-base);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 2px;
}

.hero-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 60px -30px rgba(27, 23, 20, 0.35);
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}
.hero-figure figcaption {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 235, 220, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Decorative caret/marker — the "vellum mark" */
.vellum-marker {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  background: var(--terracotta);
  vertical-align: 0.18em;
  margin: 0 0 0 0.12em;
}

/* --- RULES & ORNAMENT ------------------------------------------------------- */

.rule {
  border: 0;
  border-top: 1px solid rgba(27, 23, 20, 0.18);
  margin: var(--space-7) 0;
}

.rule-fancy {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-7) 0;
  color: var(--terracotta);
}
.rule-fancy::before, .rule-fancy::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(184, 85, 58, 0.35);
}
.rule-fancy span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--terracotta);
}

/* --- PULL QUOTE ------------------------------------------------------------- */

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 340;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.012em;
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
  position: relative;
}
.pull-quote::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--terracotta);
  margin: 0 auto var(--space-5);
}

/* --- WHO / EDITORIAL TWO-COL ------------------------------------------------ */

.editorial {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(var(--space-6), 6vw, var(--space-9));
  align-items: start;
}
@media (max-width: 820px) {
  .editorial { grid-template-columns: 1fr; gap: var(--space-6); }
}
.editorial .col-left .eyebrow { margin-bottom: var(--space-3); }
.editorial h2 { max-width: 14ch; }
.editorial .col-right p { font-size: var(--text-lg); line-height: 1.55; }

/* --- HOW IT WORKS (numbered steps with rules) ------------------------------- */

.steps {
  display: grid;
  gap: var(--space-7);
  counter-reset: step;
}
@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(var(--space-6), 4vw, var(--space-8));
  }
}

.step {
  position: relative;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(27, 23, 20, 0.22);
}
.step .number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 320;
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--terracotta);
  display: block;
  margin-bottom: var(--space-4);
  line-height: 1;
}
.step h3 { margin-bottom: var(--space-3); }
.step p {
  font-size: var(--text-base);
  color: var(--ink-soft);
  max-width: 32ch;
}

/* --- FIGURES & FULL BLEED --------------------------------------------------- */

.figure-bleed {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
}
.figure-bleed img {
  width: 100%;
  height: clamp(20rem, 56vw, 38rem);
  object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
}
.figure-bleed figcaption {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding: var(--space-4) var(--space-5) 0;
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-6), 5vw, var(--space-8));
  align-items: center;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}
.split .image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.split .image img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95);
}
.split .image figcaption {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--ink-quiet);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  margin-top: var(--space-3);
}
.split.reverse .image { order: 0; }
.split.reverse > div { order: 1; }
@media (max-width: 820px) {
  .split.reverse .image { order: 1; }
  .split.reverse > div { order: 0; }
}

/* Paper band — alternate section background for visual rhythm */
.paper-band {
  background: var(--cream);
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
}

/* Quiet line — for a single italic punctuation after a paragraph */
.quiet-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 350;
  font-size: var(--text-lg);
  color: var(--ink-soft);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--paper-edge);
  max-width: 32rem;
}

/* --- PROMISE (manifesto block) ---------------------------------------------- */

.manifesto {
  background: var(--cream);
  position: relative;
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
}
.manifesto .reading p { font-size: var(--text-lg); line-height: 1.6; color: var(--ink); }
.manifesto .reading p.lede { font-size: var(--text-xl); font-family: var(--font-display); font-style: italic; font-weight: 350; }

/* On narrow screens the cream band sits oddly between paper sections —
   rely on rhythm and the drop cap to carry the shift. */
@media (max-width: 720px) {
  .manifesto {
    background: transparent;
    border-top: 0;
    border-bottom: 0;
    padding-top: var(--space-9);
    padding-bottom: var(--space-9);
  }
}

.signature {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: var(--text-xl);
  color: var(--warm-wood);
  margin-top: var(--space-6);
  display: inline-block;
}

/* --- COMPARE TABLE (we are / we are not) ------------------------------------ */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(27, 23, 20, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
}
.compare .col {
  padding: clamp(var(--space-5), 4vw, var(--space-7));
}
.compare .col-no {
  background: var(--paper);
  border-right: 1px solid rgba(27, 23, 20, 0.14);
}
.compare .col-yes {
  background: var(--ink);
  color: var(--cream);
}
@media (max-width: 720px) {
  .compare .col-no { border-right: 0; border-bottom: 1px solid rgba(27, 23, 20, 0.14); }
}
.compare h3 {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.compare .col-no h3 { color: var(--ink-quiet); }
.compare .col-yes h3 { color: var(--soft-gold); }
.compare ul { display: grid; gap: var(--space-3); }
.compare ul li {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  font-weight: 360;
  line-height: 1.35;
  letter-spacing: -0.005em;
  padding-left: 1.4rem;
  position: relative;
}
.compare .col-no ul li { color: var(--ink-quiet); text-decoration: line-through; text-decoration-color: rgba(184, 85, 58, 0.5); text-decoration-thickness: 1px; }
.compare .col-yes ul li { color: var(--cream); }
.compare .col-yes ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85em;
  width: 0.6rem; height: 1px;
  background: var(--soft-gold);
}

/* --- INK SECTION (dark ground) ---------------------------------------------- */

.ink-section {
  background: var(--ink);
  color: var(--cream);
  position: relative;
}
.ink-section h2 { color: var(--cream); }
.ink-section .eyebrow { color: var(--soft-gold); }
.ink-section .lede { color: rgba(244, 235, 220, 0.78); }
.ink-section p { color: rgba(244, 235, 220, 0.85); }
.ink-section a.inline { color: var(--soft-gold); text-decoration-color: rgba(200, 168, 106, 0.5); }
.ink-section a.inline:hover { color: var(--cream); }

/* --- TALK / CTA ------------------------------------------------------------- */

.talk { text-align: center; padding: clamp(var(--space-9), 10vw, var(--space-12)) 0; }
.talk h2 { max-width: 22ch; margin-left: auto; margin-right: auto; text-wrap: balance; }
.talk .lede { max-width: 36ch; margin: var(--space-5) auto var(--space-6); }
.talk .talk-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

/* Paper-ground intimate CTA — the warm version used on the family page */
.talk-paper {
  background: var(--cream);
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
}
.talk-paper .talk { padding: clamp(var(--space-10), 11vw, var(--space-12)) 0; }
.talk-paper .talk-rule {
  display: inline-block;
  width: 3rem;
  border-top: 1px solid rgba(27, 23, 20, 0.35);
  vertical-align: middle;
  margin: 0 var(--space-3);
}
.talk-paper .talk-mark {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--terracotta);
  vertical-align: middle;
  margin: 0 0.15em;
}
.talk-paper .talk { position: relative; }
.talk-paper .talk > .talk-rule:first-child,
.talk-paper .talk > .talk-mark,
.talk-paper .talk > .talk-rule:nth-of-type(2) {
  margin-bottom: var(--space-7);
}
.talk-paper h2 { color: var(--ink); }
.talk-paper .lede { color: var(--ink-soft); }
.talk-paper .email-line { color: var(--warm-wood); }
.talk-paper .email-line:hover { color: var(--terracotta); }

/* Dark-ground variant (kept for teachers.html style continuity if reused) */
.talk .email-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 4.4vw, var(--text-2xl));
  font-weight: 350;
  color: var(--soft-gold);
  margin-top: var(--space-6);
  display: inline-block;
  letter-spacing: -0.01em;
  word-break: break-word;
  max-width: 100%;
}
.talk .email-line:hover { color: var(--cream); }

/* Mobile: stack button + email tidily */
@media (max-width: 600px) {
  .talk .talk-actions { width: 100%; }
  .talk .talk-actions .btn { width: 100%; justify-content: center; }
  .talk .email-line { display: block; margin-top: var(--space-5); }
  .talk-paper .talk-rule { width: 2rem; }
}

/* --- DETAIL LIST (definition table) ----------------------------------------- */

.detail-list {
  border-top: 1px solid rgba(27, 23, 20, 0.18);
  margin-top: var(--space-5);
}
.detail-list .row {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid rgba(27, 23, 20, 0.12);
  align-items: baseline;
}
@media (max-width: 720px) {
  .detail-list .row { grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-5) 0; }
}
.detail-list .label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--warm-wood);
  text-transform: uppercase;
}
.ink-section .detail-list .label { color: var(--soft-gold); }
.ink-section .detail-list { border-top-color: rgba(244, 235, 220, 0.2); }
.ink-section .detail-list .row { border-bottom-color: rgba(244, 235, 220, 0.12); }
.detail-list .value { color: var(--ink); font-size: var(--text-base); line-height: 1.55; }
.ink-section .detail-list .value { color: rgba(244, 235, 220, 0.88); }

/* --- MONEY TABLE ------------------------------------------------------------ */

.money-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5) 0;
  font-variant-numeric: tabular-nums lining-nums;
}
.money-table thead th {
  text-align: left;
  padding: var(--space-3) 0 var(--space-3);
  border-bottom: 1px solid rgba(27, 23, 20, 0.22);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-wood);
}
.money-table tbody tr {
  border-bottom: 1px solid rgba(27, 23, 20, 0.08);
}
.money-table td {
  padding: var(--space-4) 0;
  vertical-align: middle;
}
.money-table .label-cell { font-size: var(--text-base); }
.money-table .label-cell strong { color: var(--ink); }
.money-table .amount {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: var(--text-2xl);
  color: var(--ink);
  text-align: right;
  letter-spacing: -0.02em;
}
.money-table tr.highlight .amount { color: var(--terracotta); }
.money-table tr.highlight .label-cell strong { color: var(--terracotta-deep); }

/* --- FAQ -------------------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid rgba(27, 23, 20, 0.14);
  padding: var(--space-5) 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  font-variation-settings: "SOFT" 50;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--terracotta);
  font-weight: 300;
  transition: transform 0.25s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer {
  padding-top: var(--space-4);
  color: var(--ink-soft);
  font-size: var(--text-base);
}
.faq-item .answer p { max-width: none; }
.faq-item .answer p:last-child { margin-bottom: 0; }

/* --- NOTICE / NOTE ---------------------------------------------------------- */

.note {
  background: rgba(200, 168, 106, 0.13);
  border-left: 3px solid var(--soft-gold);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.note p { max-width: none; }
.note strong { color: var(--ink); }
.note p { margin-bottom: var(--space-2); }
.note p:last-child { margin-bottom: 0; }

/* --- PASSWORD GATE ---------------------------------------------------------- */

.gate {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.gate-card {
  max-width: 32rem;
  width: 100%;
  text-align: center;
  padding: var(--space-8);
}
.gate-card .wordmark {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-7);
  justify-content: center;
}
.gate-card h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: var(--space-4);
  font-weight: 360;
  letter-spacing: -0.018em;
}
.gate-card p {
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 0 auto var(--space-6);
  font-size: var(--text-base);
  line-height: 1.55;
}
.gate-form { display: flex; flex-direction: column; gap: var(--space-3); max-width: 24rem; margin: 0 auto; }
.gate-input {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: 1px solid rgba(27, 23, 20, 0.2);
  background: var(--cream);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.gate-input::placeholder { color: var(--ink-quiet); font-style: italic; }
.gate-input:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--paper);
}
.gate-error {
  color: var(--terracotta-deep);
  font-size: var(--text-sm);
  min-height: 1.5em;
  font-style: italic;
  margin-top: var(--space-1);
}
.gate-card .btn-primary { justify-content: center; }

/* Hide content until gate cleared */
body.gated { overflow: hidden; }
body.gated .content-area { visibility: hidden; }
body.unlocked .gate { display: none; }
body.unlocked .content-area { visibility: visible; }
body.unlocked { overflow: auto; }

/* --- WHY-LIST (lyrical bullet list) ----------------------------------------- */

.lyric-list {
  display: grid;
  gap: var(--space-5);
  margin: var(--space-6) 0;
}
.lyric-list li {
  padding-left: var(--space-6);
  position: relative;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 50ch;
}
.lyric-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 1rem; height: 1px;
  background: var(--terracotta);
}
.lyric-list li strong { color: var(--ink); font-weight: 600; }

/* --- ANIMATED REVEAL (subtle, never showy) ---------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- UTILITIES -------------------------------------------------------------- */

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.mb-3 { margin-bottom: var(--space-3); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-7 { margin-bottom: var(--space-7); }
.mt-5 { margin-top: var(--space-5); }
.mt-7 { margin-top: var(--space-7); }
.mt-9 { margin-top: var(--space-9); }

/* --- REDUCED MOTION --------------------------------------------------------- */

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- FOCUS STATES ----------------------------------------------------------- */

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


/* --- APPLICATION FORM ------------------------------------------------------- */
.apply-form { display: flex; flex-direction: column; gap: var(--space-9); }
.apply-form fieldset {
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.apply-form fieldset + fieldset {
  border-top: 1px solid var(--paper-edge);
  padding-top: var(--space-8);
}
.apply-form legend {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  color: var(--ink);
  margin-bottom: var(--space-2);
  padding: 0;
}
.apply-form .field { display: flex; flex-direction: column; gap: var(--space-2); }
.apply-form label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.apply-form .req { color: var(--terracotta-deep); margin-left: 0.15em; }
.apply-form .helper {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}
.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="number"],
.apply-form select,
.apply-form textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-md, 6px);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: #FDFBF5;
}
.apply-form textarea { resize: vertical; min-height: 6em; line-height: 1.6; }
.apply-form .radio-group,
.apply-form .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.apply-form .radio-group label,
.apply-form .checkbox-group label {
  font-weight: 400;
  font-family: var(--font-body);
  font-size: var(--text-base);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  line-height: 1.5;
}
.apply-form .radio-group input[type="radio"],
.apply-form .checkbox-group input[type="checkbox"] {
  accent-color: var(--terracotta);
  margin-top: 0.25em;
  flex-shrink: 0;
}
.apply-form .submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding-top: var(--space-5);
}
.apply-form .acknowledgment {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--ink-soft);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  line-height: 1.5;
}
@media (min-width: 720px) {
  .apply-form .field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

/* =============================================================================
   TEACHER PORTAL NAV + CARDS (private pages)
   ============================================================================= */

.portal-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}
.portal-nav .link {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 180ms ease;
  padding: var(--space-2) 0;
  border-bottom: 1px solid transparent;
}
.portal-nav .link:hover {
  color: var(--ink);
}
.portal-nav .portal-label {
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--ink-quiet);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  white-space: nowrap;
}
.portal-nav .portal-exit {
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--ink-quiet);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  white-space: nowrap;
  text-decoration: none;
  transition: color 180ms ease;
}
.portal-nav .portal-exit:hover { color: var(--terracotta); }
.portal-nav .portal-exit .ar { display: inline-block; transform: translateY(-1px); margin-left: 0.25em; opacity: 0.7; }
@media (max-width: 640px) {
  .portal-nav { gap: var(--space-4); }
  .portal-nav .portal-label,
  .portal-nav .portal-exit { display: none; }
}

.portal-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
@media (min-width: 820px) {
  .portal-cards { grid-template-columns: 1fr 1fr; gap: var(--space-7); }
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-7);
  background: var(--paper);
  border: 1px solid rgba(27, 23, 20, 0.08);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  position: relative;
}
.portal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 85, 58, 0.4);
  box-shadow: 0 6px 24px rgba(27, 23, 20, 0.06);
}
.portal-card-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--terracotta);
  line-height: 1;
}
.portal-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0;
  color: var(--ink);
}
.portal-card p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.portal-card-cta {
  margin-top: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--terracotta-deep);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.portal-card-cta svg {
  transition: transform 220ms ease;
}
.portal-card:hover .portal-card-cta svg {
  transform: translateX(3px);
}

/* ============================================================
   OPENING ANIMATION — parchment hold, seal fade-in, cross-fade
   Total: ~3.95s. Beats: paper only (0.0–0.75) · seal fades in
   (0.75–1.95) · hold (1.95–2.35) · cross-fade out (2.35–3.95)
   ============================================================ */

html.intro-active,
html.intro-active body {
  overflow: hidden;
  height: 100%;
}

.intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #F4EBDC;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity 1600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.intro-curtain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: multiply;
  background-image: url('assets/parchment.jpg');
  background-size: 1400px 1400px;
  background-position: center;
  background-repeat: repeat;
}

.intro-stage {
  position: relative;
  width: min(60vw, 480px);
  aspect-ratio: 1 / 1;
}

.intro-seal {
  position: absolute;
  inset: 0;
  background: url('assets/seal-hero.png') center/contain no-repeat;
  filter: drop-shadow(0 8px 18px rgba(40, 24, 12, 0.32));
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 1200ms cubic-bezier(0.2, 0.65, 0.2, 1);
  will-change: opacity, transform;
}
/* Seal only fades in once the curtain enters reveal phase */
.intro-curtain.is-revealing .intro-seal {
  opacity: 1;
  transform: scale(1);
}

/* Cross-fade: triggered when the curtain gets .is-fading */
.intro-curtain.is-fading {
  opacity: 0;
  pointer-events: none;
}

.intro-curtain.is-skipped {
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

/* Skip — quiet, bottom right */
.intro-skip {
  position: absolute;
  bottom: 28px;
  right: 28px;
  z-index: 4;
  background: transparent;
  border: 1px solid rgba(27, 23, 20, 0.25);
  color: var(--ink-soft, #4a3f36);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms ease 900ms, border-color 200ms ease, color 200ms ease;
}
.intro-curtain.is-playing .intro-skip {
  opacity: 0.65;
}
.intro-skip:hover {
  opacity: 1;
  border-color: rgba(27, 23, 20, 0.5);
  color: var(--ink, #1B1714);
}

@media (max-width: 640px) {
  .intro-stage { width: 70vw; }
  .intro-skip { bottom: 20px; right: 20px; font-size: 12px; padding: 6px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-curtain { display: none !important; }
}
