/* ==========================================================================
   Aviators Direct — site.css
   Palette sampled from the 2026 brand deck:
     navy   #35597A   (brand blue)
     cream  #FBF7F0   (field)
   ========================================================================== */

@import url('../fonts/fonts.css');

:root {
  --navy:       #35597A;
  --navy-deep:  #223A50;
  --navy-soft:  #4E7CA1;
  --cream:      #FBF7F0;
  --paper:      #FFFFFF;
  --ink:        #3E2F28;
  --brass:      #A08A52;
  --line:       rgba(53, 89, 122, 0.28);
  --line-cream: rgba(251, 247, 240, 0.28);

  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Jost', 'Century Gothic', sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 34em;
}

/* ---------- Reset-ish ---------- */

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a { color: inherit; }

::selection { background: var(--navy); color: var(--cream); }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.04; }

.display-xl {
  font-size: clamp(2.75rem, 8.5vw, 7.5rem);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.display-lg {
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  text-transform: uppercase;
}

.display-md { font-size: clamp(1.5rem, 3vw, 2.375rem); }

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.65;
  max-width: var(--measure);
}

.serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 500; }

/* Boxed eyebrow — echoes the boxed wordmark logo */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 0.45em 1.1em 0.38em;
  margin-bottom: 1.75rem;
}

/* ---------- Layout primitives ---------- */

.wrap { max-width: 82rem; margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(4.5rem, 11vh, 9rem); position: relative; }

/* Anchor targets land below the fixed header */
[id] { scroll-margin-top: 5.5rem; }

.section--navy { background: var(--navy); color: var(--cream); }
.section--deep { background: var(--navy-deep); color: var(--cream); }
.section--paper { background: var(--paper); }

/* fine contour motif (from the deck's corner line art) */
.contour {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
  color: var(--line);
}
.section--navy .contour, .section--deep .contour { color: var(--line-cream); }
.contour img {
  position: absolute; right: 0; top: 0;
  height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent);
  mask-image: linear-gradient(to left, black 55%, transparent);
}

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

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
}
/* Backdrop blur lives on a pseudo-element: putting backdrop-filter on the
   header itself would make it the containing block for the fixed mobile nav. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-scrolled::before {
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__bar {
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem var(--gutter);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid currentColor;
  padding: 0.18em 0.55em 0.12em;
  white-space: nowrap;
}

/* On the transparent header over the hero the brand + links are cream */
.site-header { color: var(--cream); }
.site-header.is-scrolled, .site-header.on-light { color: var(--ink); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -0.35em;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.site-nav a:not(.btn):hover::after, .site-nav a:not(.btn):focus-visible::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-nav {
    position: fixed; inset: 0; z-index: 60;
    flex-direction: column; justify-content: center; gap: 2.25rem;
    background: var(--navy); color: var(--cream);
    transform: translateY(-100%);
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a { font-size: 1.4rem; }

  .nav-toggle {
    display: grid; place-items: center;
    margin-left: auto; z-index: 70;
    width: 44px; height: 44px;
    background: none; border: 1px solid currentColor; color: inherit;
    cursor: pointer;
  }
  .nav-toggle .bars { position: relative; width: 20px; height: 2px; background: currentColor; }
  .nav-toggle .bars::before, .nav-toggle .bars::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
    transition: transform 0.3s ease;
  }
  .nav-toggle .bars::before { top: -6px; }
  .nav-toggle .bars::after { top: 6px; }
  .nav-toggle.is-open { color: var(--cream); position: fixed; right: var(--gutter); }
  .nav-toggle.is-open .bars { background: transparent; }
  .nav-toggle.is-open .bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.is-open .bars::after { transform: translateY(-6px) rotate(-45deg); }
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 2.1em 0.85em;
  border: 1px solid var(--navy);
  background: var(--navy); color: var(--cream);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--navy-deep); border-color: var(--navy-deep); }

.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--cream); color: var(--navy); border-color: var(--cream); }

