/* ==========================================================================
   J Academy — styles.css
   Palette: deep navy + warm paper + restrained gold accent
   Type: Source Serif 4 (display serif) + Inter (body sans), self-hosted
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/SourceSerif4-var.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/Inter-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --navy-900: #0B1A2C;
  --navy-800: #0F2239;
  --navy-700: #16304F;
  --navy-600: #1E3D63;
  --ink: #1B2635;
  --muted: #5A6577;
  --paper: #FAF9F5;
  --white: #FFFFFF;
  --tint: #F2EFE7;
  --line: rgba(27, 38, 53, 0.12);
  --line-soft: rgba(27, 38, 53, 0.08);
  --gold-600: #8C6B21;
  --gold-500: #B08A38;
  --gold-400: #D5AE63;
  --gold-300: #E5C98E;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(11, 26, 44, 0.06), 0 2px 8px rgba(11, 26, 44, 0.05);
  --shadow-md: 0 2px 6px rgba(11, 26, 44, 0.07), 0 12px 32px rgba(11, 26, 44, 0.10);
  --shadow-lg: 0 4px 12px rgba(11, 26, 44, 0.10), 0 24px 56px rgba(11, 26, 44, 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* keep anchor targets clear of the sticky header */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--gold-400);
  color: var(--navy-900);
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-600); }

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

.container {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
}

/* Keyboard users can jump straight past the header */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.65rem 1.2rem;
  background: var(--navy-800);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
}

.container-narrow { max-width: 780px; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin: 0 0 0.875rem;
}

.eyebrow-light { color: var(--gold-400); }

.section-title,
.hero-title,
.page-title,
.cta-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.5rem, 1.14rem + 1.8vw, 2.5rem);
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 42rem;
}

/* Avoid single-word orphan lines in short runs of body copy */
.section-sub,
.card-text,
.step-text,
.info-text,
.faq-item p,
.quote-card blockquote { text-wrap: pretty; }

.section-head { max-width: 46rem; margin-bottom: 3rem; }

/* small gold rule before section eyebrows — quiet visual anchor */
.section-head .eyebrow::before,
.split-copy .eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-400);
  margin-right: 0.6rem;
  vertical-align: middle;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-700);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--gold-400);
  color: var(--navy-900);
}
.btn-gold:hover {
  background: var(--gold-300);
  color: var(--navy-900);
  box-shadow: 0 12px 32px rgba(213, 174, 99, 0.35);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  background: transparent;
}
.btn-ghost-light:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 4px 20px rgba(11, 26, 44, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark { border-radius: 9px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.25rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (home) ---------- */

.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(213, 174, 99, 0.13), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(30, 61, 99, 0.55), transparent 55%),
    var(--navy-800);
  color: var(--white);
  padding-block: clamp(4rem, 3rem + 4vw, 7rem) clamp(3rem, 2.5rem + 2vw, 4.5rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
}

.hero-title {
  font-size: clamp(1.95rem, 1.2rem + 3.75vw, 4rem);
  margin-bottom: 1.25rem;
}

.accent-underline {
  position: relative;
  white-space: nowrap;
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.14em;
  background: var(--gold-400);
  border-radius: 999px;
  transform-origin: left;
  animation: underline-grow 0.9s var(--ease) 0.5s backwards;
}

@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hero-sub {
  font-size: clamp(1rem, 0.93rem + 0.5vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Essay-card visual */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.essay-card {
  position: relative;
  width: min(100%, 420px);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem 2rem;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
  animation: card-float 7s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: rotate(1.5deg) translateY(0); }
  50% { transform: rotate(1.5deg) translateY(-10px); }
}

.essay-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.essay-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-400);
}

.essay-doc {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.essay-text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.essay-text mark {
  background: linear-gradient(transparent 55%, rgba(213, 174, 99, 0.55) 55%);
  color: inherit;
  padding-inline: 1px;
}

.essay-skeleton {
  display: grid;
  gap: 0.6rem;
}

.essay-skeleton span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: var(--tint);
}

