/* =================================================================
   Essay Model Schools — Site Stylesheet
   Design system carried over from the holding page:
   serif Playfair Display + Inter, cream canvas, gold + charcoal.
   ================================================================= */

:root {
  --cream:      #fafaf8;
  --paper:      #ffffff;
  --ink:        #1a1a1a;
  --ink-soft:   #444;
  --muted:      #6b6b6b;
  --faint:      #9a9a9a;
  --line:       #ece8df;
  --line-2:     #e0d9ca;

  --gold:       #9a7c3f;   /* deep brass — text accents */
  --gold-lt:    #c8a84b;   /* bright gold — rules, dots */
  --gold-wash:  #f3eee2;

  --green:      #2f5d3a;   /* drawn from the school's green façade */
  --green-deep: #234a2c;

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  --wrap: 1180px;
  --shadow-sm: 0 2px 14px rgba(20,20,20,.06);
  --shadow-md: 0 14px 40px rgba(20,20,20,.10);
}

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

ul, ol { list-style: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }

/* ---- Type helpers ---- */
.serif { font-family: var(--serif); }
.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.on-dark { color: var(--gold-lt); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.2; }

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  margin-top: 14px;
}
.section-title em { font-style: italic; color: var(--gold); font-weight: 400; }

.lead {
  font-size: 1.04rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.85;
}

.rule {
  width: 46px; height: 1px;
  background: var(--gold-lt);
  margin: 22px 0;
}
.rule.center { margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--gold); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost.on-dark { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost.on-dark:hover { border-color: var(--gold-lt); color: var(--gold-lt); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* =================================================================
   NAVBAR
   ================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s, background .25s;
}
/* lifts off the page once you scroll past the header */
.nav.scrolled {
  background: rgba(250,250,248,.94);
  box-shadow: 0 1px 20px rgba(20,20,20,.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
}

/* ---- brand lockup ---- */
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: auto; height: 56px; object-fit: contain; }
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.brand-text .name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.05;
  white-space: nowrap;
}
.brand-text .tag {
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* ---- top-level links ---- */
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > li { position: relative; }
.nav-links a.top {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 4px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
/* gold underline that grows from the centre */
.nav-links a.top::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--gold-lt);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.nav-links a.top:hover { color: var(--gold); background: var(--gold-wash); }
.nav-links li:hover > a.top::after,
.nav-links li:focus-within > a.top::after { transform: scaleX(1); }

.nav-links li.active > a.top { color: var(--gold); font-weight: 600; }
.nav-links li.active > a.top::after { transform: scaleX(1); }

.nav-links a.top .chev {
  font-size: .68rem;
  line-height: 1;
  opacity: .55;
  transition: transform .25s ease, opacity .2s;
}
.nav-links li:hover > a.top .chev,
.nav-links li:focus-within > a.top .chev { transform: rotate(180deg); opacity: 1; }

/* ---- dropdown ---- */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 244px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
/* invisible bridge so the menu survives the gap under the trigger */
.dropdown::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -8px;
  height: 8px;
}
.nav-links li:hover > .dropdown,
.nav-links li:focus-within > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: .82rem;
  color: var(--ink-soft);
  border-radius: 4px;
  transition: background .18s, color .18s;
}
.dropdown a:hover { background: var(--gold-wash); color: var(--gold); }
.dropdown a[aria-current='page'] { color: var(--gold); font-weight: 600; }
.dropdown a small { display: block; font-size: .68rem; color: var(--faint); font-weight: 400; }

.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-cta .btn { padding: 10px 20px; }
.nav-cta-mobile { display: none; }

/* visible keyboard focus across the whole header */
.nav a:focus-visible,
.nav button:focus-visible {
  outline: 2px solid var(--gold-lt);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- hamburger ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
}
/* burger folds into an X */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =================================================================
   HERO
   ================================================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(15,18,14,.82) 0%, rgba(15,18,14,.55) 48%, rgba(15,18,14,.25) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 60px 0; max-width: 680px; }
.hero h1 {
  color: #fff;
  font-weight: 500;
  font-size: clamp(2.3rem, 5.6vw, 4.1rem);
  line-height: 1.12;
  margin: 18px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--gold-lt); font-weight: 400; }
.hero p {
  font-size: 1.07rem;
  font-weight: 300;
  color: rgba(255,255,255,.86);
  max-width: 520px;
  line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* small stat strip under hero */
.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-stats .stat .num { font-family: var(--serif); font-size: 1.9rem; color: #fff; }
.hero-stats .stat .lbl { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }

/* =================================================================
   GENERIC PAGE HEADER (interior pages)
   ================================================================= */
.page-head {
  position: relative;
  color: #fff;
  padding: 96px 0 78px;
  overflow: hidden;
}
.page-head-media { position: absolute; inset: 0; z-index: 0; }
.page-head-media img { width: 100%; height: 100%; object-fit: cover; }
.page-head-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,24,18,.78), rgba(20,24,18,.6));
}
.page-head .wrap { position: relative; z-index: 2; }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 500; margin-top: 12px; }
.page-head p { color: rgba(255,255,255,.82); font-weight: 300; max-width: 560px; margin-top: 14px; }