.btn--cream { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn--cream:hover, .btn--cream:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--navy-deep); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--cream);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__media video, .hero__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  /* A warm amber glow over the footage's own sun flare, plus a lighter navy
     vignette (vs. the old solid wash) so the clip's warm sunset tones read
     through instead of being crushed flat. */
  background:
    radial-gradient(ellipse 60% 50% at 65% 25%, rgba(214, 158, 92, 0.25), transparent 60%),
    linear-gradient(to bottom, rgba(34, 58, 80, 0.42), rgba(34, 58, 80, 0.1) 40%, rgba(34, 58, 80, 0.64)),
    linear-gradient(to right, rgba(34, 58, 80, 0.35), transparent 55%);
}

.hero__content {
  position: relative; z-index: 1;
  padding: 0 var(--gutter) clamp(3.5rem, 9vh, 7rem);
  max-width: 82rem; margin-inline: auto; width: 100%;
}

.hero__title { margin: 0.5rem 0 1.5rem; max-width: 11em; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: inline-block; }

.hero__sub { max-width: 30em; margin-bottom: 2.5rem; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__cue {
  position: absolute; right: var(--gutter); bottom: clamp(3.5rem, 9vh, 7rem);
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__cue .tick { width: 1px; height: 64px; background: currentColor; opacity: 0.7; }
@media (max-width: 860px) { .hero__cue { display: none; } }

/* ---------- Manifesto ---------- */

.manifesto { text-align: left; }
.manifesto p.serif-italic {
  font-size: clamp(1.75rem, 3.6vw, 3.1rem);
  line-height: 1.3;
  color: var(--navy);
  max-width: 24em;
}
.manifesto .word { opacity: 0.14; }
.manifesto .kicker {
  margin-top: 2.5rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

/* ---------- Problem rows (deck-style ruled table) ---------- */

.rows { margin-top: 3rem; border-top: 1px solid var(--line); }
.row-item {
  display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: 1.5rem 3rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
}
.row-item h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); color: var(--navy); }
.row-item p { max-width: 44em; }
@media (max-width: 700px) { .row-item { grid-template-columns: 1fr; gap: 0.5rem; } }

/* ---------- Approach (dark) ---------- */

.approach-intro { max-width: 46em; }
.approach-grid {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem;
}
@media (max-width: 860px) { .approach-grid { grid-template-columns: 1fr; } }

.approach-card {
  border: 1px solid var(--line-cream);
  padding: 2.25rem 2rem;
  display: flex; flex-direction: column; gap: 1rem;
  background: color-mix(in srgb, var(--navy-deep) 55%, transparent);
}
.approach-card h3 { font-size: 1.6rem; }
.approach-card .idx {
  font-family: var(--font-display); font-style: italic;
  color: var(--brass); font-size: 1.05rem;
}

.approach-media { margin-top: 4.5rem; position: relative; }
.approach-media img { width: 100%; height: clamp(280px, 55vh, 540px); object-fit: cover; }
.approach-media figcaption {
  position: absolute; left: 1.25rem; bottom: 1.1rem;
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream); opacity: 0.85;
}
.approach-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(34,58,80,0.55), transparent 45%);
  pointer-events: none;
}

/* ---------- Coverage ---------- */

.coverage-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: end; }
@media (max-width: 860px) { .coverage-head { grid-template-columns: 1fr; } }

.programs {
  margin-top: 4rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;
}
@media (max-width: 860px) { .programs { grid-template-columns: 1fr; } }

.program {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2.5rem 2.25rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.program h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  text-transform: uppercase;
  color: var(--navy);
}
.program .tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brass);
}
.program ul { list-style: none; display: grid; gap: 0.6rem; }
.program li { padding-left: 1.4em; position: relative; }
.program li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 0.85em; height: 1px; background: var(--navy);
}
.program--media { padding: 0; overflow: hidden; position: relative; border: none; }
.program--media video, .program--media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.program--media figcaption {
  position: absolute; left: 1.5rem; bottom: 1.25rem; right: 1.5rem;
  color: var(--cream);
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.program--media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(34,58,80,0.6), transparent 50%);
  pointer-events: none;
}

/* ---------- Numbers ---------- */

