/* ============================================================================
   CAPSTONE PICTURES — main.css
   Ink-black, one accent (tungsten amber), editorial serif + precise sans.
   Sections pin via position:sticky; heights come from --len (vh) set inline
   in index.html, so pacing edits are a one-number change per section.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: 'Anton';                 /* ultra-bold condensed grotesk — wordmark, manifesto */
  src: url('../assets/fonts/anton-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo';               /* precise minimal sans — variable weight 100–900 */
  src: url('../assets/fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Prata';                 /* high-contrast editorial display serif — statements */
  src: url('../assets/fonts/prata-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ----------------------------------------------------------------- tokens */
:root {
  --ink: #060606;            /* page background */
  --black: #000;             /* canvas letterbox */
  --paper: #F1EDE6;          /* warm off-white text */
  --paper-dim: #98917f;      /* secondary text */
  --amber: #E3A04A;          /* tungsten amber — the only accent */
  --amber-bright: #FFC98A;   /* amber highlight (hover / glow) */
  --hairline: rgba(241, 237, 230, 0.16);

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Prata', 'Times New Roman', serif;
  --display: 'Anton', 'Arial Narrow', sans-serif;

  --nav-pad: clamp(20px, 3vw, 36px);
}

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

html { background: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, canvas, svg { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }

/* The focus-ring cursor replaces the native one on fine pointers only. */
@media (pointer: fine) {
  body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* -------------------------------------------------------------- preloader */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px;
}
#preloader .pre-count {
  font-family: var(--sans); font-weight: 200;
  font-size: 12px; letter-spacing: 0.34em;
  color: var(--paper-dim);
  font-variant-numeric: tabular-nums;
}
#iris line { stroke: var(--paper); stroke-width: 1.2; }
#iris line.iris-amber { stroke: var(--amber); }

/* -------------------------------------------------- bloom / grain / hud */
#bloom {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(120% 120% at 50% 50%,
              #FFFDF6 0%, #FFEEC9 48%, #F2C387 78%, #E3A04A 100%);
  opacity: 0; pointer-events: none;
}
#grain {
  position: fixed; inset: -100px; z-index: 90;
  background: url('../assets/grain/grain.png') repeat;
  background-size: 384px 384px;
  opacity: 0.055; pointer-events: none;
  animation: grain-shift 0.84s steps(7) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  14%  { transform: translate(-48px, 32px); }
  28%  { transform: translate(24px, -64px); }
  42%  { transform: translate(-64px, -24px); }
  56%  { transform: translate(48px, 56px); }
  70%  { transform: translate(-24px, 8px); }
  84%  { transform: translate(56px, -40px); }
  100% { transform: translate(0, 0); }
}
#hud {
  position: fixed; right: var(--nav-pad); bottom: var(--nav-pad); z-index: 70;
  opacity: 0.55; pointer-events: none;
  mix-blend-mode: difference;
}
#hud line { stroke: var(--paper); stroke-width: 2; }
#hud line.iris-amber { stroke: var(--amber); }

/* ----------------------------------------------------------------- cursor */
#cursor {
  position: fixed; left: 0; top: 0; z-index: 300;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: width .28s cubic-bezier(.3,1,.3,1), height .28s cubic-bezier(.3,1,.3,1),
              margin .28s cubic-bezier(.3,1,.3,1), border-color .28s, opacity .3s;
  will-change: transform;
}
.cursor-tick {
  position: absolute; left: 50%; top: 50%;
  width: 1px; height: 5px; background: var(--amber);
  opacity: 0; transition: opacity .25s, transform .35s cubic-bezier(.3,1,.3,1);
}
.cursor-tick--n { transform: translate(-50%, -50%) rotate(0deg)   translateY(-13px); }
.cursor-tick--e { transform: translate(-50%, -50%) rotate(90deg)  translateY(-13px); }
.cursor-tick--s { transform: translate(-50%, -50%) rotate(180deg) translateY(-13px); }
.cursor-tick--w { transform: translate(-50%, -50%) rotate(270deg) translateY(-13px); }
#cursor.is-active {
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-color: var(--amber-bright);
}
#cursor.is-active .cursor-tick { opacity: 1; }
#cursor.is-active .cursor-tick--n { transform: translate(-50%, -50%) rotate(45deg)  translateY(-22px); }
#cursor.is-active .cursor-tick--e { transform: translate(-50%, -50%) rotate(135deg) translateY(-22px); }
#cursor.is-active .cursor-tick--s { transform: translate(-50%, -50%) rotate(225deg) translateY(-22px); }
#cursor.is-active .cursor-tick--w { transform: translate(-50%, -50%) rotate(315deg) translateY(-22px); }
#cursor.is-down { transform-origin: center; }
@media (pointer: coarse) { #cursor { display: none; } }

/* -------------------------------------------------------------------- nav */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--nav-pad) * 0.75) var(--nav-pad);
  mix-blend-mode: difference;          /* stays legible over the light bloom */
  opacity: 0;                           /* revealed after the preloader */
}
#nav nav { display: flex; align-items: center; gap: 14px; }
#nav nav a {
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper);
  padding: 6px 2px;
  transition: color .3s;
}
#nav nav a:hover { color: var(--amber-bright); }
.nav-dot { color: var(--paper-dim); font-size: 11px; }

