/* Travis Preudhomme · portfolio
   Concept spine: the operations dossier. Ink-black, emerald accent, cream type. */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/anton-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/archivo-latin-var.woff2') format('woff2');
}

:root {
  --ink: oklch(15% 0.012 170);
  --ink-raise: oklch(19% 0.015 170);
  --cream: oklch(94.5% 0.018 95);
  --cream-70: oklch(94.5% 0.018 95 / 0.7);
  --cream-45: oklch(94.5% 0.018 95 / 0.55);
  --line: oklch(94.5% 0.018 95 / 0.14);
  --emerald: oklch(76% 0.155 163);
  --emerald-bright: oklch(84% 0.16 163);
  --emerald-deep: oklch(32% 0.07 163);
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --text: 'Archivo', 'Helvetica Neue', sans-serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
}
@supports not (color: oklch(50% 0 0)) {
  :root {
    --ink: #0a0f0c;
    --ink-raise: #101712;
    --cream: #f2eee3;
    --cream-70: rgba(242, 238, 227, 0.7);
    --cream-45: rgba(242, 238, 227, 0.55);
    --line: rgba(242, 238, 227, 0.14);
    --emerald: #2fd98f;
    --emerald-bright: #5cf0af;
    --emerald-deep: #0e3f2a;
  }
}

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

html { scroll-behavior: auto; scrollbar-gutter: stable; }
html.no-js { scroll-behavior: smooth; }
html.lenis-stopped { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--emerald); color: var(--ink); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  display: grid;
  place-content: center;
  gap: 1.1rem;
  text-align: center;
}
.loader-mark {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--cream);
  letter-spacing: 0.04em;
}
.loader-line {
  width: min(300px, 60vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: left;
}
.loader-meta {
  display: flex;
  justify-content: space-between;
  width: min(300px, 60vw);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--cream-45);
}
.loader-pct { color: var(--emerald); font-variant-numeric: tabular-nums; }
.no-js .loader, .reduced .loader { display: none; }

/* ---------- cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 70;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-100px, -100px);
  transition: width 0.25s ease, height 0.25s ease;
}
.cursor.is-hover { width: 42px; height: 42px; }
@media (hover: none) { .cursor { display: none; } }
.no-js .cursor, .reduced .cursor { display: none; }

/* ---------- header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference;
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
}
.brand-tick { color: var(--emerald); margin-left: 0.1em; }
.status {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--cream-70);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); font-size: 0.8rem; letter-spacing: 0.08em; }
.site-nav a { position: relative; padding: 0.2em 0; }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-contact { color: var(--emerald); }
@media (max-width: 640px) { .status { display: none; } }

/* ---------- shared stage ---------- */
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(1.15);
}
.stage-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--ink) 0%, transparent 22%, transparent 72%, var(--ink) 100%);
}
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 1em;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--cream-45);
  text-transform: uppercase;
}
.eyebrow-file {
  color: var(--emerald);
  font-weight: 600;
}
.eyebrow.on-stage {
  position: absolute;
  top: clamp(4.5rem, 10vh, 6rem);
  left: var(--pad);
  z-index: 3;
}

/* ---------- hero ---------- */
#hero { height: 480vh; }
.hero-poster,
#orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#hero .stage.frames-live .hero-poster { visibility: hidden; }
.stage-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, var(--ink) 100%),
    linear-gradient(to bottom, var(--ink) 0%, transparent 14%, transparent 80%, var(--ink) 100%);
}
.hud {
  position: absolute;
  z-index: 4;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: var(--cream-45);
}
.hud em { font-style: normal; color: var(--emerald); }
.hud-tl { top: 4.2rem; left: var(--pad); }
.hud-tr { top: 4.2rem; right: var(--pad); }
.hud-bl { bottom: 2rem; left: var(--pad); display: flex; align-items: center; gap: 0.6em; }
.hud-br { bottom: 2rem; right: var(--pad); }
.hud-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2s ease-in-out infinite;
}
.hero-type {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad);
}
.hero-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 15.5vw, 19rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-shadow: 0 0 90px rgba(6, 12, 9, 0.55);
}
.hero-name .line { display: block; white-space: nowrap; }
.hero-name .ch { display: inline-block; will-change: transform; }
.hero-sub {
  margin-top: clamp(1.2rem, 3vh, 2.2rem);
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  letter-spacing: 0.06em;
  color: var(--cream-70);
  max-width: 34em;
}
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7em;
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  color: var(--cream-45);
}
.scroll-cue-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--emerald));
  animation: cue 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); transform-origin: top; }
  46% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- stats ---------- */
#stats {
  padding: clamp(5rem, 14vh, 9rem) var(--pad) clamp(4rem, 10vh, 7rem);
}
#stats .eyebrow { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.stats-ledger {
  border-top: 1px solid var(--line);
  max-width: 72rem;
}
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1rem, 2.6vh, 1.8rem) 0.4rem;
  border-bottom: 1px solid var(--line);
}
.stat-label {
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-45);
}
.stat-num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.5vw, 5.5rem);
  line-height: 1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.stat-flag { padding-top: clamp(1.6rem, 4vh, 2.6rem); padding-bottom: clamp(1.6rem, 4vh, 2.6rem); }
