/* ==========================================================================
   BRAND SETTINGS
   Change these first. Everything else in the file reads from them.
   ========================================================================== */
:root {
  --t-ground: #f2efe8;        /* page background (paper) */
  --t-ground-2: #e8e3d8;      /* cards, panels */
  --t-ink: #141311;           /* main text */
  --t-muted: #6b665d;         /* secondary text */
  --t-line: #cfc8b9;          /* hairlines */
  --t-accent: #d93c1a;        /* buttons, highlights, the italic words */
  --t-on-accent: #ffffff;     /* text on accent */
  --t-dark: #141311;          /* the dark syllabus section */
  --t-on-dark: #f2efe8;       /* text on the dark section */

  --t-sans: 'Inter', system-ui, sans-serif;      /* headlines and body; must be a variable font for the hover effect */
  --t-serif: 'Playfair Display', Georgia, serif; /* the italic accent words */
  --t-tracking: -0.045em;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 64px);
  --section: clamp(96px, 12vw, 168px);
  --max: 1280px;
}

/* ==========================================================================
   Fonts (SIL Open Font License, see fonts/)
   ========================================================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/playfair-display-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/playfair-display-latin-wght-italic.woff2') format('woff2');
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { 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; background: var(--t-ground); color: var(--t-ink); font: 400 17px/1.6 var(--t-sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
em { font-family: var(--t-serif); font-style: italic; font-weight: 400; color: var(--t-accent); letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--t-ink); color: var(--t-ground); border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.narrow { max-width: 860px; }
.label { font: 600 13px/1 var(--t-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-accent); margin-bottom: 22px; }
.h2 { font: 500 clamp(38px, 5.8vw, 84px)/1 var(--t-sans); letter-spacing: var(--t-tracking); max-width: 15ch; text-wrap: balance; }
.lead { color: var(--t-muted); font-size: clamp(17px, 1.6vw, 21px); max-width: 48ch; margin-top: 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--t-accent); background: var(--t-accent); color: var(--t-on-accent); font: 600 16px/1 var(--t-sans); text-decoration: none; transition: transform .25s, background .25s, color .25s; }
.btn:hover { transform: translateY(-1px); }
.btn-small { min-height: 40px; padding: 0 20px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--t-ink); border-color: var(--t-ink); }
.btn-ghost:hover { background: var(--t-ink); color: var(--t-ground); }
.btn-block { width: 100%; }
.link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ==========================================================================
   Header
   ========================================================================== */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px var(--gutter); background: color-mix(in srgb, var(--t-ground) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.lined { border-bottom-color: var(--t-line); }
.nav-brand { font: 700 21px/1 var(--t-sans); letter-spacing: -0.04em; text-decoration: none; }
.nav-brand span { color: var(--t-accent); }
.nav-links { display: flex; gap: 30px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--t-muted); }
.nav-links a:hover { color: var(--t-ink); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ==========================================================================
   1. Opening
   ========================================================================== */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(56px, 7vw, 96px); }
