/* ==========================================================================
   Royal Charis Academy — landing page
   Palette: brand navy + royal gold, vellum paper. Motif: the classical arch.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + latin-ext for Romanian diacritics) ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/instrument-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/instrument-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Animatable custom properties used by the intro */
@property --o {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}

/* ---------- Tokens ---------- */
:root {
  --night: #00152f;
  --navy-deep: #012251;
  --navy: #01326d;
  --navy-soft: #234a82;
  --gold: #c9a227;
  --gold-light: #e4c766;
  --gold-ink: #836612;
  --vellum: #f4f0e6;
  --paper: #fbf9f3;
  --ink: #0b1f3f;
  --ink-soft: #4a5670;
  --sage-ink: #4e6853;
  --on-dark: #f4f0e6;
  --on-dark-soft: rgba(244, 240, 230, 0.72);
  --line-dark: rgba(244, 240, 230, 0.16);
  --line-light: rgba(1, 50, 109, 0.14);
  --error: #b42318;

  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --gutter: clamp(16px, 4.2vw, 64px);
  --maxw: 1360px;
  --sheet-r: clamp(28px, 4vw, 56px);
  --nav-h: 64px;
  --bar: calc(100lvh - 100svh); /* height of mobile browser chrome when visible */
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --arch: 100vmax 100vmax 0 0;

  /* Type scale: serif for headings and quotes, sans for everything else */
  --fs-hero: clamp(2.7rem, min(11.5vw, 6.4svh), 7rem);
  --fs-display: clamp(2.75rem, 7vw, 7rem);
  --fs-h2: clamp(2.25rem, 4.4vw, 4.25rem);
  --fs-statement: clamp(1.9rem, 3.7vw, 3.6rem);
  --fs-quote: clamp(1.5rem, 2.2vw, 2.05rem);
  --fs-h3: clamp(1.6rem, 2.1vw, 1.95rem);
  --fs-h4: clamp(1.3rem, 1.5vw, 1.45rem);
  --fs-lead: clamp(1.0625rem, 1.2vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.9rem;
  --fs-label: 0.8125rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 0;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-stopped {
  overflow: clip;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin: 0;
}

::selection {
  background: var(--gold);
  color: var(--night);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--night);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus-visible {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.h-section {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  max-width: 38em;
  text-wrap: pretty;
}

/* Arches: a semicircular top on any portrait box */
.arch {
  border-radius: var(--arch);
  overflow: hidden;
  isolation: isolate;
}

/* The brand icon (crown over an open book), vectorised from the school logo */
.crown {
  display: inline-block;
  flex: none;
  height: auto;
  aspect-ratio: 276.9 / 225.7;
  fill: currentColor;
  overflow: visible;
}
/* Draws the outline first, then fills it in */
.crown--draw {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: crown-stroke 1.2s var(--ease-io) 0.1s forwards, crown-fill 0.6s var(--ease) 0.95s forwards;
}
@keyframes crown-stroke {
  to { stroke-dashoffset: 0; }
}
@keyframes crown-fill {
  to { fill: currentColor; stroke-width: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:active {
  transform: scale(0.97);
}
.btn--gold {
  background: var(--gold);
  color: var(--night);
}
.btn--gold:hover {
  background: var(--gold-light);
}
.btn--light {
  background: var(--vellum);
  color: var(--navy);
}
.btn--light:hover {
  background: #fff;
}
.btn--navy {
  background: var(--navy);
  color: var(--vellum);
}
.btn--navy:hover {
  background: var(--navy-soft);
}
.btn--block {
  width: 100%;
}

/* ---------- Sheets: sections that slide over the previous one ---------- */
.sheet {
  position: relative;
  margin-top: calc(-1 * var(--sheet-r));
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
}
.sheet--light {
  background: var(--vellum);
  color: var(--ink);
}
.sheet--navy {
  background: var(--navy);
  color: var(--on-dark);
}

main > section {
  position: relative;
}
main > section:nth-child(1) { z-index: 1; }
main > section:nth-child(2) { z-index: 2; }
main > section:nth-child(3) { z-index: 3; }
main > section:nth-child(4) { z-index: 4; }
main > section:nth-child(5) { z-index: 5; }
main > section:nth-child(6) { z-index: 6; }
main > section:nth-child(7) { z-index: 7; }
main > section:nth-child(8) { z-index: 8; }
main > section:nth-child(9) { z-index: 9; }

/* ==========================================================================
   Intro
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: var(--night);
  color: var(--gold);
  pointer-events: none;
}
.motion:not(.intro-seen) .intro {
  display: grid;
  animation: intro-lift 1.2s var(--ease-io) 4s forwards; /* failsafe if scripts never run */
}
.motion.is-ready .intro {
  animation: intro-lift 1.05s var(--ease-io) 0s forwards;
}
.intro__crown {
  width: clamp(112px, 22vw, 156px);
}
@keyframes fade-in {
  to { opacity: 1; }
}
@keyframes intro-lift {
  0% { transform: translateY(0); border-radius: 0; }
  100% { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 18vh 18vh; visibility: hidden; }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  color: var(--on-dark);
  transition: color 0.4s var(--ease), transform 0.5s var(--ease), background-color 0.4s var(--ease);
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 21, 47, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  opacity: 0;
  transition: opacity 0.4s var(--ease), background-color 0.4s var(--ease);
}
.nav.is-scrolled::before {
  opacity: 1;
}
.nav[data-theme='light'] {
  color: var(--ink);
}
.nav[data-theme='light']::before {
  background: rgba(244, 240, 230, 0.8);
}
.nav.is-hidden {
  transform: translateY(-100%);
}
.menu-open .nav {
  transform: none;
  color: var(--on-dark);
}
.menu-open .nav::before {
  opacity: 0;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}
.nav__crown {
  width: 42px;
  color: var(--gold);
  transition: color 0.4s var(--ease);
}
.nav[data-theme='light'] .nav__crown {
  color: var(--navy);
}
.menu-open .nav .nav__crown {
  color: var(--gold);
}
@media (min-width: 1280px) {
  .nav__crown {
    width: 50px;
  }
}
.nav__name {
  max-width: 6.5em; /* wraps to two lines while the header is narrow */
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.nav__links {
  display: none;
}

.nav__cta {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9rem;
}
.nav__cta-long {
  display: none;
}

.nav__toggle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav__burger,
.nav__burger::before {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.nav__burger {
  top: 18px;
}
.nav__burger::before {
  content: '';
  left: 0;
  right: 0;
  top: 7px;
}
.menu-open .nav__burger {
  top: 21px;
  transform: rotate(45deg);
}
.menu-open .nav__burger::before {
  top: 0;
  transform: rotate(-90deg);
}

@media (min-width: 1280px) {
  .nav {
    --nav-h: 76px;
    gap: 28px;
  }
  .nav__name {
    max-width: none; /* one line, like the footer lockup */
  }
  .nav__links {
    display: flex;
    gap: 18px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .nav__links a {
    position: relative;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.3s var(--ease);
  }
  .nav__links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease);
  }
  .nav__links a:hover {
    opacity: 1;
  }
  .nav__links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
  .nav__cta-long {
    display: inline;
  }
  .nav__cta-short,
  .nav__toggle {
    display: none;
  }
}

/* Mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 5svh) var(--gutter) max(28px, env(safe-area-inset-bottom));
  background: var(--night);
  color: var(--on-dark);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease-io), visibility 0s linear 0.7s;
}
.menu-open .menu {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.7s var(--ease-io), visibility 0s;
}
.menu__links {
  display: flex;
  flex-direction: column;
}
.menu__links a {
  padding: 6px 0;
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}
.menu-open .menu__links a {
  opacity: 1;
  transform: none;
}
.menu-open .menu__links a:nth-child(1) { transition-delay: 0.18s; }
.menu-open .menu__links a:nth-child(2) { transition-delay: 0.23s; }
.menu-open .menu__links a:nth-child(3) { transition-delay: 0.28s; }
.menu-open .menu__links a:nth-child(4) { transition-delay: 0.33s; }
.menu-open .menu__links a:nth-child(5) { transition-delay: 0.38s; }
.menu-open .menu__links a:nth-child(6) { transition-delay: 0.43s; color: var(--gold); }
.menu__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--on-dark-soft);
}
.menu__contact a {
  text-decoration: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--night);
  color: var(--on-dark);
}
.hero__pin {
  --a: 0; /* arch → full screen */
  --t: 0; /* title moves away */
  --c: 0; /* closing caption */
  --k: calc(1 - var(--a));
  --aw: min(60vw, 34svh);
  --ah: calc(var(--aw) * 1.42);
  --ay: 0px;
  --gap: clamp(16px, 2.6svh, 28px);
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.motion .hero {
  /* one screen, plus room for the next section's rounded edge */
  height: calc(100lvh + var(--sheet-r));
}
.motion .hero__pin {
  height: 100lvh;
  --ay: calc(var(--bar) / -2);
  animation: arch-open 1.5s var(--ease) 4.3s both; /* failsafe */
}
.motion.is-ready .hero__pin {
  animation: arch-open 1.5s var(--ease) 0.45s both;
}
.motion.intro-seen.is-ready .hero__pin {
  animation-delay: 0s;
}
@keyframes arch-open {
  from { --o: 0; }
  to { --o: 1; }
}

.hero__media {
  position: absolute;
  inset: 0;
  clip-path: inset(
    calc(((100% - var(--ah)) / 2 + var(--ay)) * var(--k) + var(--ah) * (1 - var(--o)))
    calc((100% - var(--aw)) / 2 * var(--k))
    calc(((100% - var(--ah)) / 2 - var(--ay)) * var(--k))
    calc((100% - var(--aw)) / 2 * var(--k))
    round calc(var(--aw) / 2 * var(--k)) calc(var(--aw) / 2 * var(--k)) 0 0
  );
  background: var(--navy-deep);
}
.hero__img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--aw);
  height: var(--ah);
  max-width: none;
  object-fit: cover;
  object-position: 50% 42%;
  transform: translate(-50%, -50%);
}
/* With motion, the photo box is sized by JS so it covers the arch at rest and the screen when open */
.motion .hero__img {
  top: var(--cy, 50%);
  width: var(--iw, 100%);
  height: var(--ih, 100%);
  transform-origin: 50% var(--fy, 50%);
  transform: translate(-50%, calc(-1 * var(--fy, 50%)))
    scale(calc((var(--s0, 1) + (1 - var(--s0, 1)) * var(--a)) * (1.06 + 0.1 * (1 - var(--o)) - 0.06 * var(--a))));
  will-change: transform;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 21, 47, 0.5) 0%, rgba(0, 21, 47, 0) 30%),
    linear-gradient(0deg, rgba(0, 21, 47, 0.92) 0%, rgba(0, 21, 47, 0.45) 45%, rgba(0, 21, 47, 0) 75%);
  opacity: var(--c);
}

.hero__frame {
  position: absolute;
  left: calc(50% - var(--aw) / 2 - 12px);
  top: calc(50% - var(--ah) / 2 + var(--ay) - 12px);
  width: calc(var(--aw) + 24px);
  height: calc(var(--ah) + 12px);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-bottom: 0;
  border-radius: var(--arch);
  opacity: calc(var(--o) * (1 - var(--a) * 5));
  transform: scale(calc(1 + var(--a) * 0.4));
  pointer-events: none;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.hero__side {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: calc(1 - var(--t) * 1.4);
}
.hero__side--l {
  bottom: calc(50% + var(--ah) / 2 - var(--ay) + var(--gap));
  transform: translateY(calc(var(--t) * -22svh));
}
.hero__side--r {
  top: calc(50% + var(--ah) / 2 + var(--ay) + var(--gap));
  transform: translateY(calc(var(--t) * 22svh));
}
.line {
  display: block;
  overflow: hidden;
  padding: 0.12em 0.06em 0.1em;
  margin: -0.12em 0 -0.1em;
}
.line > span {
  display: block;
}
.motion .hero .line > span {
  transform: translateY(115%);
  animation: line-up 1.1s var(--ease) 4.6s forwards;
}
.motion.is-ready .hero .line > span {
  animation-delay: calc(var(--d, 0s) + 0.75s);
}
.motion.intro-seen.is-ready .hero .line > span {
  animation-delay: calc(var(--d, 0s) + 0.15s);
}
.hero__side--l .line:nth-child(2) > span { --d: 0.08s; }
.hero__side--r .line:nth-child(1) > span { --d: 0.16s; }
.hero__side--r .line:nth-child(2) > span { --d: 0.24s; }
@keyframes line-up {
  to { transform: translateY(0); }
}

.hero__sub {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--bar) + max(22px, env(safe-area-inset-bottom)));
  font-size: 0.82rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--on-dark-soft);
  opacity: calc(1 - var(--t) * 3);
}
.motion .hero__sub {
  animation: fade-in-sub 1s var(--ease) 4.8s both;
}
.motion.is-ready .hero__sub {
  animation-delay: 1.3s;
}
.motion.intro-seen.is-ready .hero__sub {
  animation-delay: 0.6s;
}
@keyframes fade-in-sub {
  from { opacity: 0; }
}

