/* ==========================================================================
   Kaldea Education — site styles
   Wisdom indigo and aristocratic gold on a night sky.
   ========================================================================== */

:root {
  --night: #07041a;
  --indigo: #140a33;
  --violet: #241050;
  --violet-light: #3a1c74;
  --plum: #4b1e86;
  --gold: #d69a28;
  --gold-light: #e9c47a;
  --parchment: #eee5d1;
  --ink: #c9bfdc;
  --muted: #9a8fb8;

  --line: rgba(214, 154, 40, 0.28);
  --line-soft: rgba(214, 154, 40, 0.14);
  --glass: linear-gradient(160deg, #22104a, #150b35);

  --f-head: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --f-body: "EB Garamond", Garamond, Georgia, serif;
  --f-caps: "Cinzel", "Trajan Pro", Georgia, serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --r: 4px;
  --r-lg: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold-light); text-decoration: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; }
::selection { background: var(--gold); color: var(--night); }

h1, h2, h3, h4 {
  font-family: var(--f-head);
  color: var(--parchment);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 1.6rem + 5vw, 5.75rem); }
h2 { font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); }
h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
h4 { font-size: 1.3rem; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold-light); }

.lead { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); color: var(--ink); max-width: 38em; }
.muted { color: var(--muted); }
.gold { color: var(--gold-light); }

/* Skip link, focus ---------------------------------------------------------- */
.skip {
  position: fixed; left: 16px; top: -80px; z-index: 200;
  background: var(--gold); color: var(--night); padding: 12px 18px;
  font-family: var(--f-caps); font-size: .8rem; letter-spacing: .12em;
  border-radius: var(--r);
}
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 2px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sky layers --------------------------------------------------------------- */
#sky {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; pointer-events: none;
}
body {
  background-attachment: fixed;
  background-color: var(--night);
  background-image:
    radial-gradient(1200px 700px at 80% 110%, rgba(75, 30, 134, .55), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(36, 16, 80, .6), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #0b0626 55%, #140a33 100%);
}

/* Layout ------------------------------------------------------------------- */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; padding: 0; }
main { display: block; position: relative; }
.section { position: relative; padding: calc(var(--header-h) + 32px) 0 clamp(64px, 8vw, 104px); min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }

.section.screen { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 32px) 0 clamp(64px, 8vw, 104px); }

.section.tight { padding: clamp(72px, 8vw, 112px) 0; }
.band { background: linear-gradient(180deg, rgba(20, 10, 51, 0) 0%, rgba(20, 10, 51, .62) 22%, rgba(20, 10, 51, .62) 78%, rgba(20, 10, 51, 0) 100%); }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; align-items: start; }
.split > :first-child { grid-column: span 5; padding-right: clamp(8px, 3vw, 56px); }
.split > :last-child { grid-column: span 7; }
.split.even > * { grid-column: span 6; }
.split.center { align-items: start; }
@media (max-width: 960px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split > :first-child, .split > :last-child, .split.even > * { grid-column: 1 / -1; padding-right: 0; }
  .g3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

/* Section heading ---------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-caps); font-size: .78rem; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 22px;
}
.eyebrow .num { color: var(--gold-light); }
.eyebrow::after { content: ""; width: 48px; height: 1px; background: var(--line); }
.head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 44px); }
.head.center { text-align: left; }

.ornament { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--gold); font-size: 1.1rem; margin: 0 auto; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--line)); }
.ornament::after { background: linear-gradient(90deg, var(--line), transparent); }

/* Buttons ------------------------------------------------------------------ */
.btn {
  --bg: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  font-family: var(--f-caps); font-weight: 600; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--night); background: var(--bg);
  border: 1px solid var(--gold); border-radius: var(--r);
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease), color .25s;
  box-shadow: 0 0 0 0 rgba(214, 154, 40, 0);
}
.btn:hover { --bg: var(--gold-light); transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(214, 154, 40, .55); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { --bg: transparent; color: var(--gold-light); border-color: var(--line); }
.btn.ghost:hover { --bg: rgba(214, 154, 40, .1); border-color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-caps); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light); padding: 8px 0; min-height: 44px;
}
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.link:hover::after { transform: scaleX(1); }
.link .arr { transition: transform .25s var(--ease); }
.link:hover .arr { transform: translateX(4px); }

