/* ============================================================
   FENTON BUILD LOG — cinematic aerial editorial
   Fraunces (display) · Archivo (text) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --bg:        #15130d;
  --bg-2:      #1b1811;
  --panel:     #211d15;
  --panel-2:   #262117;
  --ink:       #f2ecdd;
  --ink-2:     #d8cfbc;
  --dim:       #a49a84;
  --muted:     #766e5b;
  --line:      rgba(242, 236, 221, 0.12);
  --line-soft: rgba(242, 236, 221, 0.06);

  --ochre:     #e0942f;
  --ochre-2:   #f2b34e;
  --ochre-dim: #b0742a;
  --blueprint: #7fb7c4;   /* echoes the pool in the render */
  --earth:     #a07a4e;

  --shadow: 0 30px 70px -30px rgba(0,0,0,0.75);

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 88px);

  --f-display: "Fraunces", Georgia, serif;
  --f-text: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

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

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

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

body {
  font-family: var(--f-text);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

::selection { background: var(--ochre); color: #1a1509; }

/* ---------- atmospheric overlays ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.topo {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(224,148,47,0.10), transparent 60%),
    radial-gradient(900px 700px at 0% 110%, rgba(127,183,196,0.06), transparent 55%),
    var(--bg);
}
.topo::after {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 90%);
          mask-image: radial-gradient(circle at 50% 30%, #000, transparent 90%);
}

/* ---------- registration marks ---------- */
.reg { position: fixed; width: 22px; height: 22px; z-index: 8000; pointer-events: none; opacity: 0.5; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ochre); }
.reg::before { width: 22px; height: 1px; top: 10px; }
.reg::after  { width: 1px; height: 22px; left: 10px; }
.reg--tl { top: 16px; left: 16px; }
.reg--tr { top: 16px; right: 16px; }
.reg--bl { bottom: 16px; left: 16px; }
.reg--br { bottom: 16px; right: 16px; }
@media (max-width: 760px) { .reg { display: none; } }

/* ---------- shared type helpers ---------- */
.mono { font-family: var(--f-mono); letter-spacing: 0.04em; }

.tag {
  display: inline-block; font-family: var(--f-mono);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ochre-2); margin-bottom: 1.4rem;
}