.hero__cue {
  display: none;
}

.hero__after {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--bar) + 9svh);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  opacity: var(--c);
  transform: translateY(calc((1 - var(--c)) * 40px));
  visibility: hidden;
}
.hero__pin.is-open .hero__after {
  visibility: visible;
}
.hero__after-title {
  max-width: 13em;
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.reduced .hero__after,
.no-js .hero__after {
  display: none;
}

@media (max-height: 640px) and (max-width: 899px) {
  .hero__pin {
    --aw: min(52vw, 30svh);
  }
}

@media (min-width: 900px) {
  .hero__pin {
    --aw: min(24vw, 42vh);
    --ah: min(calc(var(--aw) * 1.48), 66vh);
    --ay: 2vh;
  }
  .motion .hero__pin {
    --ay: 2vh;
  }
  .hero__title {
    font-size: clamp(3rem, 5.4vw, 7rem);
  }
  .hero__side {
    top: 50%;
    bottom: auto;
    left: auto;
    right: auto;
  }
  .hero__side--l {
    right: calc(50% + var(--aw) / 2 + 3.4vw);
    align-items: flex-end;
    text-align: right;
    transform: translate(calc(var(--t) * -34vw), -78%);
  }
  .hero__side--r {
    left: calc(50% + var(--aw) / 2 + 3.4vw);
    align-items: flex-start;
    text-align: left;
    transform: translate(calc(var(--t) * 34vw), -10%);
  }
  .hero__sub {
    left: var(--gutter);
    right: auto;
    bottom: 36px;
    text-align: left;
    max-width: none;
    white-space: nowrap; /* short enough to stay on one line */
    font-size: 0.9rem;
  }
  .hero__cue {
    display: block;
    position: absolute;
    right: var(--gutter);
    bottom: 36px;
    width: 1px;
    height: 64px;
    overflow: hidden;
    background: var(--line-dark);
    opacity: calc(1 - var(--t) * 3);
  }
  .hero__cue::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: translateY(-100%);
    animation: cue 2.4s var(--ease-io) 2s infinite;
  }
  .hero__after {
    bottom: 11vh;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ==========================================================================
   Manifesto
   ========================================================================== */
.manifesto {
  padding: clamp(96px, 17vw, 240px) 0 clamp(88px, 14vw, 200px);
}
.manifesto__text {
  max-width: 20em;
  font-family: var(--serif);
  font-size: var(--fs-statement);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--navy);
}
.manifesto__text .w {
  opacity: calc(0.14 + 0.86 * var(--w, 1));
}
/* Creed, mission and vision: three equal columns under the statement */
.aims {
  display: grid;
  gap: 32px;
  margin-top: clamp(56px, 8vw, 104px);
}
.aims__item {
  padding-top: 18px;
  border-top: 1px solid rgba(131, 102, 18, 0.45);
}
.aims__title {
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
}
.aims__item p {
  margin-top: 10px;
  max-width: 36em;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}
@media (min-width: 900px) {
  .aims {
    grid-template-columns: repeat(3, 1fr);
    column-gap: clamp(24px, 4vw, 56px);
    align-items: start;
  }
}

/* ==========================================================================
   Trivium
   ========================================================================== */
.trivium {
  padding-top: clamp(88px, 12vw, 180px);
}
.trivium__intro {
  display: grid;
  gap: 24px;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.trivium__intro .lead {
  color: var(--on-dark-soft);
}

.trivium__pin {
  display: grid;
  gap: 28px;
  padding: 0 var(--gutter) clamp(72px, 10vw, 140px);
  max-width: var(--maxw);
  margin-inline: auto;
}

.trivium__index {
  position: relative;
  display: flex;
  gap: 4px;
  padding-bottom: 14px;
}
.trivium__tab {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px 8px 0;
  border: 0;
  background: none;
  color: var(--on-dark-soft);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.trivium__tab .roman {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
}
.trivium__tab.is-active,
.trivium__tab:hover {
  color: var(--on-dark);
}
.trivium__rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-dark);
  display: none;
}
.trivium__bar {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0.3333);
  transform-origin: left;
  transition: transform 0.9s var(--ease-io);
}