.stat-flag .stat-num {
  color: var(--emerald);
  font-size: clamp(3.6rem, 8.5vw, 8.5rem);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  padding: clamp(1.5rem, 5vh, 3.5rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  font-family: var(--display);
  font-size: clamp(4rem, 11vw, 11rem);
  line-height: 1;
  color: transparent;
  /* decorative: pinned to the pre-AA-bump value on purpose */
  -webkit-text-stroke: 1px rgba(242, 238, 227, 0.45);
}

/* ---------- pillars ---------- */
#pillars { height: 400vh; }
.pillar-track {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.pillar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  opacity: 0;
  pointer-events: none;
}
.pillar.is-active { opacity: 1; pointer-events: auto; }
.no-js .pillar, .reduced .pillar {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  inset: auto;
  padding: 3rem var(--pad);
}
.pillar-inner { max-width: none; }
.clip { display: block; overflow: hidden; }
.pillar-index {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  color: var(--emerald);
  margin-bottom: 0.5rem;
}
.pillar-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 7vw, 8rem);
  line-height: 0.92;
  overflow: hidden;
  white-space: nowrap;
}
.pillar-title .ch { display: inline-block; will-change: transform; }
.pillar-desc {
  margin-top: 1.3rem;
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  color: var(--cream-70);
  max-width: 34em;
}
.pillar-progress {
  position: absolute;
  bottom: 2rem;
  left: var(--pad);
  z-index: 4;
  display: flex;
  gap: 0.5rem;
}
.pillar-progress span {
  width: 2.6rem;
  height: 2px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.pillar-progress span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-out;
}
.pillar-progress span.is-on::after { transform: scaleX(1); }
.no-js .pillar-progress, .reduced .pillar-progress { display: none; }

/* ---------- work ---------- */
#work { height: 260vh; }
#work .stage-video { filter: brightness(0.34) saturate(1.1); }
.work-list {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  list-style: none;
}
.no-js .work-list, .reduced .work-list { position: relative; top: auto; transform: none; padding: 6rem 0; }
.row {
  position: relative;
  display: block;
  padding: clamp(1.1rem, 2.8vh, 2rem) 0.8rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.work-item:last-child .row { border-bottom: 1px solid var(--line); }
.row-fill {
  position: absolute;
  inset: 0;
  background: var(--emerald);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.row:hover .row-fill, .row:focus-visible .row-fill { transform: scaleY(1); }
.row-head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.row-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 4.4rem);
  line-height: 1;
  transition: color 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.row-year {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--cream-45);
  transition: color 0.3s ease;
}
.row-pitch {
  position: relative;
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  color: var(--cream-70);
  transition: color 0.3s ease;
}
.row:hover .row-title, .row:focus-visible .row-title {
  color: var(--ink);
  transform: translateX(0.6rem);
}
.row:hover .row-year, .row:hover .row-pitch,
.row:focus-visible .row-year, .row:focus-visible .row-pitch { color: var(--ink); }

/* ---------- finale ---------- */
#finale {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(6rem, 16vh, 10rem) var(--pad) clamp(3rem, 8vh, 5rem);
}
#finale .eyebrow { margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.finale-head {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 15rem);
  line-height: 0.9;
  text-transform: uppercase;
}
.fl-clip { display: block; overflow: hidden; padding-bottom: 0.06em; }
.fl { display: inline-block; will-change: transform; }
.fl-accent { color: var(--emerald); }
.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 7vh, 4.5rem);
}
.btn-primary {
  display: inline-block;
  background: var(--emerald);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 1.15em 2.4em;
  border-radius: 100px;
  transition: background 0.3s ease;
}
.btn-primary:hover { background: var(--emerald-bright); }
.link-code {
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--cream-70);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25em;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.link-code:hover { color: var(--emerald); border-color: var(--emerald); }
.link-code-arrow { display: inline-block; margin-left: 0.5em; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.link-code:hover .link-code-arrow { transform: translate(0.25em, -0.25em); }

/* ---------- footer ---------- */
.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem var(--pad) 2.4rem;
  border-top: 1px solid var(--line);
}
.foot-links { display: flex; gap: 2rem; font-size: 0.8rem; letter-spacing: 0.1em; }
.foot-links a { color: var(--cream-70); transition: color 0.3s ease; }
.foot-links a:hover { color: var(--emerald); }
.foot-note { font-size: 0.72rem; color: var(--cream-45); letter-spacing: 0.06em; }

/* ---------- grain ---------- */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 55;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-3%, -1%); }
  80% { transform: translate(2%, 2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- reduced motion / no-js ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue-line, .status-dot, .hud-pulse { animation: none !important; }
}
@media (max-width: 640px) {
  .hud-tr { top: 5.6rem; right: auto; left: var(--pad); }
  /* bottom HUD labels collide with the centered scroll cue on phones */
  .hud-bl, .hud-br { display: none; }
}
.reduced #hero, .no-js #hero,
.reduced #pillars, .no-js #pillars,
.reduced #work, .no-js #work { height: auto; }
.reduced .stage, .no-js .stage { position: relative; height: auto; min-height: 100vh; }
.no-js #hero .hero-poster { visibility: visible; }
.no-js #orbit, .reduced #orbit { display: none; }
.reduced .scroll-cue, .no-js .scroll-cue { display: none; }