/* ---------------------------------------------------------------- lockup
   Stacked wordmark. js/main.js letter-spaces .lk-bottom so "PICTURES"
   occupies exactly the width of "CAPSTONE" at any size.               */
.lockup { display: inline-flex; flex-direction: column; align-items: flex-start; }
.lk-top {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.01em;
  display: block;
}
.lk-bottom {
  font-family: var(--sans);
  font-weight: 150;
  text-transform: uppercase;
  line-height: 1;
  display: block;
  white-space: nowrap;
}
.lockup--hero .lk-top { font-size: clamp(72px, 16vw, 220px); }
.lockup--hero .lk-bottom { font-size: clamp(15px, 3.34vw, 46px); margin-top: 0.55em; color: var(--paper); }
.lockup--nav .lk-top { font-size: 21px; }
.lockup--nav .lk-bottom { font-size: 4.6px; margin-top: 3px; font-weight: 300; }

/* ------------------------------------------------------- scrub sections */
section { position: relative; }
.scrub-section, #manifesto { height: calc(var(--len) * 1vh); }
.sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--black);
}
.seq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.section-tag {
  position: absolute; top: calc(var(--nav-pad) + 64px); left: var(--nav-pad);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--paper-dim);
  opacity: 0;
}
.section-tag::before {
  content: ''; display: inline-block;
  width: 26px; height: 1px; background: var(--amber);
  margin-right: 12px; vertical-align: middle;
}

/* ------------------------------------------------------------------- hero */
.hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 5vw;
}
.hero-overlay .lockup { align-items: center; }
.lockup--hero .lk-top, .lockup--hero .lk-bottom { opacity: 0; }
.scroll-cue {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 72px; width: 1px; overflow: hidden; opacity: 0;
}
.scroll-cue-line {
  display: block; width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--amber));
  animation: cue-drop 2.2s cubic-bezier(.6,0,.2,1) infinite;
}
@keyframes cue-drop {
  0% { transform: translateY(-100%); } 55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* -------------------------------------------------------------- manifesto */
#manifesto .sticky { background: var(--ink); }
.manifesto-stage { display: flex; align-items: center; justify-content: center; }
.mani-words { position: absolute; inset: 0; }
.mani-word {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(56px, 12.5vw, 175px);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity, filter;
}
.mani-final {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: clamp(26px, 4.6vw, 62px);
  white-space: nowrap;
  color: var(--paper);
  opacity: 0;
}
.mani-final::after {
  content: ''; display: block;
  width: 44px; height: 1px; margin: 26px auto 0;
  background: var(--amber);
}

/* --------------------------------------------------------------- assembly */
.callouts { position: absolute; inset: 0; pointer-events: none; }
.callout { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
/* Capability lines: all four float free on the frozen exploded frame,
   each parked on clean black for a balanced, readable composition. */
.callout-text {
  position: absolute;
  left: calc(var(--tx) * 1%); top: calc(var(--ty) * 1%);
  display: block; max-width: 340px;
  padding-top: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 3px 24px rgba(0, 0, 0, 0.75);
}
/* soft dark pool behind each label so it reads over haze and highlights */
.callout-text::before {
  content: ''; position: absolute; z-index: -1;
  inset: -20px -30px -24px -30px;
  background: radial-gradient(ellipse at 45% 45%, rgba(4, 4, 4, 0.8), rgba(4, 4, 4, 0) 72%);
  filter: blur(5px);
}
.callout-cap {
  display: block;
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--paper);
}
.callout-cap--right { text-align: right; }

/* The closing title card — big, centred over the reassembled camera. */
.assembly-dim {
  position: absolute; inset: 0;
  background: rgba(4, 4, 4, 0.6);
  opacity: 0;
}
.assembly-close {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);   /* JS keeps xPercent/yPercent in sync */
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 68px);
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.7);
  opacity: 0;
}
.assembly-close::after {
  content: ''; display: block;
  width: 46px; height: 1px; margin: 30px auto 0;
  background: var(--amber);
}