.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-2);
}
.kicker__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ochre);
  box-shadow: 0 0 0 0 rgba(224,148,47,0.6); animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224,148,47,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(224,148,47,0); }
  100% { box-shadow: 0 0 0 0 rgba(224,148,47,0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.85rem 1.4rem; border-radius: 2px;
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn--solid { background: var(--ochre); color: #1a1509; font-weight: 600; }
.btn--solid:hover { background: var(--ochre-2); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ochre); color: var(--ochre-2); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 7000;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(21,19,13,0.78); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav__mark { display: flex; align-items: baseline; gap: 0.55rem; }
.nav__glyph { color: var(--ochre); font-size: 1rem; transform: translateY(1px); }
.nav__word { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.14em; }
.nav__sub { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--dim); position: relative; padding: 0.2rem 0;
  transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--ochre); transition: width 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__coord { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }
@media (max-width: 860px) { .nav__links, .nav__coord { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 var(--pad) clamp(28px, 6vh, 64px);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
  animation: slowzoom 26s ease-out both;
  filter: saturate(1.02) contrast(1.03);
}
@keyframes slowzoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(21,19,13,0.55) 0%, rgba(21,19,13,0.12) 34%, rgba(21,19,13,0.72) 78%, var(--bg) 100%),
    radial-gradient(120% 80% at 50% 120%, rgba(21,19,13,0.9), transparent 60%);
}

.hero__inner { max-width: 880px; position: relative; }
.hero .kicker { margin-bottom: 1.6rem; }

.hero__title {
  font-family: var(--f-display);
  font-weight: 340;
  font-size: clamp(2.9rem, 8.4vw, 7.2rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
}
.hero__title span { display: block; }
.hero__title--em {
  font-style: italic; font-weight: 400;
  color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(100deg, var(--ochre-2), var(--ink) 70%);
  -webkit-background-clip: text; background-clip: text;
}
.hero__lede {
  max-width: 540px; font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--ink-2); margin-bottom: 2.2rem;
}
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* flight-log strip */
.flightlog {
  position: relative; margin-top: clamp(2.4rem, 6vh, 4rem);
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(21,19,13,0.4); backdrop-filter: blur(6px);
  overflow: hidden;
}
.flightlog__cell {
  padding: 0.85rem 1.1rem; border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.flightlog__cell:last-child { border-right: 0; }
.flightlog__cell span { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.16em; color: var(--muted); }
.flightlog__cell b { font-family: var(--f-mono); font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.flightlog__cell--pulse b { color: var(--ochre-2); }
.flightlog__cell--pulse b::before {
  content: "● "; font-size: 0.7em; color: var(--ochre); vertical-align: 1px;
  animation: pulse 2.6s infinite;
}
@media (max-width: 820px) {
  .flightlog { grid-template-columns: repeat(2, 1fr); }
  .flightlog__cell:nth-child(2n) { border-right: 0; }
  .flightlog__cell:nth-child(5) { grid-column: 1 / -1; }
  .flightlog__cell { border-bottom: 1px solid var(--line-soft); }
}

/* ============================================================
   LEDGER / STATS
   ============================================================ */
.ledger {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 12vh, 8rem) var(--pad) clamp(2rem, 6vh, 4rem);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end;
}
.ledger__intro p {
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.28; letter-spacing: -0.01em;
  color: var(--ink);
}
.ledger__intro em { color: var(--ochre-2); font-style: italic; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat {
  background: var(--panel); padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: 0.15rem;
  position: relative;
}
.stat dt { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.stat dd { font-family: var(--f-display); font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 400; line-height: 1; letter-spacing: -0.02em; }
.stat dd em { font-size: 0.34em; font-style: normal; color: var(--dim); font-family: var(--f-mono); letter-spacing: 0.02em; margin-left: 0.15em; }
.stat span { font-family: var(--f-text); font-size: 0.8rem; color: var(--dim); margin-top: 0.35rem; }
@media (max-width: 900px) { .ledger { grid-template-columns: 1fr; gap: 2.6rem; } }
@media (max-width: 460px) { .stats { grid-template-columns: 1fr; } }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-head { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 9vh, 6rem) var(--pad) clamp(1.6rem, 4vh, 3rem); }
.section-head h2 {
  font-family: var(--f-display); font-weight: 340;
  font-size: clamp(2.1rem, 5.4vw, 4rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 16ch;
}
.section-head__note { margin-top: 1.1rem; max-width: 48ch; color: var(--dim); font-size: 1.02rem; }

/* ============================================================
   FILMS
   ============================================================ */
.films { padding-bottom: clamp(2rem, 6vh, 4rem); }
.film-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 1.8rem);
}
.noscript { color: var(--dim); }

.film {
  position: relative; border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: var(--panel); transition: border-color 0.4s, transform 0.5s var(--ease);
}
.film:hover { border-color: rgba(224,148,47,0.5); }
.film--featured { grid-column: 1 / -1; }

.film__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; }
.film--featured .film__media { aspect-ratio: 21 / 9; }
.film__thumb {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.62) contrast(1.05) brightness(0.82) sepia(0.12);
  transition: transform 0.9s var(--ease), filter 0.6s;
}
.film__media:hover .film__thumb { transform: scale(1.05); filter: saturate(0.9) contrast(1.03) brightness(0.92) sepia(0); }
.film__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(21,19,13,0.75));
}
.film__badges {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2; display: flex; gap: 0.5rem;
}
.film__badge {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.55rem; border-radius: 2px; background: rgba(21,19,13,0.6);
  border: 1px solid var(--line); color: var(--ink-2); backdrop-filter: blur(4px);
}
.film__dur { position: absolute; bottom: 0.9rem; right: 0.9rem; z-index: 2;
  font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink);
  background: rgba(21,19,13,0.55); border: 1px solid var(--line); padding: 0.2rem 0.5rem; border-radius: 2px;
  backdrop-filter: blur(4px);
}
.film__play {
  position: absolute; z-index: 2; left: 0.9rem; bottom: 0.9rem;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ochre); color: #1a1509;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,0.6);
  transition: transform 0.4s var(--ease), background 0.3s;
}
.film__media:hover .film__play { transform: scale(1.1); background: var(--ochre-2); }
.film__play svg { width: 20px; height: 20px; transform: translateX(2px); }

