/* ============================================================
   VANTAGE PREP — Premium tutoring
   Ivy-League editorial, modern & playful
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..600&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Design tokens ---- */
:root {
  /* Brand neutrals */
  --cream:      #FBF9F3;
  --cream-2:    #F3EDE0;
  --cream-3:    #EAE2D1;
  --ink:        #16130D;
  --ink-soft:   #5A5347;
  --ink-faint:  #8C8474;

  /* Brand */
  --ivy:        #154032;   /* deep ivy green */
  --ivy-2:      #1E5C46;
  --gold:       #C19A4B;   /* warm prestige gold */

  /* Per-school accents */
  --princeton:  #E77500;   /* Princeton orange */
  --duke:       #012169;   /* Duke royal blue */
  --yale:       #0F4D92;   /* Yale blue */

  /* Semantic */
  --bg:         var(--cream);
  --surface:    #FFFFFF;
  --text:       var(--ink);
  --text-soft:  var(--ink-soft);
  --border:     rgba(22,19,13,0.10);
  --accent:     var(--ivy);

  /* Type scale (fluid) */
  --step--1: clamp(0.83rem, 0.78rem + 0.2vw, 0.94rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-4:  clamp(3rem, 1.8rem + 6vw, 7rem);

  /* Spacing */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1240px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(22,19,13,0.06), 0 2px 8px rgba(22,19,13,0.04);
  --shadow-md: 0 8px 24px rgba(22,19,13,0.08), 0 2px 6px rgba(22,19,13,0.05);
  --shadow-lg: 0 30px 60px -20px rgba(22,19,13,0.22), 0 12px 24px -12px rgba(22,19,13,0.12);
  --radius: 18px;
  --radius-lg: 26px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---- Paper grain texture (very subtle, premium) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivy-2);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.serif {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}
.nav.scrolled {
  background: rgba(251,249,243,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--border);
  padding: 0.7rem 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand__mark {
  width: 76px; height: 76px;
  flex: none;
  object-fit: contain;
  mix-blend-mode: multiply;   /* melts the crest's light backdrop into the page */
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out);
}
.nav.scrolled .brand__mark { width: 56px; height: 56px; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: color 0.25s var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--ivy);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 760px) { .nav__links .nav__link { display: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease-out), background 0.3s var(--ease-out);
  will-change: transform;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn--primary {
  background: var(--ivy);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--ivy-2); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn--primary .btn__arrow { transition: transform 0.4s var(--spring); }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 2rem; font-size: var(--step-0); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

/* floating ambient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.orb--1 { width: 480px; height: 480px; background: radial-gradient(circle, rgba(30,92,70,0.35), transparent 70%); top: -120px; right: -80px; animation: float1 18s ease-in-out infinite; }
.orb--2 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(193,154,75,0.30), transparent 70%); bottom: -100px; left: -60px; animation: float2 22s ease-in-out infinite; }
.orb--3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(231,117,0,0.16), transparent 70%); top: 40%; left: 45%; animation: float1 26s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,40px) scale(1.08); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px,-30px) scale(1.12); } }

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  width: 100%;
}
@media (max-width: 920px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__title {
  font-size: var(--step-4);
  margin: 1.5rem 0;
}
.hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 80, "WONK" 1;
  color: var(--ivy);
}
.hero__title .uline { position: relative; }
/* hand-drawn underline under just the "vantage" of advantage */
.hero__title .uline::after {
  content: "";
  position: absolute;
  left: -2%; bottom: 0.02em;
  width: 104%; height: 0.32em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13 Q75 4 150 9 T297 7' stroke='%23C19A4B' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
}
.hero.in .hero__title .uline::after {
  animation: draw 0.9s 1.1s var(--ease-out) forwards;
}
@keyframes draw { to { transform: scaleX(1); } }

.hero__lede {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 34ch;
  margin-bottom: 2.25rem;
  line-height: 1.55;
}
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* hero stat rail */
.hero__stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat__num { font-family: 'Fraunces', serif; font-size: var(--step-2); font-weight: 500; line-height: 1; }
.stat__label { font-size: var(--step--1); color: var(--text-soft); margin-top: 0.35rem; }

/* Hero visual: interactive subject explorer */
.hero__visual { position: relative; }
.explorer {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.explorer__eyebrow {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 1rem;
}
.explorer__list { display: flex; flex-direction: column; gap: 0.5rem; }
.subject {
  display: flex; align-items: center; gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  text-align: left;
  color: var(--ink);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--spring);
}
.subject__ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--cream-2);
  color: var(--ink-soft);
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.subject__ico svg { width: 21px; height: 21px; }
.subject__label { font-weight: 600; font-size: var(--step-0); flex: 1; }
.subject__arrow {
  font-size: 1.1rem; color: var(--ivy);
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--spring);
}
.subject:hover { background: var(--cream); transform: translateX(2px); }
.subject.is-active {
  background: color-mix(in srgb, var(--ivy) 9%, #fff);
  border-color: color-mix(in srgb, var(--ivy) 22%, transparent);
}
.subject.is-active .subject__ico { background: var(--ivy); color: #fff; }
.subject.is-active .subject__arrow { opacity: 1; transform: none; }

.explorer__detail { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.explorer__text {
  font-size: var(--step-0); color: var(--text-soft); line-height: 1.55;
  min-height: 3.4em; margin-bottom: 1rem;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.explorer__text.is-swapping { opacity: 0; transform: translateY(6px); }
.explorer__cta { width: 100%; justify-content: center; }
@media (max-width: 920px) { .hero__visual { margin-top: 1.5rem; } }

/* ---- Marquee of schools ---- */
.marquee {
  position: relative;
  z-index: 2;
  margin-top: 2.5rem;
  padding: 1.1rem 0;
  border-block: 1px solid var(--border);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: scroll-x 28s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.marquee__item {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink-faint);
  white-space: nowrap;
}
.marquee__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ============================================================
   TUTORS
   ============================================================ */
.tutors { padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.tutors .section-head { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: var(--step-3); margin: 1rem 0 0.75rem; }
.section-head p { font-size: var(--step-1); color: var(--text-soft); }

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) { .tutor-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.tutor {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  transform-style: preserve-3d;
}
.tutor::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), color-mix(in srgb, var(--c) 14%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.tutor:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.tutor:hover::before { opacity: 1; }

.tutor__photo {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 22%, var(--cream-2)), var(--cream-3));
  display: flex; align-items: flex-end; justify-content: center;
}
.tutor__photo img { width: 100%; height: 100%; object-fit: cover; }
.tutor__img { object-position: 50% 22%; transition: transform 0.6s var(--ease-out); }
.tutor:hover .tutor__img { transform: scale(1.04); }
/* placeholder initials when no headshot yet */
.tutor__initials {
  font-family: 'Fraunces', serif;
  font-size: 4.5rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--c) 60%, var(--ink));
  opacity: 0.4;
  align-self: center;
}
.tutor__logo {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  height: 56px; width: 56px;
  display: flex; align-items: center; justify-content: center;
  /* soft shadow so the mark stays legible on any part of the photo */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.tutor__logo img, .tutor__logo svg { width: 100%; height: 100%; object-fit: contain; }

.tutor__body { padding-top: 1.25rem; }
.tutor__name { font-family: 'Fraunces', serif; font-size: 1.55rem; font-weight: 600; }
.tutor__school {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--step--1); font-weight: 600;
  color: var(--c);
  margin-top: 0.25rem;
}
.tutor__bio { color: var(--text-soft); font-size: var(--step--1); margin-top: 0.85rem; line-height: 1.6; }
.tutor__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.32rem 0.7rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--c) 10%, var(--cream));
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
}
.tutor__bar { height: 4px; border-radius: 4px; background: var(--c); width: 0; margin-top: 1.25rem; transition: width 0.9s var(--ease-out) 0.2s; }
.tutor.in .tutor__bar { width: 56px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* hero entrance words */
.line-mask { display: block; overflow: hidden; }
.line-mask > span { display: block; transform: translateY(110%); transition: transform 0.9s var(--ease-out); }
.hero.in .line-mask > span { transform: none; }
.hero.in .line-mask:nth-child(2) > span { transition-delay: 0.12s; }
.hero.in .line-mask:nth-child(3) > span { transition-delay: 0.24s; }
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.hero.in .fade-up { opacity: 1; transform: none; }
.hero.in .fade-up.d1 { transition-delay: 0.5s; }
.hero.in .fade-up.d2 { transition-delay: 0.65s; }
.hero.in .fade-up.d3 { transition-delay: 0.8s; }

/* gold button variant (for dark CTA band) */
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-md); }
.btn--gold:hover { background: #d4ab57; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--gold .btn__arrow { transition: transform 0.4s var(--spring); }
.btn--gold:hover .btn__arrow { transform: translateX(4px); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.approach { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--cream-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.step {
  position: relative;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step__num {
  font-size: 3rem; font-weight: 400; line-height: 1;
  color: var(--gold);
  display: block; margin-bottom: 1rem;
}
.step__title { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.6rem; }
.step p { color: var(--text-soft); font-size: var(--step--1); line-height: 1.6; }

/* ============================================================
   RESULTS
   ============================================================ */
.results { padding: clamp(4rem, 9vw, 8rem) 0; }
.results__band {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--ivy);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
}
@media (max-width: 700px) { .results__band { grid-template-columns: 1fr; gap: 2rem; } }
.rstat__num { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; line-height: 1; color: var(--gold); }
.rstat__label { font-size: var(--step--1); margin-top: 0.5rem; color: rgba(255,255,255,0.78); }

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (max-width: 700px) { .quotes { grid-template-columns: 1fr; } }
.quote {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.quote::before {
  content: "\201C";
  font-family: 'Fraunces', serif;
  font-size: 4rem; line-height: 1;
  color: var(--gold);
  position: absolute; top: 0.5rem; left: 1.25rem; opacity: 0.5;
}
.quote blockquote { font-family: 'Fraunces', serif; font-size: var(--step-1); line-height: 1.4; margin: 1rem 0 1.25rem; }
.quote figcaption { font-size: var(--step--1); color: var(--text-soft); font-weight: 600; }
.results__note { text-align: center; margin-top: 1.5rem; font-size: 0.78rem; color: var(--ink-faint); }

/* ============================================================
   CLOSING CTA BAND
   ============================================================ */
.cta-band { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.cta-band__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 2rem;
  background: linear-gradient(135deg, var(--ivy), var(--ivy-2));
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
  position: relative; overflow: hidden;
}
.cta-band__inner::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(193,154,75,0.35), transparent 70%);
  pointer-events: none;
}
.cta-band__copy h2 { font-size: var(--step-3); line-height: 1.05; }
.cta-band__copy p { color: rgba(255,255,255,0.8); margin-top: 0.85rem; max-width: 38ch; }
.cta-band__action { display: flex; flex-direction: column; align-items: flex-start; gap: 0.85rem; position: relative; z-index: 1; }
.cta-band__rea { font-size: var(--step--1); color: rgba(255,255,255,0.7); }

/* ============================================================
   LEAD FORM MODAL
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 1.25rem;
  visibility: hidden;
}
.modal.open { visibility: visible; }
.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(16,13,9,0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.modal.open .modal__scrim { opacity: 1; }
.modal__card {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 0.5s var(--spring), opacity 0.4s var(--ease-out);
  max-height: 92svh; overflow-y: auto;
}
.modal.open .modal__card { transform: none; opacity: 1; }
.modal__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-soft);
  transition: background 0.25s, transform 0.25s;
}
.modal__close:hover { background: var(--cream-2); transform: rotate(90deg); }
.modal h3 { font-family: 'Fraunces', serif; font-size: var(--step-2); font-weight: 600; }
.modal p.sub { color: var(--text-soft); margin: 0.4rem 0 1.5rem; font-size: var(--step--1); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 0.4rem; }
.field label .req { color: var(--princeton); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit; font-size: var(--step--1);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ivy);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ivy) 14%, transparent);
}
.field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.field.row .field { margin: 0; }
.field .error { color: #C0392B; font-size: 0.78rem; margin-top: 0.3rem; display: none; }
.field.invalid input, .field.invalid select { border-color: #C0392B; }
.field.invalid .error { display: block; }
.modal .btn--primary { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* success state */
.modal__success { display: none; text-align: center; padding: 1rem 0; }
.modal__success.show { display: block; animation: pop 0.5s var(--spring); }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.success-check {
  width: 64px; height: 64px; margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ivy) 14%, transparent);
  display: grid; place-items: center; color: var(--ivy);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 3.5rem 0; border-top: 1px solid var(--border); margin-top: 2rem; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.footer__crest { width: 128px; height: 128px; object-fit: contain; mix-blend-mode: multiply; }
.footer small { color: var(--text-soft); font-size: var(--step--1); max-width: 52ch; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .fade-up { opacity: 1 !important; transform: none !important; }
  .line-mask > span { transform: none !important; }
  .hero__title .uline::after { transform: scaleX(1) !important; }
}