.prose a:not(.btn):not(.link) { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.prose a:not(.btn):not(.link):hover { background-size: 100% 1px; }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  transition: background-color .35s, border-color .35s;
  border-bottom: 1px solid var(--line-soft);
}
/* The blur sits on a pseudo-element: a backdrop-filter on the header itself would trap the fixed mobile menu inside it. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(7, 4, 26, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background-color .35s;
}
.site-header.scrolled::before { background: rgba(7, 4, 26, .9); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; flex-shrink: 0; }
.brand .mark-wrap { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.brand img.mark { display: block; width: 40px; height: 40px; object-fit: contain; }
/* The five stars of the mark twinkle on hover: a bright glint and a four-point sparkle over each dot, each on its own uneven rhythm. */
.twinkle { position: absolute; inset: 0; pointer-events: none; }
.twinkle i { position: absolute; width: var(--d); aspect-ratio: 1; transform: translate(-50%, -50%) scale(1); border-radius: 50%; background: #fff3d1; opacity: 0; }
.twinkle i::before, .twinkle i::after { content: ""; position: absolute; left: 50%; top: 50%; background: linear-gradient(90deg, transparent, #fff3d1, transparent); transform: translate(-50%, -50%); }
.twinkle i::before { width: 360%; height: 1px; }
.twinkle i::after { width: 1px; height: 360%; background: linear-gradient(180deg, transparent, #fff3d1, transparent); }
.brand:hover .twinkle i, .brand:focus-visible .twinkle i, .foot-logo:hover .twinkle i { animation: star-twinkle var(--t) ease-in-out var(--dl) infinite; }
@keyframes star-twinkle {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.6); box-shadow: 0 0 0 rgba(255, 220, 140, 0); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 6px 2px rgba(255, 220, 140, .85); }
  70% { opacity: .35; transform: translate(-50%, -50%) scale(.9); }
}
@media (prefers-reduced-motion: reduce) { .brand:hover .twinkle i, .brand:focus-visible .twinkle i, .foot-logo:hover .twinkle i { animation: none; opacity: .8; } }
.brand .bt { display: flex; flex-direction: column; line-height: 1; }
.brand img.word { height: 20px; width: auto; }
.brand .sub { font-family: var(--f-caps); font-size: .58rem; letter-spacing: .48em; color: var(--gold); margin-top: 6px; padding-left: 2px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > ul { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; }
.nav .top {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 7px; white-space: nowrap;
  font-family: var(--f-caps); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: none; border: 0; cursor: pointer; border-radius: var(--r);
  transition: color .2s;
}
.nav .top:hover, .nav .top[aria-current="page"], .nav li.open > .top { color: var(--gold-light); }
.nav .top .chev { width: 9px; height: 9px; transition: transform .25s var(--ease); }
.nav li.open > .top .chev { transform: rotate(180deg); }
.drop {
  position: absolute; top: calc(100% + 6px); left: 50%; min-width: 280px;
  transform: translate(-50%, 6px); opacity: 0; visibility: hidden;
  background: rgba(14, 7, 38, .97); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px; list-style: none;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
}
.drop::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav li.open > .drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .25s var(--ease), visibility 0s; }
.drop a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 6px; color: var(--parchment); font-family: var(--f-head); font-size: 1.15rem; line-height: 1.2; transition: background-color .2s; }
.drop a small { font-family: var(--f-body); font-size: .88rem; color: var(--muted); }
.drop a:hover { background: rgba(214, 154, 40, .1); }
.drop .soon { font-family: var(--f-caps); font-size: .58rem; letter-spacing: .14em; color: var(--gold); margin-left: 6px; vertical-align: middle; }
.nav .btn { margin-left: 8px; min-height: 44px; padding: 10px 14px; font-size: .68rem; letter-spacing: .1em; }

.menu-btn {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px; padding: 8px 12px;
  background: none; border: 1px solid var(--line); border-radius: var(--r); color: var(--gold-light); cursor: pointer;
  font-family: var(--f-caps); font-size: .72rem; letter-spacing: .16em;
}
.menu-btn .bars { width: 18px; height: 12px; position: relative; }
.menu-btn .bars span { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn .bars span:nth-child(1) { top: 0; }
.menu-btn .bars span:nth-child(2) { top: 5px; }
.menu-btn .bars span:nth-child(3) { top: 10px; }
.menu-open .menu-btn .bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-btn .bars span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn .bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1359px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    display: block; margin: 0; padding: 24px var(--gutter) 48px;
    background: rgba(7, 4, 26, .98); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease), visibility 0s; }
  .menu-open { overflow: hidden; }
  .menu-open .site-header::before { background: rgba(7, 4, 26, .98); }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; max-width: 640px; margin: 0 auto; }
  .nav > ul > li { border-bottom: 1px solid var(--line-soft); }
  .nav .top { width: 100%; justify-content: space-between; font-size: .85rem; padding: 16px 4px; min-height: 56px; }
  .drop { position: static; transform: none; opacity: 1; visibility: visible; display: none; box-shadow: none; border: 0; background: none; padding: 0 0 12px; min-width: 0; transition: none; }
  .nav li.open > .drop { display: block; transform: none; }
  .drop a { padding: 12px 8px; }
  .nav .btn { display: flex; width: 100%; max-width: 640px; margin: 28px auto 0; min-height: 52px; }
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) 0 clamp(88px, 13vh, 160px);
  overflow: hidden; isolation: isolate;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-inner { max-width: 880px; margin: 0 auto; text-align: center; will-change: transform, opacity; }