.note-chip {
  position: absolute;
  background: var(--navy-800);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.note-chip-a {
  max-width: 240px;
  right: -1.25rem;
  bottom: 2.75rem;
  animation: chip-float 6s ease-in-out 0.8s infinite;
}

.note-chip-b {
  left: -1rem;
  top: -1rem;
  background: var(--gold-400);
  color: var(--navy-900);
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: chip-float 5.2s ease-in-out 0.3s infinite;
}

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Hero stats */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(3rem, 2.5rem + 2vw, 4.5rem);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stat {
  background: rgba(255, 255, 255, 0.045);
  padding: 1.5rem 1.75rem;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.5rem + 1.4vw, 2.6rem);
  font-weight: 600;
  color: var(--gold-300);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(213, 174, 99, 0.12), transparent 60%),
    var(--navy-800);
  color: var(--white);
  padding-block: clamp(3.5rem, 3rem + 3vw, 5.5rem);
}

.page-title {
  font-size: clamp(1.8rem, 1.22rem + 2.9vw, 3.4rem);
  margin-bottom: 1rem;
}

.page-sub {
  font-size: clamp(0.98rem, 0.9rem + 0.5vw, 1.1rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 38rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4rem, 3rem + 4vw, 6.5rem);
}

.section-tinted {
  background: var(--tint);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.85rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(176, 138, 56, 0.35);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(213, 174, 99, 0.16);
  color: var(--gold-600);
  margin-bottom: 1.15rem;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  background: rgba(213, 174, 99, 0.26);
}

.card-icon svg { width: 24px; height: 24px; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Program cards */

.program-card {
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.program-card:hover::before { transform: scaleX(1); }

.program-years {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-600);
  background: rgba(213, 174, 99, 0.16);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  margin: 0 0 1.1rem;
}

.check-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 0.6rem;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  font-size: 0.95rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(213, 174, 99, 0.22)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C6B21' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 9px no-repeat;
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  counter-reset: step;
}

.steps-4 { grid-template-columns: repeat(4, 1fr); }

.step { position: relative; }

/* On wide screens a dashed thread links each step number to the next */
@media (min-width: 1001px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 21px;
    left: 58px;
    right: 8px;
    border-top: 2px dashed rgba(176, 138, 56, 0.4);
  }
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Testimonials ---------- */

/* Masonry: quotes run different lengths, so cards stack at natural height
   in CSS columns instead of stretching to equal-height grid rows. */
.quote-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.quote-card {
  margin: 0 0 1.5rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.quote-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.quote-card blockquote {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  flex: 1;
}

.quote-card blockquote::before {
  content: "“";
  content: "“" / "";
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 0.6;
  color: var(--gold-400);
  margin-bottom: 0.75rem;
}

.quote-card figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-600);
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

/* Year + school byline under the student's name */
.quote-school {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

/* Pull quote (about page) */

.pull-quote-band {
  background: var(--tint);
  padding-block: clamp(3.5rem, 3rem + 2.5vw, 5.5rem);
}

.pull-quote {
  margin: 0 auto;
  max-width: 820px;
  text-align: center;
}

.pull-quote blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1.3vw, 2rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--navy-800);
}

.pull-quote figcaption {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-600);
}

/* ---------- Split layout (about) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  align-items: start;
}

.split-copy .section-title { margin-bottom: 1.5rem; }
.split-copy p { color: var(--muted); font-size: 1.02rem; }
.split-copy p:first-of-type { color: var(--ink); }

.fact-card {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 6rem;
}

.fact-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-300);
  margin-bottom: 1.25rem;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.fact-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
}

.fact-list li strong { color: var(--white); }

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
}

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(800px 400px at 15% 120%, rgba(213, 174, 99, 0.14), transparent 60%),
    var(--navy-800);
  color: var(--white);
  padding-block: clamp(4rem, 3rem + 3vw, 6rem);
  text-align: center;
}

.cta-title {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.6rem);
  max-width: 40rem;
  margin: 0 auto 1rem;
}

.cta-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1.25rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.info-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.info-text {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.info-link { font-weight: 600; font-size: 0.95rem; }

.hours-list {
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.4rem;
}

.hours-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 0.4rem;
}

.hours-list div:last-child { border-bottom: none; padding-bottom: 0; }
.hours-list dt { font-weight: 600; }
.hours-list dd { margin: 0; color: var(--muted); }

/* Form */