.trivium__stages {
  display: grid;
  gap: 72px;
}
.stage {
  display: grid;
  gap: 28px;
}
.stage__when {
  font-size: var(--fs-small);
  color: var(--gold-light);
  font-weight: 500;
}
.stage__name {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.stage__verb {
  font-family: var(--sans);
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--gold-light);
  font-weight: 500;
}
.stage__desc {
  margin-top: 18px;
  max-width: 30em;
  font-size: var(--fs-lead);
  color: var(--on-dark-soft);
  text-wrap: pretty;
}
.stage__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  background: var(--navy-deep);
}
.stage__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pinned viewer */
.motion .trivium__pin {
  position: relative;
  height: 100lvh;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding-top: calc(var(--nav-h) + 8px);
  padding-bottom: calc(var(--bar) + 16px);
}
/* room for the next section's rounded edge below the paused screen */
.motion .trivium__track {
  padding-bottom: var(--sheet-r);
}
/* state changes made off screen skip their transitions */
.trivium__pin.is-instant *,
.trivium__pin.is-instant *::before,
.trivium__pin.is-instant *::after {
  transition: none !important;
}
.motion .trivium__rail {
  display: block;
}
.motion .trivium__stages {
  gap: 0;
  min-height: 0;
}
.motion .stage {
  grid-area: 1 / 1;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 18px;
  min-height: 0;
  visibility: hidden;
  transition: visibility 0s linear 1s;
}
.motion .stage.is-active {
  z-index: 2;
  visibility: visible;
  transition-delay: 0s;
}
.motion .stage__media {
  order: -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 50% 50% 0 0 / 34% 34% 0 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1s var(--ease-io);
}
.motion .stage.is-active .stage__media {
  clip-path: inset(0 0 0 0);
}
.motion .stage__media img {
  transform: scale(1.18);
  transition: transform 1.6s var(--ease);
}
.motion .stage.is-active .stage__media img {
  transform: scale(1);
}
.motion .stage__text > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.motion .stage.is-active .stage__text > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 1s var(--ease);
}
.motion .stage.is-active .stage__text > :nth-child(1) { transition-delay: 0.25s; }
.motion .stage.is-active .stage__text > :nth-child(2) { transition-delay: 0.32s; }
.motion .stage.is-active .stage__text > :nth-child(3) { transition-delay: 0.4s; }
.motion .stage.is-active .stage__text > :nth-child(4) { transition-delay: 0.48s; }
.motion .stage__text {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 14px;
}
.motion .stage__when,
.motion .stage__desc {
  grid-column: 1 / -1;
  font-size: var(--fs-body);
}
.motion .stage__name {
  font-size: clamp(2.75rem, 12vw, 4.25rem);
}
.motion .stage__desc {
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.55;
}
@media (min-width: 900px) {
  .trivium__intro {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
    column-gap: 6vw;
  }
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    align-items: center;
    gap: 6vw;
  }
  .stage__media {
    order: 2;
    border-radius: var(--arch);
    aspect-ratio: 3 / 4;
  }
  .motion .trivium__pin {
    grid-template-rows: auto minmax(0, 1fr);
    padding-top: calc(var(--nav-h) + 20px);
    padding-bottom: 4vh;
    gap: 3vh;
  }
  .motion .trivium__index {
    max-width: 50%;
  }
  .motion .stage {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
  }
  .motion .stage__media {
    order: 2;
    width: auto;
    height: min(100%, 72vh);
    aspect-ratio: 3 / 4;
    border-radius: var(--arch);
  }
  .motion .stage__text {
    display: block;
  }
  .motion .stage__name {
    font-size: var(--fs-display);
  }
  .motion .stage__verb {
    margin-top: 6px;
  }
  .motion .stage__desc {
    margin-top: 28px;
    font-size: var(--fs-lead);
  }
}