.hero h1 { margin-bottom: .45em; font-size: clamp(2.4rem, 1.5rem + 3.4vw, 4.5rem); }
.hero .tagline { font-family: var(--f-head); font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem); color: var(--parchment); margin: 0 0 .2em; }
.hero .tagline em { color: var(--gold-light); }
.hero .vi { font-family: var(--f-head); font-style: italic; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); color: var(--gold); margin: 0 0 1.6em; }
.hero .lead { margin: 0 auto 2em; }
.hero .btn-row { justify-content: center; }
.arc-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
.hero-arc {
  position: absolute; left: 50%; bottom: 0; z-index: 1;
  width: min(1400px, 140vw); transform: translate(-50%, 72%);
  pointer-events: none; will-change: transform;
}
.hero-arc path { fill: none; stroke: url(#arcGold); stroke-width: 34; stroke-linecap: butt; }
.hero-arc .halo { stroke: rgba(214, 154, 40, .18); stroke-width: 90; filter: blur(30px); }
.page-hero { min-height: 100svh; }
.page-hero .hero-inner { text-align: left; margin: 0; max-width: 820px; }
.page-hero .btn-row { justify-content: flex-start; }
.page-hero .lead { margin-left: 0; }
.page-hero .hero-arc { left: 78%; width: min(1100px, 110vw); transform: translate(-50%, 52%); opacity: .75; }

.crumbs { font-family: var(--f-caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crumbs a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--gold-light); }

/* Grade chooser (hero) */
.chooser { margin: 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 14px; }
.chooser .q { font-family: var(--f-caps); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0; }
.chooser .opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Faint equations */
.equations { position: absolute; top: var(--header-h); bottom: 24px; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); right: max(var(--gutter), calc((100% - var(--wrap)) / 2)); z-index: 0; pointer-events: none; overflow: hidden; }
.equations { background: url("img/equations.svg") center / 100% 100% no-repeat; opacity: .85; }
.equations.stats { background-image: url("img/equations-stats.svg"); }


/* Entrance (on load) */
[data-enter] .hero-inner > *, [data-enter] .split > * > * { opacity: 0; transform: translateY(18px); animation: enter 1s var(--ease) forwards; }
[data-enter] .hero-inner > *:nth-child(2) { animation-delay: .12s; }
[data-enter] .hero-inner > *:nth-child(3) { animation-delay: .24s; }
[data-enter] .hero-inner > *:nth-child(4) { animation-delay: .36s; }
[data-enter] .hero-inner > *:nth-child(5) { animation-delay: .48s; }
[data-enter] .hero-inner > *:nth-child(6) { animation-delay: .6s; }
@keyframes enter { to { opacity: 1; transform: none; } }
.hero-arc .draw { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: drawArc 2.2s .2s var(--ease) forwards; }
@keyframes drawArc { to { stroke-dashoffset: 0; } }



/* Cards -------------------------------------------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--glass); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: clamp(22px, 2.2vw, 30px);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(140deg, rgba(233, 196, 122, .12), transparent 40%); }
a.card { color: inherit; }
a.card:hover, .card.hover:hover, .card:has(a):hover { transform: translateY(-2px); border-color: var(--line); box-shadow: 0 24px 50px -24px rgba(214, 154, 40, .35); }
.card h3 { margin-bottom: .35em; }
.card .k { font-family: var(--f-caps); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.card .more { margin-top: auto; padding-top: 18px; }
.card p { color: var(--ink); }
.roman { font-family: var(--f-head); font-size: 2.6rem; line-height: 1; color: var(--gold); margin-bottom: 18px; font-weight: 500; }
.ticks { list-style: none; display: grid; gap: 10px; margin-top: 6px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: "✦"; position: absolute; left: 0; top: .05em; color: var(--gold); font-size: .8em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 16px; }
.tags li { font-family: var(--f-caps); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* Seals -------------------------------------------------------------------- */
.seals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.seal { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 16px; color: inherit; }
.seal svg { width: clamp(104px, 12vh, 140px); height: auto; overflow: visible; }
.seal .ring { transform-origin: 50% 50%; transition: transform 1.2s var(--ease); }
.seal:hover .ring { transform: rotate(40deg); }
.seal .ring text { font-family: var(--f-caps); font-size: 10.5px; letter-spacing: 3.2px; fill: var(--gold); }
.seal .core { font-family: var(--f-head); font-weight: 600; fill: var(--parchment); }
.seal circle { fill: none; stroke: var(--gold); }
.seal h3 { margin: 0; }
.seal p { max-width: 40ch; color: var(--muted); }
.also { margin: clamp(24px, 3.5vh, 40px) 0 0; color: var(--ink); max-width: none; }
.section.screen.curricula { padding-bottom: clamp(48px, 6vh, 72px); }
.curricula .head { margin-bottom: 28px; }
.also .link { margin-right: .15em; }
.seals.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; }
.seals.five p { font-size: .98rem; }
@media (max-width: 1100px) { .seals.five { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; } }
@media (max-width: 760px) { .seals.five { grid-template-columns: 1fr; gap: 56px; } }
@media (max-width: 760px) { .seals { grid-template-columns: 1fr; gap: 56px; } }

