/* ───────────────────────────────────────────────────────────
   Elaine McPlane — N56970
   Palette drawn from the photographs: overcast snow, the navy
   fuselage stripe, and the marker orange of a runway cone.
   ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-var.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --snow:   #f2f5f7;
  --ice:    #e2eaf0;
  --slate:  #55677a;
  --navy:   #16233f;
  --marker: #d4552b;
  /* Darker cut of the same orange: white on --marker is only 4.0:1. */
  --marker-deep: #b8481f;

  --plate-face: #ffffff;
  --plate-edge: rgba(22, 35, 63, 0.22);
  --rule:       rgba(22, 35, 63, 0.10);
  --rivet:      rgba(22, 35, 63, 0.30);

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:    'Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gut:  clamp(1.5rem, 5vw, 5rem);
  --wide: 1180px;
  --pad:  clamp(4.5rem, 11vw, 9.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --snow:   #0d141d;
    --ice:    #16202d;
    --slate:  #92a5b7;
    --navy:   #e5ecf2;
    --marker: #ef7448;

    --plate-face: #16202d;
    --plate-edge: rgba(229, 236, 242, 0.20);
    --rule:       rgba(229, 236, 242, 0.11);
    --rivet:      rgba(229, 236, 242, 0.28);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--snow);
  color: var(--navy);
  font-family: var(--body);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.26rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh;
  min-height: 30rem;
  overflow: hidden;
  background: var(--ice);
}

.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: 50% 42%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 18, 32, 0.16) 0%,
    rgba(10, 18, 32, 0.00) 26%,
    rgba(10, 18, 32, 0.00) 44%,
    rgba(10, 18, 32, 0.58) 82%,
    rgba(10, 18, 32, 0.80) 100%
  );
}

.hero__type {
  position: absolute;
  left: var(--gut);
  right: var(--gut);
  bottom: clamp(2rem, 6vh, 4.5rem);
  color: #fff;
}

.hero__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 11.4vw, 10rem);
  line-height: 0.88;
  letter-spacing: -0.028em;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(8, 14, 26, 0.34);
}

.hero__ident {
  margin: clamp(0.9rem, 2vh, 1.4rem) 0 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(0.7rem, 0.62rem + 0.4vw, 0.92rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.hero__ident span { color: var(--marker); padding: 0 0.35em; }

/* On a portrait phone a cover-cropped 3:2 frame slices the wingtips off.
   Show the photograph whole and set her name beneath it instead. */
@media (max-width: 699px) {
  .hero {
    height: auto;
    min-height: 0;
    background: none;
  }

  .hero picture,
  .hero img {
    position: static;
    width: 100%;
    height: auto;
  }

  .hero__scrim { display: none; }

  .hero__type {
    position: static;
    padding: clamp(1.4rem, 5vw, 2rem) var(--gut) 0;
    color: var(--navy);
  }

  .hero__name { text-shadow: none; }
  .hero__ident { color: var(--slate); }
}

/* ── Shared section rhythm ──────────────────────────────── */

/* One gap between blocks, not two stacked paddings. */
main {
  display: flex;
  flex-direction: column;
  gap: var(--pad);
  padding-block: var(--pad) 0;
}

.section {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.eyebrow {
  margin: 0 0 clamp(1.4rem, 3vw, 2.2rem);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate);
}

.tick {
  display: inline-block;
  margin-right: 0.85em;
  padding: 0.28em 0.55em 0.24em;
  background: var(--marker-deep);
  color: #fff;
  letter-spacing: 0.14em;
  border-radius: 1px;
}

.heading {
  margin: 0 0 clamp(1.2rem, 2.4vw, 1.8rem);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.85rem, 1.2rem + 2.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose { max-width: 36em; }

.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }

/* ── 404 ────────────────────────────────────────────────── */

.lost { min-height: 62svh; }

.link {
  color: var(--navy);
  text-decoration-color: var(--marker);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.link:hover { color: var(--marker); }

/* ── Data plate ─────────────────────────────────────────── */

.plate {
  position: relative;
  max-width: 34rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.3rem, 3.5vw, 2.4rem);
  background: var(--plate-face);
  border: 1px solid var(--plate-edge);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(22, 35, 63, 0.05),
              0 14px 34px -22px rgba(22, 35, 63, 0.4);
}

.rivet {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rivet);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.rivet--tl { top: 9px;    left: 9px;  }
.rivet--tr { top: 9px;    right: 9px; }
.rivet--bl { bottom: 9px; left: 9px;  }
.rivet--br { bottom: 9px; right: 9px; }

.plate__rows { margin: 0; }

.plate__row {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 0.5rem 1.2rem;
  align-items: baseline;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
}

.plate__row:last-child { border-bottom: 0; padding-bottom: 0; }
.plate__row:first-child { padding-top: 0; }

.plate__row dt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}

.plate__row dd {
  margin: 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--navy);
}