/* ==========================================================================
   Programs
   ========================================================================== */
.paths {
  padding: clamp(96px, 13vw, 200px) 0 clamp(80px, 11vw, 160px);
}
.paths__title {
  max-width: 11em;
  color: var(--navy);
}
.paths__grid {
  display: grid;
  gap: 88px;
  margin-top: clamp(48px, 7vw, 96px);
}
.path {
  display: grid;
  gap: 28px;
}
.path__media {
  aspect-ratio: 4 / 5;
  background: #e6e0d2;
}
.path__media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  transform: translateY(calc(var(--pp, 0) * -5%));
  will-change: transform;
}
.path__age {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--gold-ink);
}
.path--kinder .path__age {
  color: var(--sage-ink);
}
.path__name {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.path__desc {
  margin-top: 16px;
  max-width: 32em;
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.levels {
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-light);
}
.levels li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
}
.levels__name {
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
}
.levels__note {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .paths__grid {
    grid-template-columns: 1fr 1fr;
    gap: 6vw;
    align-items: start;
  }
  .path--school {
    margin-top: 22vh;
  }
  .path {
    transform: translateY(calc(var(--py, 0) * 1px));
  }
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
  background: var(--night);
  color: var(--on-dark);
  padding: clamp(96px, 12vw, 160px) 0;
  margin-top: calc(-1 * var(--sheet-r));
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
}
.gallery__pin {
  position: relative;
}
.gallery__track {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 56px);
  padding: 0 var(--gutter) 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar {
  display: none;
}
.gallery__head {
  flex: 0 0 min(80vw, 520px);
  display: grid;
  gap: 20px;
  scroll-snap-align: start;
}
.gallery__head .lead {
  color: var(--on-dark-soft);
}
.shot {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
}
.shot__img {
  overflow: hidden;
  border-radius: 14px;
  background: var(--navy-deep);
}
.shot__img.arch {
  border-radius: var(--arch);
}
.shot__img img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
}
.shot--p .shot__img {
  height: min(56svh, 520px);
  aspect-ratio: 2 / 3;
}
.shot--l .shot__img {
  width: min(84vw, 760px);
  aspect-ratio: 3 / 2;
}
.shot--l .shot__img img {
  width: 100%;
}
.shot figcaption {
  max-width: 22em;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--on-dark-soft);
}
.gallery__rail {
  display: none;
}