/* Verse -------------------------------------------------------------------- */
.verse { text-align: left; }
.verse blockquote { margin: 0; max-width: 18ch; font-family: var(--f-head); font-weight: 500; font-size: clamp(2.4rem, 1.4rem + 4.2vw, 5rem); line-height: 1.08; color: var(--parchment); }
.verse blockquote em { color: var(--gold-light); }
.verse .ornament { margin-bottom: 40px; }
.verse .ornament { justify-content: flex-start; margin: 0; }
.verse .ornament::before { display: none; }
.verse .src { margin-top: 36px; font-family: var(--f-caps); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* Steps, timeline --------------------------------------------------------- */
.steps { padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.steps li { list-style: none; padding: 32px 28px 0 0; position: relative; }
.steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.steps .n { font-family: var(--f-head); font-size: 1.1rem; font-style: italic; color: var(--gold); display: block; margin-bottom: 8px; }
.steps h3 { font-size: 1.6rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 0 0 8px; } .steps li::before { position: static; display: block; margin-bottom: 12px; } }

.timeline { padding: 0; position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--line) 60%, rgba(214, 154, 40, .1)); }
.timeline li { position: relative; padding: 0 14px 0 0; }
.timeline .dot { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--indigo); font-family: var(--f-head); font-size: 1.5rem; color: var(--parchment); margin-bottom: 20px; position: relative; z-index: 1; transition: border-color .3s, box-shadow .3s; }
.timeline li.now .dot { border-color: var(--gold); box-shadow: 0 0 24px -4px var(--gold); color: var(--gold-light); }
.timeline h3 { font-size: 1.2rem; margin-bottom: .3em; }
.timeline p { font-size: .95rem; color: var(--muted); }
.timeline.vertical { grid-template-columns: 1fr; gap: 26px; }
.timeline.vertical::before { left: 30px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--gold), var(--line)); }
.timeline.vertical li { display: grid; grid-template-columns: 60px 1fr; gap: 20px; padding: 0; align-items: center; }
.timeline.vertical .dot { margin: 0; }
.timeline.vertical p { margin: 0; }
@media (max-width: 960px) {
  .timeline { grid-template-columns: 1fr; gap: 26px; }
  .timeline::before { left: 30px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--gold), var(--line)); }
  .timeline li { display: grid; grid-template-columns: 60px 1fr; gap: 20px; padding: 0; }
  .timeline .dot { margin: 0; }
}