.contact-form {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.25rem + 1.5vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-field { margin-bottom: 1.1rem; }

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-field .optional {
  font-weight: 400;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea { resize: vertical; min-height: 120px; }

/* Native select arrow replaced with a chevron that matches the inputs */
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6577' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  padding-right: 2.6rem;
  cursor: pointer;
}

/* "Select a year" reads as a placeholder until a real choice is made */
.form-field select:invalid { color: var(--muted); }
.form-field select option { color: var(--ink); }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(176, 138, 56, 0.18);
}

/* Flag fields the visitor has left invalid (after interacting, not on load) */
.form-field input:user-invalid,
.form-field select:user-invalid,
.form-field textarea:user-invalid {
  border-color: #C0453E;
}

.form-note {
  font-size: 0.83rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-600);
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.2em;
}

/* Map */

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  background: var(--tint);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* FAQ */

.faq { display: grid; gap: 0.85rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-item[open] { border-color: rgba(176, 138, 56, 0.4); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 3rem 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  transition: background-color 0.2s ease;
}

.faq-item summary:hover { background: rgba(213, 174, 99, 0.08); }

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  content: "+" / "";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold-600);
  transition: transform 0.3s var(--ease);
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item p {
  padding: 0 1.4rem 1.25rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-item[open] p { animation: faq-in 0.3s var(--ease); }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
}

/* Where the browser can animate to `height: auto`, glide answers open and
   closed instead of snapping (the keyframe above stays as the fallback) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }

  .faq-item::details-content {
    opacity: 0;
    block-size: 0;
    overflow-y: clip;
    transition: content-visibility 0.35s allow-discrete,
                opacity 0.35s var(--ease),
                block-size 0.35s var(--ease);
  }

  .faq-item[open]::details-content {
    opacity: 1;
    block-size: auto;
  }

  .faq-item[open] p { animation: none; }
}

/* ---------- Error page (404) ---------- */

.error-hero {
  text-align: center;
  padding-block: clamp(5rem, 4rem + 5vw, 9rem);
}

.error-code {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 3rem + 8vw, 7.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-300);
  margin-bottom: 1rem;
}

.error-hero .page-sub { margin-inline: auto; margin-bottom: 2rem; }

.error-hero .cta-actions { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr 1fr;
  gap: 2.5rem;
  padding-block: 4rem 3rem;
}

.brand-footer { color: var(--white); }
.brand-footer .brand-name { color: var(--white); }

.footer-blurb {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 20rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1.1rem;
}

.footer-col { display: grid; gap: 0.55rem; align-content: start; }

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--gold-300); }