.motion .gallery {
  padding: 0;
}
.motion .gallery__pin {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
}
.motion .gallery__track {
  height: 100%;
  width: max-content;
  padding: calc(var(--nav-h) + 12px) var(--gutter) calc(var(--bar) + 48px);
  overflow: visible;
  will-change: transform;
}
.motion .shot--high {
  align-self: flex-start;
  margin-top: 4svh;
}
.motion .shot--low {
  align-self: flex-end;
}
.motion .shot--p .shot__img {
  height: min(52svh, 64vh);
}
.motion .gallery__rail {
  display: block;
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--bar) + 24px);
  height: 1px;
  background: var(--line-dark);
}
.gallery__bar {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}

@media (min-width: 900px) {
  .gallery__head {
    flex-basis: min(34vw, 540px);
    margin-right: 4vw;
  }
  .shot--l .shot__img {
    width: min(48vw, 62vh * 1.5);
  }
  .motion .shot--p .shot__img {
    height: 60vh;
  }
  .motion .shot--l .shot__img {
    width: auto;
    height: 46vh;
  }
  .motion .shot--l .shot__img img {
    width: auto;
  }
}

/* ==========================================================================
   Parents
   ========================================================================== */
.parents {
  padding: clamp(96px, 13vw, 200px) 0 clamp(56px, 8vw, 110px);
}
.parents__title {
  color: var(--navy);
}
.parents__grid {
  display: grid;
  gap: 56px;
  margin-top: clamp(40px, 6vw, 88px);
}
.parents__head {
  display: grid;
  gap: 16px;
}
.parents__source {
  max-width: 34em;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.parents__source a {
  color: var(--navy);
  font-weight: 600;
  text-underline-offset: 3px;
}
.review {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line-light);
}
.review__pull {
  margin: 0;
}
.review__pull p {
  font-family: var(--serif);
  font-size: var(--fs-quote);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  text-wrap: pretty;
}
.review--lead .review__pull p {
  font-size: var(--fs-statement);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.review__author {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--gold-ink);
}
.review__more summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.review__more summary::-webkit-details-marker {
  display: none;
}
.review__more summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease), margin 0.35s var(--ease);
}
.review__more[open] summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}
.review__close,
.review__more[open] .review__open {
  display: none;
}
.review__more[open] .review__close {
  display: inline;
}
.review__full {
  display: grid;
  gap: 12px;
  padding: 10px 0 6px;
  max-width: 40em;
}
.review__full p {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink-soft);
}
@supports selector(::details-content) {
  .review__more {
    interpolate-size: allow-keywords;
  }
  .review__more::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.5s var(--ease), content-visibility 0.5s allow-discrete;
  }
  .review__more[open]::details-content {
    height: auto;
  }
}