.film__body { padding: 1.2rem 1.3rem 1.4rem; }
.film__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.9rem); letter-spacing: -0.01em; }
.film__blurb { margin-top: 0.5rem; color: var(--dim); font-size: 0.95rem; max-width: 52ch; }
.film--featured .film__body { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 2.4rem; align-items: baseline; }
.film--featured .film__blurb { max-width: 60ch; }

/* active iframe embed */
.film__embed { position: absolute; inset: 0; z-index: 5; border: 0; width: 100%; height: 100%; background: #000; }

@media (max-width: 720px) {
  .film-grid { grid-template-columns: 1fr; }
  .film--featured .film__media { aspect-ratio: 16 / 9; }
  .film--featured .film__body { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ============================================================
   PROGRESS TIMELINE
   ============================================================ */
.timeline {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) clamp(3rem, 8vh, 6rem);
  list-style: none; position: relative;
}
.frame {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.4rem, 4vw, 4rem);
  align-items: center; padding: clamp(1.6rem, 4vh, 3rem) 0;
  border-top: 1px solid var(--line);
}
.frame:first-child { border-top: 0; }
.frame:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.frame:nth-child(even) .frame__media { order: 2; }

.frame__media { position: relative; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); }
.frame__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform 1.1s var(--ease); filter: contrast(1.04) saturate(1.02);
}
.frame__media:hover img { transform: scale(1.04); }
.frame__idx {
  position: absolute; top: 0; left: 0;
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink);
  background: var(--ochre); padding: 0.35rem 0.6rem; border-bottom-right-radius: 4px;
}

.frame__meta time {
  display: inline-block; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em;
  color: var(--blueprint); margin-bottom: 0.9rem;
  padding-left: 1.4rem; position: relative;
}
.frame__meta time::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 1rem; height: 1px; background: var(--blueprint);
}
.frame__meta h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 3.2vw, 2.5rem); letter-spacing: -0.01em; line-height: 1.04; }
.frame__meta p { margin-top: 0.7rem; color: var(--dim); max-width: 46ch; }

@media (max-width: 720px) {
  .frame, .frame:nth-child(even) { grid-template-columns: 1fr; gap: 1.1rem; }
  .frame:nth-child(even) .frame__media { order: 0; }
}

/* ============================================================
   VISION
   ============================================================ */
.vision { position: relative; padding-bottom: clamp(3rem, 9vh, 7rem); }
.vision__head { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 6vh, 4rem) var(--pad) clamp(1.4rem, 3vh, 2.4rem); }
.vision__head h2 { font-family: var(--f-display); font-weight: 340; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.02em; max-width: 18ch; }
.vision__figure { margin: 0; max-width: 1500px; margin-inline: auto; padding: 0 clamp(0px, 2vw, 24px); }
.vision__frame {
  position: relative; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow);
}
.vision__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 120px rgba(21,19,13,0.5);
  background: linear-gradient(180deg, rgba(21,19,13,0.15), transparent 30%);
}
.vision__frame img { width: 100%; object-fit: cover; }
.vision__figure figcaption {
  margin-top: 1.2rem; padding: 0 var(--pad); color: var(--dim); font-size: 0.98rem; max-width: 62ch;
}
.vision__figure figcaption .mono {
  display: block; color: var(--blueprint); font-size: 0.68rem; letter-spacing: 0.16em; margin-bottom: 0.5rem;
}

/* ============================================================
   ABOUT / FOOTER
   ============================================================ */
.about { border-top: 1px solid var(--line); margin-top: clamp(2rem, 6vh, 4rem); background: var(--bg-2); }
.about__grid {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 9vh, 6rem) var(--pad);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 5rem);
}
.about__lead p { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--ink-2); max-width: 60ch; margin-bottom: 1.8rem; }
.about__specs { display: flex; flex-direction: column; }
.spec {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line-soft);
}
.spec:first-child { border-top: 1px solid var(--line-soft); }
.spec span { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec b { font-weight: 500; color: var(--ink); text-align: right; }
.spec b.mono { font-size: 0.82rem; }
@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; gap: 2.4rem; } }

.about__foot {
  max-width: var(--maxw); margin: 0 auto; padding: 1.4rem var(--pad) 2.2rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--muted);
}
.about__foot--dim { color: var(--muted); }
.about__foot--top { color: var(--dim); transition: color 0.3s; }
.about__foot--top:hover { color: var(--ochre-2); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img { animation: none; transform: none; }
}
