/* Self-hosted fonts. Serving these ourselves keeps the page working under the
   strict Content-Security-Policy in .htaccess (font-src 'self') and removes a
   third-party request from first paint. Files are latin-subset woff2; see
   assets/fonts/OFL.txt for licensing and how the Inter weights were produced.
   font-display: swap paints text immediately in the fallback rather than
   holding a blank headline while the font loads. */
@font-face {
  font-family: 'Playfair Display';
  src: url('/assets/fonts/playfair-display-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-body);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 var(--space-sm); line-height: 1.15; }

/* Serif is restricted to display moments only — see spec section 5.
   Do not add selectors here without checking that rule. */
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
}

p { margin: 0 0 var(--space-sm); max-width: var(--measure); }

a { color: var(--color-orange); }

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

/* Safe-area padding keeps content clear of the notch and rounded corners
   in landscape on iPhone. The env() values are 0 on every other device. */
.wrap {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.eyebrow {
  font-size: var(--text-fine);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-orange);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--color-orange-hover); }

/* Focus ring must clear WCAG 2.1 SC 1.4.11 (3:1) against every background
   it lands on. Orange measures 5.0:1 on white and 3.76:1 on ink. The tan
   (#E0B583) that reads well on the dark hero is only 1.89:1 on white —
   do not use it here. */
:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

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

/* The skip link is hidden until a keyboard user tabs to it, then it must
   become visible — a permanently invisible skip link helps nobody. */
.skip-link:focus {
  position: fixed;
  top: var(--space-xs);
  left: var(--space-xs);
  width: auto; height: auto;
  margin: 0;
  padding: 0.75rem 1.25rem;
  clip: auto;
  z-index: 100;
  background: var(--color-white);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hero */
.hero {
  position: relative;
  /* vh first as the fallback; dvh wins where supported. Mobile browser
     chrome expands and collapses, and vh alone gets clipped by it. */
  min-height: min(85vh, 46rem);
  min-height: min(85dvh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--color-sky);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

/* The scrim exists to guarantee legibility over any photo, not for mood.
   The 58% stop matters: the eyebrow lands there, and on a night skyline
   that band is the brightest part of the frame. Weaken it and small
   tan text on lit buildings drops below readable. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27, 36, 56, 0.55) 0%,
    rgba(27, 36, 56, 0.08) 26%,
    rgba(27, 36, 56, 0.62) 58%,
    rgba(27, 36, 56, 0.98) 100%
  );
}

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  padding: var(--space-sm) 0;
}

.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }

.nav__logo {
  color: var(--color-white);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.nav__link {
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: var(--text-fine);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.nav__link:hover { background: rgba(255, 255, 255, 0.12); }

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: var(--space-lg);
}

.hero__eyebrow {
  color: var(--color-tan-light);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  font-size: var(--text-small);
  /* This is a <p>, so the global p { max-width: 62ch } was capping its box
     at ~491px on a 1280px screen. text-align: center then centred it inside
     that narrow box, which sat on the left -- so it read as misaligned
     against the full-width headline below it. */
  max-width: none;
  /* Letter-spacing adds trailing space after the final character, which
     pushes centred text left by half that amount. Pull it back. */
  margin-right: -0.28em;
}

.hero__title {
  font-size: var(--text-hero);
  color: var(--color-white);
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.7);
  margin-bottom: var(--space-sm);
}

.hero__lede {
  font-size: var(--text-lede);
  color: #E8E2D9;
  max-width: 34rem;
  margin-inline: auto;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

/* Signup */
.signup { background: var(--color-sky); padding: var(--space-lg) 0 var(--space-xl); }

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: var(--space-md);
  max-width: 30rem;
  margin-inline: auto;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
}

.card__title { font-size: 1.5rem; color: var(--color-ink); margin-bottom: 0.35rem; }
.card__fine { font-size: var(--text-small); color: var(--color-muted); margin-bottom: var(--space-md); }