@media (min-width: 900px) {
  .parents__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 3vw;
    row-gap: 72px;
  }
  .review--lead {
    grid-column: 1 / -1;
  }
  .parents__grid > .review:nth-of-type(2) {
    grid-column: 1 / span 6;
  }
  .parents__grid > .review:nth-of-type(3) {
    grid-column: 7 / span 6;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  background: var(--vellum);
  color: var(--ink);
  padding: clamp(56px, 8vw, 110px) 0 calc(clamp(96px, 12vw, 180px) + var(--sheet-r));
}
.faq__grid {
  display: grid;
  gap: 40px;
  padding-top: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--line-light);
}
.faq__head .h-section {
  color: var(--navy);
  max-width: 9em;
}
.faq__more {
  margin-top: 20px;
  color: var(--ink-soft);
}
.faq__more a {
  color: var(--navy);
  font-weight: 600;
  text-underline-offset: 3px;
}
.faq__list {
  border-top: 1px solid var(--line-light);
}
.faq details {
  border-bottom: 1px solid var(--line-light);
}
.faq summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--gold-ink);
  transition: transform 0.45s var(--ease);
}
.faq summary::after {
  transform: rotate(90deg);
}
.faq details[open] summary::after {
  transform: rotate(0deg);
}
.faq details p {
  max-width: 40em;
  padding: 0 0 26px;
  color: var(--ink-soft);
  font-size: var(--fs-body);
}
.faq details p a {
  color: var(--navy);
  font-weight: 600;
  text-underline-offset: 3px;
}
@supports selector(::details-content) {
  .faq details {
    interpolate-size: allow-keywords;
  }
  .faq details::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.5s var(--ease), content-visibility 0.5s allow-discrete;
  }
  .faq details[open]::details-content {
    height: auto;
  }
}

@media (min-width: 900px) {
  .faq__grid {
    grid-template-columns: 5fr 7fr;
    gap: 6vw;
  }
  .faq__head {
    position: sticky;
    top: 120px;
    align-self: start;
  }
}

/* ==========================================================================
   Enrollment
   ========================================================================== */