.crumbs { font-size: .76rem; color: rgba(255,255,255,.66); letter-spacing: .04em; }
.crumbs a:hover { color: var(--gold-lt); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* =================================================================
   SECTIONS / LAYOUT PRIMITIVES
   ================================================================= */
.section { padding: 92px 0; }
.section.tight { padding: 64px 0; }
.section.cream { background: var(--cream); }
.section.paper { background: var(--paper); }
.section.gold-wash { background: var(--gold-wash); }
.section.dark { background: var(--green-deep); color: #fff; }
.section.dark h2, .section.dark h3 { color: #fff; }

.section-head { max-width: 620px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .rule { margin-inline: auto; }

.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.media-right { direction: ltr; }

.framed { position: relative; }
.framed img { border-radius: 4px; box-shadow: var(--shadow-md); width: 100%; height: 100%; object-fit: cover; }
.framed::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold-lt);
  border-radius: 4px;
  z-index: -1;
}

/* ---- Feature cards (Why Choose Us, value props) ---- */
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 34px 30px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.feature .ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-wash);
  color: var(--gold);
  margin-bottom: 20px;
}
.feature h3 { font-size: 1.18rem; margin-bottom: 10px; }
.feature p { font-size: .92rem; color: var(--muted); font-weight: 300; line-height: 1.75; }

/* ---- Program / level cards ---- */
.level-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.level-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.level-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,18,14,.9) 8%, rgba(15,18,14,.2) 70%);
}
.level-card:hover img { transform: scale(1.05); }
.level-card .level-body { position: relative; z-index: 2; padding: 32px; }
.level-card h3 { color: #fff; font-size: 1.5rem; }
.level-card p { font-size: .9rem; color: rgba(255,255,255,.82); font-weight: 300; margin: 10px 0 16px; }
.level-card .more { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-lt); font-weight: 600; }

/* =================================================================
   GALLERY
   ================================================================= */
.gallery-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.gallery-filter button {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 40px;
  padding: 8px 20px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: .22s;
}
.gallery-filter button:hover { border-color: var(--gold); color: var(--gold); }
.gallery-filter button.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.masonry { columns: 3; column-gap: 18px; }
.masonry .tile { break-inside: avoid; margin-bottom: 18px; position: relative; border-radius: 5px; overflow: hidden; cursor: pointer; }
.masonry .tile img { width: 100%; transition: transform .5s; }
.masonry .tile:hover img { transform: scale(1.04); }
.masonry .tile .cap {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 16px 14px;
  background: linear-gradient(transparent, rgba(15,18,14,.82));
  color: #fff;
  font-size: .8rem;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .3s;
}
.masonry .tile:hover .cap { opacity: 1; }

/* =================================================================
   NEWS
   ================================================================= */
.news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.news-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .body { padding: 24px 24px 28px; flex: 1; display: flex; flex-direction: column; }
.news-card .meta { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.news-card h3 { font-size: 1.22rem; line-height: 1.32; margin-bottom: 10px; }
.news-card p { font-size: .9rem; color: var(--muted); font-weight: 300; flex: 1; }
.news-card .read { margin-top: 16px; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink); }
.news-card:hover .read { color: var(--gold); }

/* =================================================================
   STAFF
   ================================================================= */
.staff-card { text-align: center; }
.staff-card .photo {
  aspect-ratio: 1/1;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--gold-wash);
}
.staff-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-card h3 { font-size: 1.1rem; }
.staff-card .role { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.staff-card p { font-size: .86rem; color: var(--muted); font-weight: 300; margin-top: 10px; }

/* =================================================================
   FORMS
   ================================================================= */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 46px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 22px; }
.field label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: .94rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154,124,63,.12);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.form-msg { font-size: .9rem; margin-top: 14px; min-height: 20px; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: #b3402f; }

/* =================================================================
   CONTACT
   ================================================================= */
.contact-item { display: flex; gap: 16px; margin-bottom: 28px; }
.contact-item .ico { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--gold-wash); color: var(--gold); display: grid; place-items: center; }
.contact-item h4 { font-family: var(--serif); font-size: 1rem; margin-bottom: 3px; }
.contact-item p, .contact-item a { font-size: .92rem; color: var(--muted); font-weight: 300; }
.contact-item a:hover { color: var(--gold); }
.map-embed { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); height: 100%; min-height: 340px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* =================================================================
   CTA BAND
   ================================================================= */