.numbers { border-block: 1px solid var(--line); background: var(--cream); }
.numbers-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem;
}
@media (max-width: 860px) { .numbers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .numbers-grid { grid-template-columns: 1fr; } }

.stat .stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1;
  color: var(--navy);
}
.stat .stat__label {
  margin-top: 0.6rem;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--ink);
}
.stat .stat__note { margin-top: 0.4rem; font-size: 0.88rem; opacity: 0.75; max-width: 16em; }

/* ---------- Timeline ---------- */

.timeline { position: relative; margin-top: 4rem; }
.timeline__rail {
  position: absolute; left: 0.55rem; top: 0; bottom: 0; width: 2px;
  background: var(--line);
}
.timeline__rail .rail-fill {
  position: absolute; inset: 0;
  background: var(--navy);
  transform-origin: top; transform: scaleY(0);
}
.milestone {
  position: relative;
  padding: 0 0 3.25rem 3.25rem;
  max-width: 44em;
}
.milestone::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 1.25rem; height: 1.25rem;
  border: 1px solid var(--navy); background: var(--cream);
  transform: rotate(45deg);
}
.milestone .year {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--navy); line-height: 1;
}
.milestone .phase {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; margin: 0.15rem 0 0.65rem;
}

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

.cta-band { text-align: center; overflow: hidden; }
.cta-band .display-lg { max-width: 12em; margin-inline: auto; }
.cta-band .lede { margin: 1.75rem auto 2.75rem; }

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

.site-footer {
  background: var(--navy-deep); color: var(--cream);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.95rem;
}
.site-footer .footer-grid {
  display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between;
}
.site-footer .brand { font-size: 1.1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.site-footer nav a {
  text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.site-footer .fine { margin-top: 2.25rem; opacity: 0.6; font-size: 0.8rem; }

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  background: var(--navy); color: var(--cream);
  padding: clamp(9rem, 22vh, 13rem) 0 clamp(3.5rem, 8vh, 6rem);
  position: relative; overflow: hidden;
}
.page-hero .lede { margin-top: 1.5rem; }

/* ---------- Team ---------- */

.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem;
  margin-top: 3.5rem;
}
.person { display: flex; flex-direction: column; }
.person__photo {
  aspect-ratio: 3 / 3.6; overflow: hidden;
  background: var(--navy); position: relative;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(0.85); }
.person__photo--mono {
  display: grid; place-items: center;
  color: var(--cream);
}
.person__photo--mono span {
  font-family: var(--font-display); font-style: italic;
  font-size: 3.5rem;
}
.person h3 { margin-top: 1.4rem; font-size: 1.45rem; }
.person .role {
  font-family: var(--font-display); font-style: italic;
  color: var(--navy); margin-bottom: 0.35rem;
}
.person .email {
  font-size: 0.88rem; letter-spacing: 0.04em;
  text-decoration: none; color: var(--navy);
}
.person .email:hover { text-decoration: underline; }
.person .bio { margin-top: 0.85rem; font-size: 0.95rem; line-height: 1.65; }

.advisor {
  border-top: 2px solid var(--navy);
  padding-top: 1.5rem;
}
/* ---------- Contact form ---------- */

.contact-form {
  max-width: 38rem;
  display: grid; gap: 1.75rem;
}
.contact-form .field { display: grid; gap: 0.5rem; }
.contact-form label {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--navy);
}
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.85em 1em;
  resize: vertical;
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible {
  outline: 2px solid var(--brass); outline-offset: 2px;
}
.contact-form .btn { justify-self: start; }
.contact-form .form-notice {
  font-size: 0.92rem; line-height: 1.55;
  padding: 1em 1.2em;
  border: 1px solid var(--line);
  background: var(--cream);
}
.contact-form .form-notice[hidden] { display: none; }

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

.reveal { opacity: 0; transform: translateY(28px); }
.no-js .reveal, .reduced-motion .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .manifesto .word { opacity: 1; }
  .timeline__rail .rail-fill { transform: none; }
  .hero__title .line > span { transform: none !important; }
}