.enroll {
  padding: clamp(96px, 12vw, 180px) 0 clamp(96px, 12vw, 170px);
}
.enroll__grid {
  display: grid;
  gap: 56px;
}
.enroll__intro .lead {
  margin-top: 22px;
  color: var(--on-dark-soft);
}
.steps {
  counter-reset: step;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1;
  color: var(--gold);
}
.steps strong {
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.1;
}
.steps span {
  margin-top: 4px;
  font-size: var(--fs-small);
  color: var(--on-dark-soft);
}
.direct {
  display: grid;
  gap: 2px;
  margin-top: 40px;
  color: var(--on-dark-soft);
}
.direct__phone {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.1;
  color: var(--on-dark);
  text-decoration: none;
}
.direct__phone:hover {
  color: var(--gold-light);
}
.direct__who {
  font-size: var(--fs-small);
}
.direct__mail {
  margin-top: 10px;
  font-weight: 500;
  color: var(--on-dark);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.formcard {
  position: relative;
  margin-inline: calc(var(--gutter) * -0.5);
  padding: 28px 20px 24px;
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
}
.form {
  display: grid;
  gap: 30px;
  container: form / inline-size;
}
.form__title {
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.05;
  color: var(--navy);
}
.form__intro {
  margin-top: 8px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* Question groups */
.group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.group__title {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
}
.group__title + * {
  clear: both;
}
.group__num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
}
.group__title .optional {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 400;
}

/* Request type: full-width option cards with a radio mark */
.options {
  display: grid;
  gap: 8px;
}
.option,
.tile {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.option input,
.tile input,
.consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.option__body,
.tile__body {
  display: grid;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(1, 50, 109, 0.16);
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.option__body {
  grid-template-columns: 22px 1fr;
  column-gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 11px 14px;
}
.option__body::before {
  content: '';
  grid-row: span 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(1, 50, 109, 0.35);
  background: radial-gradient(circle, var(--navy) 0 5px, transparent 5.5px) center / 0 0 no-repeat;
  transition: box-shadow 0.3s var(--ease), background-size 0.3s var(--ease);
}
.option__title,
.tile__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.option__desc,
.tile__desc {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.option:active .option__body,
.tile:active .tile__body {
  transform: scale(0.98);
}
.option input:checked + .option__body,
.tile input:checked + .tile__body {
  background: #eef2f8;
  box-shadow: inset 0 0 0 2px var(--navy);
}
.option input:checked + .option__body::before {
  box-shadow: inset 0 0 0 2px var(--navy);
  background-size: 100% 100%;
}
.option input:focus-visible + .option__body,
.tile input:focus-visible + .tile__body,
.consent input:focus-visible + .consent__box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (hover: hover) {
  .option:hover .option__body,
  .tile:hover .tile__body {
    box-shadow: inset 0 0 0 1.5px rgba(1, 50, 109, 0.5);
  }
  .option:hover input:checked + .option__body,
  .tile:hover input:checked + .tile__body {
    box-shadow: inset 0 0 0 2px var(--navy);
  }
}

/* Level: one tile per row on narrow forms, two columns once the labels fit on a line */
.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@container form (min-width: 480px) {
  .tiles {
    grid-template-columns: 1fr 1fr;
  }
}
.tile__body {
  position: relative;
  align-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 36px 10px 14px;
}
.tile__body::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--navy)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23e4c766' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
}
.tile input:checked + .tile__body::after {
  opacity: 1;
  transform: scale(1);
}
.group.has-error .tile__body {
  box-shadow: inset 0 0 0 1.5px rgba(180, 35, 24, 0.55);
}
.group .field__error {
  margin-top: 10px;
}

/* Text fields */
.fields {
  display: grid;
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.field--after {
  margin-top: 14px;
}
.field > label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}
.optional {
  font-weight: 400;
  color: var(--ink-soft);
}
.form input[type='text'],
.form input[type='tel'],
.form input[type='email'],
.form input[type='number'],
.form textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(1, 50, 109, 0.18);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  transition: box-shadow 0.25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form textarea {
  resize: vertical;
  min-height: 100px;
}
.form input::placeholder,
.form textarea::placeholder {
  color: #9aa2b3;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--navy), 0 0 0 4px rgba(201, 162, 39, 0.3);
}
.field.has-error input,
.field.has-error textarea {
  box-shadow: inset 0 0 0 1.5px var(--error);
}
.field__error {
  font-size: var(--fs-label);
  color: var(--error);
}
.field__error:empty {
  display: none;
}

/* Consent */
.consent {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.consent__box {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(1, 50, 109, 0.35);
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.consent input:checked + .consent__box {
  background: var(--navy)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M7.5 13.5l3.5 3.5 7.5-8' fill='none' stroke='%23fbf9f3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  box-shadow: none;
}
.field.has-error .consent__box {
  box-shadow: inset 0 0 0 1.5px var(--error);
}
.consent__text {
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--ink-soft);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--error);
}
.form__status:empty {
  display: none;
}
.form__submit {
  min-height: 56px;
  font-size: 1rem;
}
.form__submit[aria-busy='true'] {
  pointer-events: none;
  opacity: 0.75;
}
.form__submit[aria-busy='true'] .form__submit-label::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.sent {
  display: none;
  text-align: center;
  padding: 40px 0 16px;
}
.sent:focus {
  outline: none;
}
.sent__crown {
  width: 96px;
  color: var(--gold-ink);
}
.sent__title {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.05;
  color: var(--navy);
}
.sent p {
  max-width: 26em;
  margin: 14px auto 28px;
  color: var(--ink-soft);
}
.sent p a {
  color: var(--navy);
  font-weight: 600;
}
.formcard.is-sent .form,
.formcard:has(.sent:target) .form {
  display: none;
}
.formcard.is-sent .sent,
.sent:target {
  display: block;
}
.formcard.is-sent .sent__crown,
.sent:target .sent__crown {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: crown-stroke 1.2s var(--ease-io) 0.15s forwards, crown-fill 0.6s var(--ease) 1s forwards;
}
.formcard.is-sent .sent__title,
.formcard.is-sent .sent p,
.formcard.is-sent .sent__again {
  animation: rise 0.9s var(--ease) both;
}
.formcard.is-sent .sent p { animation-delay: 0.1s; }
.formcard.is-sent .sent__again { animation-delay: 0.2s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}
.nojs-error {
  display: none;
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--error);
}
.nojs-error:target {
  display: block;
}
.js .sent__again {
  display: inline-flex;
}
.no-js .sent__again {
  display: none;
}

@media (min-width: 640px) {
  .formcard {
    margin-inline: 0;
    padding: clamp(28px, 3.4vw, 44px);
  }
}
/* Inner layout follows the card's own width, not the screen's */
@container form (min-width: 480px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }
  .fields .field[data-field='name'],
  .field--wide {
    grid-column: 1 / -1;
  }
  .donate .fields .field[data-field='name'] {
    grid-column: auto; /* name and e-mail side by side */
  }
}
@container form (min-width: 660px) {
  .options {
    grid-template-columns: repeat(3, 1fr);
  }
  .option__body {
    grid-template-columns: 1fr;
    align-content: start;
    row-gap: 4px;
    min-height: 0;
    height: 100%;
    padding: 16px;
  }
  .option__body::before {
    grid-row: auto;
    margin-bottom: 8px;
  }
  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1000px) {
  .enroll__grid {
    grid-template-columns: 5fr 7fr;
    gap: 6vw;
    align-items: start;
  }
  .enroll__intro {
    position: sticky;
    top: 110px;
  }
}