.footer-col p { margin: 0; font-size: 0.95rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 1.4rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p { margin: 0; }

/* ---------- Background doodles ----------
   Detailed hand-drawn line-art illustrations (assets/doodle-*.svg).
   js/doodles.js injects them into each .doodled section as .bg-doodle
   elements and drifts them on scroll (parallax). Rendered as CSS masks so
   the same artwork shows in ink on light sections and white on navy. */

.doodled { position: relative; overflow: hidden; }
.doodled > .container,
.doodled > .auth-card { position: relative; }

.bg-doodle {
  position: absolute;
  pointer-events: none;
  background-color: var(--ink);
  opacity: 0.1;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  will-change: transform;
}

.bg-doodle.is-white { background-color: var(--white); opacity: 0.14; }

@media (max-width: 640px) {
  .bg-doodle { display: none; }
  .bg-doodle.keep-mobile { display: block; }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* No-JS fallback: keep everything visible */
.no-observer .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .quote-grid { columns: 2; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { justify-content: flex-start; padding-inline: 1rem; margin-top: 0.5rem; }
  .essay-card { width: min(100%, 400px); }
  .note-chip-a { right: -0.5rem; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .split { grid-template-columns: 1fr; }
  .fact-card { position: static; }
  .contact-grid { grid-template-columns: 1fr; }

  /* Testimonials become an edge-to-edge swipeable carousel */
  .quote-grid {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -1.25rem;
    padding-inline: 1.25rem;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
  }

  .quote-grid::-webkit-scrollbar { display: none; }

  .quote-card {
    flex: 0 0 min(82%, 340px);
    scroll-snap-align: center;
    margin: 0;
  }

  /* cards entering from the side shouldn't lag behind a stagger delay */
  .quote-grid .reveal { transition-delay: 0s !important; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 24px 40px rgba(11, 26, 44, 0.12);
    padding: 0.5rem 1.25rem 1.25rem;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav .nav-link {
    padding: 0.9rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-soft);
  }

  .site-nav .nav-link::after { display: none; }
  .site-nav .nav-link.is-active { color: var(--gold-600); }

  .nav-cta { margin-top: 1rem; width: 100%; }
}

@media (max-width: 640px) {
  /* Tighter vertical rhythm — mobile pages shouldn't scroll forever */
  .section { padding-block: 3.25rem; }
  .section-head { margin-bottom: 2rem; }
  .card-grid { gap: 0.9rem; }
  .card-grid-4 { grid-template-columns: 1fr; }
  .steps-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .map-wrap iframe { height: 320px; }

  /* Subtler reveal motion on small screens */
  .reveal { transform: translateY(14px); }

  /* Hero: compact card, stacked full-width actions */
  .hero-actions .btn,
  .cta-actions .btn { width: 100%; }
  .essay-card { transform: none; animation: none; padding: 1.4rem 1.4rem 1.6rem; }
  .essay-skeleton { display: none; }
  .note-chip-a { position: static; margin-top: 1rem; max-width: none; }

  /* Hero stats: three compact rows instead of three tall cards */
  .hero-stats { grid-template-columns: 1fr; margin-top: 2.5rem; }
  .stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
  }
  .stat-value { font-size: 1.25rem; margin-bottom: 0; min-width: 4.2rem; }
  .stat-label { font-size: 0.82rem; }

  /* Feature/tutor/info cards: icon beside text, not above it */
  .card-grid-4 .card,
  .card-grid-3 .card:not(.program-card),
  .info-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 0.9rem;
    align-items: start;
    padding: 1.05rem 1rem;
  }
  .card-grid-4 .card .card-icon,
  .card-grid-3 .card:not(.program-card) .card-icon,
  .info-card .card-icon {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }
  .card-text { font-size: 0.88rem; }
  .card-icon svg { width: 20px; height: 20px; }
  .card-grid-4 .card .card-title,
  .card-grid-3 .card:not(.program-card) .card-title { font-size: 1rem; margin-bottom: 0.25rem; }
  .info-card .info-title { font-size: 1rem; }
  .info-card .info-text { font-size: 0.88rem; }
  .info-card > *:not(.card-icon) { grid-column: 2; }

  /* Steps: number beside text */
  .steps { gap: 1.4rem; }
  .step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 1rem;
    align-items: start;
  }
  .step-num { grid-row: 1 / span 2; width: 36px; height: 36px; font-size: 0.95rem; margin-bottom: 0; }
  .step-title { font-size: 1rem; margin-bottom: 0.25rem; }
  .step-text { font-size: 0.88rem; }
  .step-text, .step-title { grid-column: 2; }

  /* Program cards: tighter internals */
  .program-card { padding: 1.2rem 1.1rem; }
  .program-card .card-title { font-size: 1.1rem; }
  .check-list { gap: 0.4rem; padding-top: 0.9rem; margin-top: 0.9rem; }
  .check-list li { font-size: 0.88rem; }
  .program-years { font-size: 0.72rem; padding: 0.25rem 0.7rem; margin-bottom: 0.85rem; }

  /* Quote cards: smaller type in the carousel */
  .quote-card { padding: 1.3rem; }
  .quote-card blockquote { font-size: 0.9rem; }
  .quote-card blockquote::before { font-size: 2.1rem; }

  /* Slightly quieter labels and body copy */
  .eyebrow { font-size: 0.75rem; }
  .section-sub { font-size: 0.95rem; }
  .split-copy p { font-size: 0.95rem; }
  .fact-card { padding: 1.5rem 1.35rem; }
  .fact-list li { font-size: 0.88rem; }
  .footer-blurb, .footer-col a, .footer-col p { font-size: 0.88rem; }

  /* Doodles: smaller, secondary ones hidden */

  /* Forms: 16px inputs so iOS doesn't zoom on focus */
  .form-field input,
  .form-field select,
  .form-field textarea { font-size: 1rem; }

  /* Footer: brand full-width, link columns side by side */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; padding-block: 3rem 2.25rem; }
  .footer-brand { grid-column: 1 / -1; }

  /* Header: slightly slimmer */
  .header-inner { padding-block: 0.7rem; }
  .brand-name { font-size: 1.25rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