.field__label {
  display: block;
  font-size: var(--text-fine);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-bottom: 0.35rem;
}

.field__opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--color-muted); }

.field {
  width: 100%;
  min-height: 44px;
  padding: 0 0.75rem;
  margin-bottom: var(--space-sm);
  border: 1px solid #DED8D1;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--color-ink);
  background: var(--color-white);
}

.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }

@media (max-width: 480px) {
  .field__row { grid-template-columns: 1fr; gap: 0; }
}

.card__btn { width: 100%; margin-top: 0.25rem; }

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: var(--space-sm);
  font-size: var(--text-fine);
  color: var(--color-muted);
  line-height: 1.5;
}

.consent input { margin-top: 0.2rem; flex: none; }

.card__privacy {
  font-size: var(--text-fine);
  color: var(--color-muted);
  text-align: center;
  margin: var(--space-sm) 0 0;
}

/* DFW strip */
.strip { background: var(--color-sky-deep); padding: var(--space-lg) 0; color: var(--color-white); }

.strip__title { font-size: var(--text-section); color: var(--color-white); margin-bottom: 0.35rem; }
.strip__sub { color: var(--color-muted-sky); font-size: var(--text-small); margin-bottom: var(--space-md); }

.strip__rail {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Hide the scrollbar: on desktop it drew a grey bar straight across the
     bottom of the photographs. Scrolling still works by wheel, trackpad,
     touch, and keyboard -- the rail keeps tabindex="0" for that reason.
     The partially visible next tile is what signals it scrolls. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.strip__rail::-webkit-scrollbar { display: none; }

.strip__item {
  flex: none;
  width: 15rem;
  scroll-snap-align: start;
}

.strip__item img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid #2C3A5C;
}

.strip__item span {
  display: block;
  margin-top: 0.6rem;
  font-size: var(--text-small);
  color: #C6CFDD;
}

/* About */
.about { padding: var(--space-xl) 0; }

/* Left-justified copy in a block that is itself centred, so the white space
   is even on both sides while the text still reads left-to-left. Wider than
   the 60ch used elsewhere -- past roughly 75 characters a line gets harder
   to track back to, so this is the practical ceiling. */
.about .wrap { width: min(52rem, 100% - 2.5rem); }

.about__title { font-size: var(--text-section); color: var(--color-ink); }

.about p {
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  max-width: none;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-md);
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
}

.pillar { border-top: 2px solid var(--color-orange); padding-top: var(--space-sm); }
.pillar p { max-width: none; }

.pillar h3 {
  font-family: var(--font-sans);
  font-size: var(--text-fine);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-bottom: 0.4rem;
}

.pillar p { font-size: var(--text-small); margin: 0; }

/* Why DFW */
.why {
  position: relative;
  isolation: isolate;
  background: var(--color-paper);
  border-block: 1px solid var(--color-rule);
  padding: var(--space-xl) 0;
  overflow: hidden;
}

/* Depth without an image request: a soft warm bloom behind the figures,
   sized in vw so it scales with the section rather than sitting as a blob. */
.why::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 140%;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 18% 30%, rgba(180, 83, 31, 0.09), transparent 70%),
    radial-gradient(45% 50% at 88% 78%, rgba(27, 36, 56, 0.07), transparent 72%);
}

.why__eyebrow { color: var(--color-orange); }

.why {
  text-align: center;
}

.why__lead {
  font-size: var(--text-stat);
  color: var(--color-ink);
  line-height: 1.28;
  /* 30ch keeps the three sentences to three lines. Narrower and "hiring."
     drops to a line on its own; wider and the figures stop reading as a
     headline. */
  max-width: 30ch;
  margin-inline: auto;
}

.why__body {
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  max-width: 58ch;
  margin-inline: auto;
}

/* The figures carry the argument, so they get the accent colour, extra
   size, and tabular figures. Tabular matters more than it looks:
   proportional digits are different widths, so a counting number jitters. */