.kicker { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; font-size: 14px; font-weight: 500; color: var(--t-muted); padding-bottom: 18px; border-bottom: 1px solid var(--t-ink); }
.hero-title { margin: clamp(28px, 4vw, 52px) 0 0; font: 300 clamp(38px, 10.4vw, 176px)/0.88 var(--t-sans); letter-spacing: var(--t-tracking); }
.hero-title .row { display: block; white-space: nowrap; }
.hero-title em { font-size: 0.98em; }
[data-flex] .ch { display: inline-block; font-variation-settings: 'wght' var(--w, 300); font-weight: var(--w, 300); }
[data-flex] em .ch { font-variation-settings: normal; font-weight: 400; }
.hero-foot { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px 64px; align-items: end; margin-top: clamp(36px, 5vw, 64px); }
.hero-sub { font-size: clamp(17px, 1.5vw, 20px); max-width: 50ch; color: #2f2c27; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; justify-content: flex-end; }
.hint { margin-top: 28px; font-size: 13px; color: var(--t-muted); }
@media (hover: none) { .hint { display: none; } }
@media (max-width: 860px) { .hero-foot { grid-template-columns: 1fr; } .hero-actions { justify-content: flex-start; } }

.facts { border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-grid div { padding: 30px 24px 30px 0; }
.facts-grid div + div { padding-left: 24px; border-left: 1px solid var(--t-line); }
.facts strong { display: block; font: 300 clamp(44px, 5vw, 72px)/1 var(--t-sans); letter-spacing: -0.05em; }
.facts span { display: block; margin-top: 10px; color: var(--t-muted); font-size: 15px; max-width: 22ch; }
@media (max-width: 760px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts-grid div:nth-child(n+3) { border-top: 1px solid var(--t-line); }
}

/* ==========================================================================
   3. Syllabus (dark). Plain list by default; pinned when .live is added.
   ========================================================================== */
.syllabus { background: var(--t-dark); color: var(--t-on-dark); --t-muted: #a39d92; --t-line: #34312c; }
.syl-stage { padding: var(--section) 0; }
.syl-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.syl-count { display: none; font: 300 15px/1 var(--t-sans); color: var(--t-muted); margin-top: 36px; font-variant-numeric: tabular-nums; }
.syl-now { color: var(--t-accent); font-weight: 600; }
.weeks { margin-top: 40px; counter-reset: w; }
.weeks li { padding: 22px 0; border-top: 1px solid var(--t-line); }
.weeks h3 { font: 500 clamp(22px, 2.3vw, 30px)/1.15 var(--t-sans); letter-spacing: -0.025em; }
.weeks h3 span { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-accent); margin-bottom: 8px; }
.weeks p { color: var(--t-muted); margin-top: 10px; max-width: 46ch; font-size: 16px; }
.syl-specimen { display: none; }

.syllabus.live { height: 560vh; }
.syllabus.live .syl-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 88px 0 40px; display: grid; align-items: center; overflow: hidden; }
.syllabus.live .syl-count { display: block; }
.syllabus.live .weeks { position: relative; min-height: 210px; }
.syllabus.live .weeks li { position: absolute; inset: 0 0 auto; border-top: 0; padding-top: 0; opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.syllabus.live .weeks li.on { opacity: 1; transform: none; pointer-events: auto; }
.syllabus.live .weeks li.past { transform: translateY(-18px); }
.syllabus.live .syl-specimen { display: block; }
.spec-frame { position: relative; aspect-ratio: 1.05; border: 1px solid var(--t-line); border-radius: 22px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(90% 80% at 50% 50%, #1d1b18, var(--t-dark)); }
.spec-frame::before, .spec-frame::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; background: var(--t-line); }
.spec-frame::before { top: 34%; } .spec-frame::after { top: 66%; }
.spec-word { position: relative; z-index: 1; font-family: var(--t-sans); font-size: clamp(64px, 10vw, 168px); line-height: 1; color: var(--t-on-dark); white-space: nowrap; will-change: transform; }
.spec-word.serif { font-family: var(--t-serif); font-style: italic; color: var(--t-accent); }
.spec-meta { position: absolute; z-index: 1; font: 500 12px/1 var(--t-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-muted); font-variant-numeric: tabular-nums; }
.spec-meta-a { left: 20px; top: 20px; } .spec-meta-b { right: 20px; bottom: 20px; }
.spec-rule { position: absolute; left: 20px; right: 20px; bottom: 50px; height: 2px; background: var(--t-line); }
.spec-rule::after { content: ''; position: absolute; inset: 0; background: var(--t-accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

@media (max-width: 860px) {
  .syl-grid { grid-template-columns: 1fr; }
  .syllabus.live .syl-stage { align-items: start; padding-top: 80px; }
  .syllabus.live .syl-grid { gap: 22px; }
  .syllabus.live .syl-specimen { order: -1; }
  .syllabus.live .spec-frame { aspect-ratio: 1.6; }
  .syllabus.live .spec-word { font-size: clamp(54px, 17vw, 120px); }
  .syllabus.live .h2 { font-size: 30px; }
  .syllabus.live .label { margin-bottom: 12px; }
  .syllabus.live .syl-count { margin-top: 16px; }
  .syllabus.live .weeks { margin-top: 18px; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section); }
.teacher-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.monogram { aspect-ratio: 4 / 5; border-radius: 22px; background: var(--t-ground-2); display: grid; place-items: center; grid-template-columns: auto auto; justify-content: center; align-content: center; font: italic 400 clamp(140px, 20vw, 300px)/0.8 var(--t-serif); color: var(--t-ink); position: relative; overflow: hidden; }
.monogram span:last-child { color: var(--t-accent); margin-left: -0.12em; }
.monogram::after { content: 'Replace with a portrait'; position: absolute; left: 18px; bottom: 16px; font: 500 12px/1 var(--t-sans); letter-spacing: 0.06em; color: var(--t-muted); }
.creds { margin-top: 34px; border-top: 1px solid var(--t-line); }
.creds li { padding: 14px 0; border-bottom: 1px solid var(--t-line); font-size: 16px; }
@media (max-width: 860px) { .teacher-grid { grid-template-columns: 1fr; } .monogram { aspect-ratio: 16 / 10; } }

.format { padding-top: 0; }
.format-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--t-ground-2); }
.card-n { font: 300 44px/1 var(--t-sans); letter-spacing: -0.05em; color: var(--t-accent); }
.card h3 { font: 600 20px/1.2 var(--t-sans); letter-spacing: -0.02em; margin-top: 48px; }
.card p { color: var(--t-muted); font-size: 15px; margin-top: 10px; }
@media (max-width: 1000px) { .format-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .format-grid { grid-template-columns: 1fr; } }

.enrol { background: var(--t-ground-2); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 34px; border-radius: 22px; background: var(--t-ground); border: 1px solid var(--t-line); }
.plan-main { background: var(--t-ink); color: var(--t-ground); border-color: var(--t-ink); }
.plan-main { --t-muted: #b0a99d; }
.plan-flag { font-size: 13px; font-weight: 600; color: var(--t-accent); margin-bottom: 18px; }
.plan h3 { font: 600 26px/1.1 var(--t-sans); letter-spacing: -0.03em; }
.plan-for { color: var(--t-muted); margin-top: 10px; font-size: 16px; }
.plan-price { font: 300 clamp(64px, 7vw, 96px)/1 var(--t-sans); letter-spacing: -0.06em; margin: 28px 0; }
.plan-price .cur { font-size: 0.45em; vertical-align: 0.85em; margin-right: 4px; letter-spacing: 0; }
.plan ul { margin-bottom: 32px; flex: 1; }
.plan li { padding: 11px 0 11px 26px; border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent); position: relative; font-size: 16px; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 10px; height: 6px; border-left: 2px solid var(--t-accent); border-bottom: 2px solid var(--t-accent); transform: rotate(-45deg); }
.plan-main .btn-ghost { color: var(--t-ground); border-color: var(--t-ground); }
.fine { margin-top: 26px; color: var(--t-muted); font-size: 15px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan-main { order: -1; } }

.qa { margin-top: 48px; border-top: 1px solid var(--t-ink); }
.qa details { border-bottom: 1px solid var(--t-line); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; font: 500 clamp(18px, 2vw, 23px)/1.3 var(--t-sans); letter-spacing: -0.02em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: var(--t-accent); font-weight: 300; font-size: 1.3em; line-height: 1; transition: transform .3s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { color: var(--t-muted); padding: 0 0 26px; max-width: 62ch; }

.last { padding: var(--section) 0 calc(var(--section) * 0.7); border-top: 1px solid var(--t-ink); }
.last .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.last-title { font: 300 clamp(64px, 15vw, 240px)/0.85 var(--t-sans); letter-spacing: var(--t-tracking); white-space: nowrap; }

.foot { border-top: 1px solid var(--t-line); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding: 26px 0 36px; font-size: 14px; color: var(--t-muted); }

/* Fade-ins (only when JavaScript runs and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Reduced motion (the setting, or ?motion=reduced): everything shows at once. */
.reduced .reveal { opacity: 1; transform: none; transition: none; }