/* Table -------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table th { text-align: left; font-family: var(--f-caps); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding: 0 16px 14px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table td:first-child { font-family: var(--f-head); font-size: 1.5rem; color: var(--gold); width: 64px; }
.table td strong { color: var(--parchment); font-family: var(--f-head); font-size: 1.25rem; font-weight: 600; display: block; line-height: 1.2; }
.table .w { white-space: nowrap; color: var(--gold-light); text-align: right; }
.table th:last-child { text-align: right; padding-right: 0; }
.table td:last-child { padding-right: 0; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
  .table td { border: 0; padding: 4px 0; }
  .table td:first-child { width: auto; font-size: 1.1rem; }
  .table .w { text-align: left; }
}

/* Facts strip */
.hero .facts { margin-top: clamp(32px, 5vh, 56px); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 26px 20px 26px 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.facts b { display: block; font-family: var(--f-head); font-weight: 500; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); color: var(--parchment); line-height: 1; margin-bottom: 8px; }
.facts span { font-family: var(--f-caps); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(3) { padding-left: 0; border-left: 0; } .facts div:nth-child(n+3) { border-top: 1px solid var(--line-soft); } }

/* Team --------------------------------------------------------------------- */
.person { display: grid; grid-template-columns: 132px 1fr; gap: 28px; align-items: start; }
.portrait {
  width: 132px; aspect-ratio: 4 / 5; border-radius: 66px 66px 8px 8px;
  background: radial-gradient(circle at 50% 30%, var(--violet-light), var(--indigo) 70%);
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  font-family: var(--f-head); font-size: 2.8rem; color: var(--gold-light);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person .role { font-family: var(--f-caps); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
@media (max-width: 560px) { .person { grid-template-columns: 1fr; } }

/* Forms -------------------------------------------------------------------- */
.form { display: grid; gap: 22px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-family: var(--f-caps); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 8px; }
.field .opt { color: var(--muted); letter-spacing: .1em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: rgba(7, 4, 26, .6); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--parchment); font-family: var(--f-body); font-size: 1.05rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { background: var(--indigo); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 154, 40, .2); }
.field .err { display: none; color: #f0a48a; font-size: .95rem; margin-top: 6px; }
.field.invalid input, .field.invalid select { border-color: #f0a48a; }
.field.invalid .err { display: block; }
.form .note { font-size: .95rem; color: var(--muted); }
.form-done { display: none; }
.form-done.show { display: block; }

/* Unified Program: spine --------------------------------------------------- */
.spine { position: relative; padding: 20px 0 0; }
.spine-track { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: rgba(214, 154, 40, .12); }
.spine-fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--gold-light), var(--gold)); box-shadow: 0 0 18px var(--gold), 0 0 4px var(--gold-light); transform-origin: top; transform: scaleY(var(--p, 0)); }
.node { position: relative; display: grid; grid-template-columns: 1fr 80px 1fr; align-items: start; padding: 0 0 clamp(56px, 7vw, 96px); }
.node .dot { grid-column: 2; justify-self: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold); background: var(--night); margin-top: 8px; position: relative; z-index: 1; transition: background-color .5s, box-shadow .5s; }
.node.lit .dot { background: var(--gold); box-shadow: 0 0 0 6px rgba(214, 154, 40, .18), 0 0 26px var(--gold); }
.node .topic { grid-column: 1; grid-row: 1; text-align: right; opacity: .38; transition: opacity .6s; }
.node.lit .topic { opacity: 1; }
.node .topic .k { font-family: var(--f-caps); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.node .topic h3 { margin: 6px 0 10px; }
.node .topic p { color: var(--muted); max-width: 34ch; margin-left: auto; }
.node .branch { grid-column: 3; grid-row: 1; position: relative; opacity: 0; transform: translateX(-20px); transition: opacity .7s .15s var(--ease), transform .7s .15s var(--ease); }
.node.lit .branch { opacity: 1; transform: none; }
.node .branch::before { content: ""; position: absolute; left: -40px; top: 19px; width: 40px; border-top: 1px dashed var(--gold); }
.branch .card { border-style: dashed; border-color: var(--line); }
.branch .card h3 { font-size: 1.35rem; }
.node.flip .topic { grid-column: 3; text-align: left; }
.node.flip .topic p { margin-left: 0; }
.node.flip .branch { grid-column: 1; transform: translateX(20px); }
.node.flip .branch::before { left: auto; right: -40px; }
.node.flip.lit .branch { transform: none; }
.fan { position: relative; }
.fan svg.fan-lines { width: 100%; height: 120px; display: block; }
.fan svg.fan-lines path { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.4s var(--ease); }
.fan.lit svg.fan-lines path { stroke-dashoffset: 0; }
@media (max-width: 860px) {
  .spine-track { left: 11px; transform: none; }
  .node { grid-template-columns: 22px 1fr; column-gap: 22px; row-gap: 18px; }
  .node .dot { grid-column: 1; grid-row: 1; margin-top: 6px; }
  .node .topic, .node.flip .topic { grid-column: 2; grid-row: 1; text-align: left; }
  .node .topic p { margin-left: 0; }
  .node .branch, .node.flip .branch { grid-column: 2; grid-row: 2; }
  .node .branch::before { display: none; }
  .fan svg.fan-lines { display: none; }
}

/* Orbit hero art */
.orbit { position: absolute; right: max(-160px, -10vw); top: 50%; width: min(760px, 70vw); aspect-ratio: 1; transform: translateY(-50%); z-index: 1; pointer-events: none; opacity: .9; }
.orbit svg { width: 100%; height: 100%; overflow: visible; }
.orbit .o { fill: none; stroke: rgba(214, 154, 40, .3); stroke-width: 1; }
.orbit .o.d { stroke-dasharray: 3 7; }
.orbit .spin { transform-origin: 300px 300px; animation: spin linear infinite; }
.orbit .s1 { animation-duration: 26s; }
.orbit .s2 { animation-duration: 44s; animation-direction: reverse; }
.orbit .s3 { animation-duration: 70s; }
.orbit .wave { fill: none; stroke: var(--gold-light); stroke-width: 1.2; opacity: .5; }
.orbit .field { fill: none; stroke: rgba(233, 196, 122, .16); stroke-width: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .orbit { right: -30vw; width: 110vw; opacity: .35; } }

/* Grade modal ------------------------------------------------------------- */
.grade-card {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 120;
  width: min(380px, calc(100vw - 32px));
  background: rgba(14, 7, 38, .97); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(233, 196, 122, .05);
  transform: translateY(24px); opacity: 0; visibility: hidden;
  transition: transform .45s var(--ease), opacity .35s, visibility 0s .45s;
}
.grade-card.show { transform: none; opacity: 1; visibility: visible; transition: transform .45s var(--ease), opacity .35s, visibility 0s; }
.grade-card h2 { font-size: 1.7rem; margin: 0 0 6px; padding-right: 36px; }
.grade-card p { font-size: .98rem; color: var(--muted); margin-bottom: 18px; }
.grade-card .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade-card .btn { padding: 10px 12px; }
.grade-card .close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: var(--r); font-size: 1.4rem; line-height: 1; }
.grade-card .close:hover { color: var(--gold-light); }
.grade-card .skipit { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--muted); font-family: var(--f-caps); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; min-height: 44px; }
.grade-card .skipit:hover { color: var(--gold-light); }