.stat {
  color: var(--color-orange);
  font-size: 1.18em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
}

/* Entrance for the Why DFW block. One orchestrated moment as the section
   arrives, rather than motion scattered across the page. */
/* Hidden is a state JavaScript opts into, never the default. If this CSS
   set opacity:0 on .reveal directly, then anything reading the page before
   the script runs -- a crawler, a screenshot, a slow connection, a blocked
   script -- would see an empty section. The script adds .is-armed only to
   elements that are below the fold, then .is-in when they scroll up. */
.reveal {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-armed { opacity: 0; transform: translateY(14px); }
.reveal.is-armed.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-armed { opacity: 1; transform: none; transition: none; }
}

.why__src {
  font-size: var(--text-fine);
  color: var(--color-muted);
  margin: var(--space-sm) auto 0;
  /* Same trap as the hero eyebrow: p { max-width: 62ch } was capping this
     box, so text-align:center centred it inside a narrow left-hand box. */
  max-width: none;
}

/* Partner */
.partner { background: var(--color-sky); color: var(--color-white); padding: var(--space-xl) 0; }
.partner__title { font-size: var(--text-section); color: var(--color-white); }
.partner__body {
  color: #C3CBD9;
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  /* Runs the full width of the wrap, so the margins match the rest of the
     page rather than stopping short two thirds of the way across. */
  max-width: none;
  margin-bottom: var(--space-md);
}
.partner__note { font-size: var(--text-fine); color: var(--color-muted-sky); margin: var(--space-sm) 0 0; }

/* Footer */
.foot { background: var(--color-sky-deep); color: var(--color-muted-sky); padding: var(--space-md) 0; font-size: var(--text-fine); }
.foot__inner { display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; letter-spacing: 0.05em; }

/* Long-form documents */
.doc { padding: var(--space-xl) 0; max-width: 44rem; }
.doc h1 { font-size: var(--text-section); color: var(--color-ink); }
.doc h2 {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-top: var(--space-md);
}
.doc__date { font-size: var(--text-small); color: var(--color-muted); }
.doc ul { max-width: var(--measure); padding-left: 1.25rem; margin: 0 0 var(--space-sm); }
.doc li { margin-bottom: 0.35rem; }
.doc__back { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }

.field__error {
  font-size: var(--text-fine);
  color: var(--color-orange);
  margin: -0.5rem 0 var(--space-sm);
}

.field[aria-invalid="true"] { border-color: var(--color-orange); }

.card--success { text-align: center; }
.card--success:focus { outline: none; }

/* Small phones — 320px floor (iPhone SE 1st gen, small Android).
   Everything here is a fix for a specific failure at that width, not
   general polish. Test at 320 before changing any of it. */
@media (max-width: 420px) {
  .wrap { width: min(72rem, 100% - 1.75rem); }

  /* The logo and the nav button collide below ~380px. Shrinking the
     logo's tracking buys the room back without hiding either. */
  .nav__logo { font-size: var(--text-fine); letter-spacing: 0.08em; }
  .nav__link { padding: 0.5rem 0.7rem; }

  /* A 4.5rem hero headline overflows a 320px screen. */
  .hero__title { font-size: clamp(2rem, 11vw, 2.75rem); }

  .hero { padding-bottom: env(safe-area-inset-bottom); }

  .card { padding: var(--space-sm); }

  /* Full-bleed rail: let tiles reach the screen edge so the next one
     peeks in and the strip reads as scrollable. */
  .strip__item { width: 72vw; max-width: 17rem; }

  .about, .why, .partner, .signup { padding-block: var(--space-lg); }

  .foot__inner { flex-direction: column; gap: var(--space-xs); }
}

/* Short viewports — landscape phones. An 85dvh hero eats the whole
   screen and the form falls entirely below the fold. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 26rem; }
  .hero__title { font-size: 2.25rem; }
}