.cta-band {
  position: relative;
  padding: 84px 0;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.cta-band-media { position: absolute; inset: 0; z-index: 0; }
.cta-band-media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band-media::after { content: ''; position: absolute; inset: 0; background: rgba(20,40,26,.82); }
.cta-band .wrap { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; }
.cta-band h2 em { font-style: italic; color: var(--gold-lt); font-weight: 400; }
.cta-band p { color: rgba(255,255,255,.85); font-weight: 300; max-width: 540px; margin: 16px auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =================================================================
   FOOTER
   ================================================================= */
.footer { background: #14130f; color: rgba(255,255,255,.7); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 56px; }
/* The footer shows the full logo lockup, which already carries the school name
   and motto — so the typeset wordmark beside it would only repeat itself. */
.footer .brand { display: block; }
.footer .brand img { height: 132px; width: auto; }
.footer .brand .brand-text { display: none; }
.footer-about { font-size: .9rem; font-weight: 300; line-height: 1.8; margin-top: 20px; max-width: 300px; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 20px; font-weight: 600; }
.footer ul li { margin-bottom: 11px; }
.footer ul a { font-size: .9rem; font-weight: 300; transition: color .2s; }
.footer ul a:hover { color: var(--gold-lt); }
.footer .contact-line { font-size: .9rem; font-weight: 300; margin-bottom: 12px; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.footer-bottom a:hover { color: var(--gold-lt); }
.socials { display: flex; gap: 12px; margin-top: 22px; }
.socials a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; display: grid; place-items: center; transition: .25s; }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* =================================================================
   LIGHTBOX
   ================================================================= */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12,12,10,.92); display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; border-radius: 4px; }
.lightbox .close { position: absolute; top: 24px; right: 30px; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; opacity: .8; }
.lightbox .close:hover { opacity: 1; }

/* =================================================================
   REVEAL ON SCROLL
   ================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* =================================================================
   PROSE (news article body)
   ================================================================= */
.prose { max-width: 720px; margin-inline: auto; }
.prose p { font-size: 1.04rem; font-weight: 300; color: var(--ink-soft); line-height: 1.95; margin-bottom: 24px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 16px; }
.prose h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.prose blockquote { border-left: 3px solid var(--gold-lt); padding-left: 24px; margin: 32px 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink); }
.prose img { border-radius: 5px; margin: 32px 0; }
.prose ul { margin: 0 0 24px 20px; }
.prose ul li { margin-bottom: 10px; font-weight: 300; color: var(--ink-soft); }

/* =================================================================
   FAITH / VALUES list
   ================================================================= */
.value-list { display: grid; gap: 4px; }
.value-row { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.value-row .vnum { font-family: var(--serif); font-size: 1.6rem; color: var(--gold-lt); line-height: 1; }
.value-row h3 { font-size: 1.2rem; margin-bottom: 6px; }
.value-row p { font-size: .94rem; color: var(--muted); font-weight: 300; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .masonry { columns: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }

  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }

  /* ---- mobile menu ---- */
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 76px; left: 0; right: 0;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 6% 22px;
    gap: 0;
    box-shadow: var(--shadow-md);
  }
  .nav-links.mobile-open > li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links.mobile-open > li:last-of-type { border-bottom: none; }

  /* full-width flex so the chevron parks on the right edge of the row */
  .nav-links.mobile-open a.top {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 15px 4px;
    font-size: .95rem;
    border-radius: 0;
  }
  /* the centre-grow underline is a desktop affordance only */
  .nav-links.mobile-open a.top::after { display: none; }
  .nav-links.mobile-open a.top:hover { background: none; }
  .nav-links.mobile-open a.top .chev { font-size: .9rem; opacity: .8; padding-right: 6px; }

  /* accordion — closed by default, opened by .opened on the <li> */
  .nav-links.mobile-open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--line-2);
    border-radius: 0;
    margin: 0 0 12px 6px;
    padding: 2px 0 2px 14px;
    min-width: 0;
    display: none;
  }
  .nav-links.mobile-open .dropdown::before { display: none; }
  .nav-links.mobile-open li.opened > .dropdown { display: block; }
  .nav-links.mobile-open li.opened > a.top { color: var(--gold); }
  .nav-links.mobile-open li.opened > a.top .chev { transform: rotate(180deg); }
  /* hover/focus must not spring the accordion open on touch */
  .nav-links.mobile-open li:hover > .dropdown,
  .nav-links.mobile-open li:focus-within > .dropdown { display: none; }
  .nav-links.mobile-open li.opened:hover > .dropdown,
  .nav-links.mobile-open li.opened:focus-within > .dropdown { display: block; }
  .nav-links.mobile-open li:hover > a.top .chev,
  .nav-links.mobile-open li:focus-within > a.top .chev { transform: none; }
  .nav-links.mobile-open li.opened:hover > a.top .chev,
  .nav-links.mobile-open li.opened:focus-within > a.top .chev { transform: rotate(180deg); }

  /* Apply CTA lives inside the panel on mobile, not lost with the desktop bar */
  .nav-links.mobile-open .nav-cta-mobile { display: block; margin-top: 18px; }
  .nav-links.mobile-open .nav-cta-mobile .btn { display: flex; justify-content: center; width: 100%; }

  /* page behind the open menu shouldn't scroll */
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2, .field-row { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .form-card { padding: 28px 22px; }
  .framed::before { display: none; }
  .hero-stats { gap: 26px; }

  /* brand lockup has to survive a 360px header */
  .brand { gap: 9px; }
  .brand img { height: 42px; }
  .brand-text .name { font-size: .96rem; }
  .brand-text .tag { font-size: .5rem; letter-spacing: .16em; }
  .footer .brand img { height: 88px; }
}