/* ==========================================================================
   Support: donations through Stripe Checkout
   ========================================================================== */
.support {
  padding: clamp(80px, 10vw, 150px) 0 calc(clamp(80px, 10vw, 140px) + var(--sheet-r));
}
.support__grid {
  display: grid;
  gap: 44px;
}
.support__intro .lead {
  margin-top: 22px;
  color: var(--ink-soft);
}
.support__note {
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.support__note a {
  color: var(--navy);
}
.donate {
  gap: 24px;
  padding: 28px 20px 24px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-light);
}
.donate__group {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.donate__label {
  padding: 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(1, 50, 109, 0.25);
  font-weight: 600;
  color: var(--navy);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.choice input:checked + span {
  background: var(--navy);
  color: var(--vellum);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.choice input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (hover: hover) {
  .choice:hover input:not(:checked) + span {
    box-shadow: inset 0 0 0 1.5px rgba(1, 50, 109, 0.55);
  }
}
/* The free-amount field is shown by script; without JavaScript it is always visible */
.js .donate__custom:not(.is-open) {
  display: none;
}
.donate__hint {
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--ink-soft);
}
.donate__secure {
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}
.donate__manage {
  margin-top: -8px;
  font-size: var(--fs-label);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
}
.donate__manage a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.donate__result {
  padding: 14px 18px;
  border-radius: 14px;
  background: #eef2f8;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.5;
}
.donate__result[data-kind='anulata'],
.donate__result[data-kind='eroare'] {
  background: #fbeeec;
  color: var(--error);
}
@media (min-width: 1000px) {
  .support__grid {
    grid-template-columns: 5fr 7fr;
    gap: 6vw;
    align-items: start;
  }
  .donate {
    padding: clamp(28px, 3.4vw, 44px);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  z-index: 10;
  margin-top: calc(-1 * var(--sheet-r));
  padding: clamp(64px, 9vw, 140px) 0 max(28px, env(safe-area-inset-bottom));
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  background: var(--night);
  color: var(--on-dark-soft);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 24px;
  font-size: var(--fs-small);
}
.footer__grid a {
  color: var(--on-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer__grid a:hover {
  color: var(--gold-light);
}
.footer__brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--on-dark);
  font-family: var(--serif);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.1;
}
.footer__motto {
  display: inline-block;
  margin-top: 4px;
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}
.footer__crown {
  width: 60px;
  color: var(--gold);
}
.footer__label {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--gold);
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-label);
}
.footer__accred {
  font-weight: 600;
  color: var(--on-dark);
}

@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: 1.3fr repeat(3, 1fr);
    align-items: start;
  }
  .footer__brand {
    grid-column: auto;
  }
}

/* ==========================================================================
   Reduced motion: everything readable, nothing pinned
   ========================================================================== */
@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;
  }
}