.plate__reg {
  letter-spacing: 0.3em;
  font-weight: 500;
}

/* Two columns squeeze the values into ragged three-line stacks on a phone. */
@media (max-width: 560px) {
  .plate__row {
    grid-template-columns: 1fr;
    gap: 0.34rem;
    padding: 0.85rem 0;
  }
}

/* ── Alton Bay ──────────────────────────────────────────── */

.bay {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .bay { grid-template-columns: 1.05fr 1fr; }
}

.bay__figure { margin: 0; }

.bay__figure img {
  width: 100%;
  border-radius: 2px;
}

/* ── Video ──────────────────────────────────────────────── */

/* The wrapper owns the 16:9 box. An <iframe> is a replaced element, and
   aspect-ratio on one without an explicit height is unreliable — Safari
   collapses it to the default 300x150. Absolutely filling a sized parent
   behaves the same in every engine. */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ice);
}

.video,
.video__frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video { color: var(--marker-deep); }

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.68, 0.3, 1);
}

.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: inherit;
  filter: drop-shadow(0 3px 14px rgba(8, 14, 26, 0.45));
  transition: transform 0.25s ease;
}

.video:hover img,
.video:focus-visible img { transform: scale(1.02); }

.video:hover .video__play,
.video:focus-visible .video__play { transform: scale(1.07); }

.video__cap {
  margin: 1.1rem 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

@media (prefers-reduced-motion: reduce) {
  .video img,
  .video__play { transition: none; }
  .video:hover img,
  .video:focus-visible img,
  .video:hover .video__play,
  .video:focus-visible .video__play { transform: none; }
}

/* ── Closer ─────────────────────────────────────────────── */

.closer img { width: 100%; }

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gut);
  text-align: center;
  font-family: var(--mono);
  text-transform: uppercase;
}

.footer__ident {
  margin: 0 0 0.6rem;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--navy);
}

.footer__base {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--slate);
}

/* Handles are lowercase, so this line opts out of the footer's uppercasing. */
.footer__credit {
  margin: 1.4rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--slate);
  opacity: 0.85;
}

.footer__credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.footer__credit a:hover { color: var(--marker); }

/* 11px text is a poor tap target; give it some vertical room on touch screens. */
@media (max-width: 699px) {
  .footer__credit a {
    display: inline-block;
    padding-block: 0.5rem;
  }
}

/* ── Motion ─────────────────────────────────────────────── */

.hero__name,
.hero__ident {
  animation: lift 1s cubic-bezier(0.22, 0.68, 0.3, 1) both;
}

.hero__ident { animation-delay: 0.16s; }

@keyframes lift {
  from { opacity: 0; transform: translateY(1.1rem); }
  to   { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  @media (min-width: 700px) {
    .reveal {
      animation: lift 1s linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__name,
  .hero__ident,
  .reveal {
    animation: none;
  }
}