/* ------------------------------------------------------------------ craft */
.craft-lines { position: absolute; inset: 0; }
.craft-line {
  position: absolute; left: 8vw; bottom: 16vh;
  max-width: 16em;
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 48px);
  line-height: 1.28;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  will-change: transform, opacity;
}
.craft-line::before {
  content: ''; display: block;
  width: 34px; height: 1px; margin-bottom: 22px;
  background: var(--amber);
}

/* ---------------------------------------------------------------- contact */
#contact {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  position: relative; z-index: 50;      /* rides above the released dive canvas */
  padding: 20vh 6vw 12vh;
}
.contact-inner { text-align: center; }
.contact-head {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6.6vw, 92px);
  line-height: 1.12;
  margin-bottom: clamp(34px, 6vh, 60px);
}
.contact-mail {
  display: inline-block;
  position: relative;
  font-family: var(--sans); font-weight: 200;
  font-size: clamp(17px, 2.4vw, 28px);
  letter-spacing: 0.08em;
  color: var(--amber);
  padding: 6px 2px;
  transition: color .3s;
}
.contact-mail::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--amber);
  transform: scaleX(0.22); opacity: .45;
  transform-origin: center;
  transition: transform .5s cubic-bezier(.3,1,.3,1), opacity .3s;
}
.contact-mail:hover { color: var(--amber-bright); }
.contact-mail:hover::after { transform: scaleX(1); opacity: 1; }
.contact-addr {
  margin-top: clamp(30px, 5vh, 52px);
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--paper-dim);
}

/* ----------------------------------------------------------------- footer */
footer {
  position: relative; z-index: 50;
  background: var(--ink);
  border-top: 1px solid rgba(241, 237, 230, 0.08);
  padding: 34px var(--nav-pad);
  text-align: center;
}
footer p {
  font-size: 10px; font-weight: 300;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--paper-dim);
}

/* --------------------------------------------------------------- noscript */
.noscript-cover {
  position: fixed; inset: 0; z-index: 400;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; text-align: center; padding: 8vw;
}
.noscript-lockup { font-family: var(--display); font-size: 13vw; line-height: .9; }
.noscript-lockup span { font-family: var(--sans); font-weight: 200; font-size: 2.6vw; letter-spacing: 1.1em; }
.noscript-cover a { color: var(--amber); }

/* ------------------------------------------------------- responsive split */
.mobile-only { display: none; }
@media (max-width: 820px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  .scrub-section, #manifesto { height: calc(var(--len-m, var(--len)) * 1vh); }
  .craft-line { left: 8vw; right: 8vw; bottom: 14vh; max-width: none; }
  .lockup--nav .lk-top { font-size: 17px; }
  .lockup--nav .lk-bottom { font-size: 3.8px; }
  .contact-head { white-space: normal; }
  .mani-word { font-size: clamp(40px, 13vw, 90px); }
  /* letterboxed assembly: centred lines in the black bands */
  .callout-text { text-align: center; }
  .callout-cap--right { text-align: center; }
  .assembly-close {
    white-space: normal;
    width: 88vw;
    font-size: clamp(26px, 8vw, 44px);
  }
}

/* -------------------------------------------------- reduced-motion / no-js
   With reduced motion the scrubs become still frames and all copy is
   simply visible; nothing pins.                                          */
@media (prefers-reduced-motion: reduce) {
  #grain { animation: none; }
  .scroll-cue-line { animation: none; }
}
body.reduced .scrub-section, body.reduced #manifesto { height: auto; }
body.reduced .sticky { position: relative; height: 100svh; }
body.reduced .lockup--hero .lk-top, body.reduced .lockup--hero .lk-bottom,
body.reduced .mani-final, body.reduced .craft-line,
body.reduced .assembly-close, body.reduced .section-tag { opacity: 1; }
body.reduced .mani-word { display: none; }
body.reduced .craft-line { position: static; padding: 10vh 8vw; }
body.reduced .craft-lines { position: static; }
body.reduced #nav { opacity: 1; }
body.reduced .seq-canvas { display: none; }
body.reduced .sticky { background: var(--ink); }
body.reduced .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