/* CTA ---------------------------------------------------------------------- */
.cta { text-align: center; }
.cta h2 { max-width: 14ch; margin-left: auto; margin-right: auto; }
.cta .lead { margin: 0 auto 1.4em; }
.cta .btn-row { justify-content: center; }
.cta .mark-big { width: 88px; margin: 0 auto 32px; opacity: .95; }

/* Footer ------------------------------------------------------------------- */
.site-footer { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--header-h) + 16px) 0 72px; background: linear-gradient(180deg, rgba(7, 4, 26, 0), rgba(7, 4, 26, .55) 30%, rgba(7, 4, 26, .96) 75%); }
.site-footer .cta, .foot-close { min-height: 0; display: block; padding: 0; margin: 0 0 auto; text-align: left; }
.site-footer .cta h2, .site-footer .cta .lead { margin-left: 0; }
.site-footer .cta .btn-row { justify-content: flex-start; }
.foot-close .statement { font-family: var(--f-head); font-size: clamp(2.6rem, 1.5rem + 4.4vw, 5.25rem); line-height: 1.05; color: var(--parchment); max-width: 16ch; margin: 0; text-wrap: balance; }
.foot-close .statement em { color: var(--gold-light); }
.foot-grid { margin-top: 28px; }
.site-footer .cta h2 { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem); }
.site-footer .cta .lead { margin-bottom: 1em; }
.site-footer .cta .mark-big { display: none; }
.site-footer .cta h2 { max-width: none; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); }
.foot-brand .foot-logo { position: relative; display: block; width: 112px; margin-bottom: 20px; }
.foot-brand img { display: block; width: 112px; height: auto; }
.foot-brand p { color: var(--muted); font-family: var(--f-head); font-style: italic; font-size: 1.2rem; max-width: 24ch; }
.site-footer h3 { font-family: var(--f-caps); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li a, .site-footer address a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); transition: color .2s; }
.site-footer li a:hover, .site-footer address a:hover { color: var(--gold-light); }
.site-footer address { font-style: normal; color: var(--ink); }
.site-footer address span { display: block; padding: 8px 0; }
.foot-base { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .92rem; color: var(--muted); }
.foot-base a, .foot-base button { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.foot-base .base-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-base a:hover, .foot-base button:hover { color: var(--gold-light); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* Small screens ----------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .brand img.mark { width: 34px; height: 34px; }
  .brand img.word { height: 17px; }
  .btn { white-space: normal; text-align: center; }
  .btn-row .btn, .chooser .opts .btn { width: 100%; }
  .chooser, .chooser .opts { width: 100%; }
  .menu-btn .lbl { display: none; }
}

/* Reduced motion ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-enter] .hero-inner > *, [data-enter] .split > * > * { opacity: 1; transform: none; animation: none; }
  .hero-arc .draw { stroke-dashoffset: 0; animation: none; }
  .orbit .spin { animation: none; }
  .node .topic, .node .branch { opacity: 1; transform: none; }
  .node .dot { background: var(--gold); }
  .spine-fill { transform: none; }
  .fan svg.fan-lines path { stroke-dashoffset: 0; }
}
