/* ============================================================
   WENDY ROSTANDY — founder-film portfolio
   ink black · emerald · cream · Anton / Space Grotesk
   ============================================================ */

@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #050605;
  --ink-2: #0a0c0a;
  --emerald: #0ce882;
  --emerald-dim: #0a9e5c;
  --cream: #f2ede3;
  --cream-dim: rgba(242, 237, 227, 0.55);
  --hairline: rgba(242, 237, 227, 0.12);
  --display: 'Anton', Impact, sans-serif;
  --body: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --pad: clamp(20px, 4vw, 64px);
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 340;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading { overflow: hidden; height: 100vh; height: 100dvh; }

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

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

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: none; align-items: center; justify-content: center;
}
.js .preloader { display: flex; }
.preloader-inner { width: min(680px, 84vw); }
.preloader-name {
  display: flex; flex-direction: column; overflow: hidden;
  margin-bottom: clamp(24px, 5vh, 48px);
}
.pl-line {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 128px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  transform: translateY(110%);
}
.pl-line--accent { color: var(--emerald); }
.preloader-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.preloader-label {
  font-size: 11px; letter-spacing: 0.34em; color: var(--cream-dim);
}
.preloader-pct {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
}
.preloader-bar {
  height: 1px; background: var(--hairline); overflow: hidden;
}
.preloader-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--emerald);
}

/* ============ CURSOR / GRAIN ============ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--emerald);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease;
  opacity: 0;
}
.cursor.is-active { width: 52px; height: 52px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.grain {
  position: fixed; inset: -100px; z-index: 140;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-38px, 24px); }
  50% { transform: translate(22px, -30px); }
  75% { transform: translate(-14px, -18px); }
  100% { transform: translate(30px, 12px); }
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.4vw, 28px) var(--pad);
  mix-blend-mode: difference;
}
.js .nav { opacity: 0; }
.nav-logo {
  font-family: var(--display);
  font-size: 22px; letter-spacing: 0.04em;
}
.nav-logo span { color: var(--emerald); }
.nav-links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav-links a {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--cream);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--cream);
  border-radius: 999px;
  padding: 10px 22px;
  transition: background 0.35s ease, color 0.35s ease;
}
.nav-cta:hover { background: var(--cream); color: var(--ink); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============ HERO ============ */
.hero { position: relative; height: 400vh; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--ink);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.dust {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%;
  pointer-events: none;
}
.leak {
  position: absolute; z-index: 2; pointer-events: none;
  width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  mix-blend-mode: screen;
}
.leak--1 {
  top: -25vmax; right: -20vmax;
  background: radial-gradient(circle, rgba(12, 232, 130, 0.28) 0%, transparent 62%);
}
.leak--2 {
  bottom: -30vmax; left: -22vmax;
  background: radial-gradient(circle, rgba(12, 232, 130, 0.16) 0%, transparent 60%);
}
.leak--3 {
  top: -20vmax; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(12, 232, 130, 0.2) 0%, transparent 60%);
}
.hero-vignette {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(5, 6, 5, 0.72) 100%),
    linear-gradient(to bottom, rgba(5, 6, 5, 0.35) 0%, transparent 18%, transparent 78%, rgba(5, 6, 5, 0.85) 100%);
}

.hero-content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 var(--pad);
}
.hero-kicker {
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: 0.4em;
  color: var(--emerald);
  margin-bottom: clamp(14px, 2.4vh, 26px);
}
.hero-title {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.88;
  display: flex; flex-direction: column; align-items: center;
}
.hero-line {
  display: block;
  font-size: clamp(48px, 16.5vw, 260px);
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.hero-line--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--cream);
}
.hero-line .ch { display: inline-block; }
.hero-sub {
  margin-top: clamp(20px, 3.4vh, 36px);
  max-width: 540px;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.65;
  color: var(--cream-dim);
}

.hero-hud {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
}
.hud-item {
  position: absolute;
  font-size: 10px; letter-spacing: 0.3em;
  color: rgba(242, 237, 227, 0.4);
  font-variant-numeric: tabular-nums;
}
.hud-tl { top: 84px; left: var(--pad); }
.hud-tr { top: 84px; right: var(--pad); color: var(--emerald-dim); }
.hud-bl { bottom: 28px; left: var(--pad); }
.hud-br { bottom: 28px; right: var(--pad); }
@media (max-width: 720px) { .hud-tl, .hud-br { display: none; } }

.scroll-cue {
  position: absolute; bottom: 0; left: 50%; z-index: 6;
  transform: translateX(-50%);
  height: 72px; width: 1px; overflow: hidden;
}
.scroll-cue-line {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--emerald));
  animation: cue-drop 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes cue-drop {
  0% { transform: translateY(-100%); }
  60% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ============ MARQUEE ============ */
.marquee {
  position: relative; z-index: 10;
  background: var(--ink);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px) 0;
}
.marquee-track {
  display: flex; white-space: nowrap; will-change: transform;
}
.marquee-track span {
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 38px);
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 237, 227, 0.5);
  flex-shrink: 0;
}

/* ============ SECTION BASICS ============ */
.section-kicker {
  font-size: 11px; letter-spacing: 0.38em;
  color: var(--emerald);
  margin-bottom: clamp(18px, 3vh, 32px);
}

/* ============ STATS ============ */
.stats {
  position: relative; z-index: 10;
  background: var(--ink);
  padding: clamp(90px, 14vh, 170px) var(--pad);
}
.stats-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(36px, 5vw, 64px) clamp(28px, 4vw, 56px);
}
.stat { border-top: 1px solid var(--hairline); padding-top: 22px; }
.stat-num {
  display: flex; align-items: baseline;
  font-family: var(--display);
  font-size: clamp(64px, 8.5vw, 130px);
  line-height: 1;
  color: var(--cream);
}
.stat-suffix { color: var(--emerald); font-size: 0.55em; margin-left: 4px; }
.count { font-variant-numeric: tabular-nums; }
.stat-label {
  display: block; margin-top: 12px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-dim);
  max-width: 30ch;
}

/* ============ PILLARS ============ */
.pillars { position: relative; height: 320vh; }
.pillars-sticky {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.bg-video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
.bg-shade {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to bottom, rgba(5, 6, 5, 0.66) 0%, rgba(5, 6, 5, 0.25) 40%, rgba(5, 6, 5, 0.88) 100%);
}
.pillars-head {
  position: absolute; top: clamp(90px, 14vh, 150px); left: var(--pad); right: var(--pad); z-index: 3;
}
.pillars-title {
  font-family: var(--display);
  font-size: clamp(38px, 6.5vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.pillar-cards {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 24px);
  padding: 0 var(--pad) clamp(36px, 6vh, 64px);
}
.pillar {
  background: rgba(7, 9, 7, 0.78);
  border: 1px solid var(--hairline);
  padding: clamp(20px, 2.4vw, 34px);
  border-radius: 4px;
  transform-style: preserve-3d;
  transition: border-color 0.4s ease;
  will-change: transform;
}
.pillar:hover { border-color: rgba(12, 232, 130, 0.5); }
.pillar-index {
  display: block;
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--emerald);
  margin-bottom: clamp(16px, 3vh, 40px);
}
.pillar h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 40px);
  line-height: 1.02;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.pillar p {
  font-size: 14px; line-height: 1.6;
  color: var(--cream-dim);
}
@media (max-width: 860px) {
  .pillars { height: auto; }
  .pillars-sticky {
    position: relative; height: auto; min-height: 100vh; min-height: 100dvh;
    justify-content: center;
    padding-top: clamp(80px, 12vh, 120px);
  }
  .pillars-head { position: relative; top: auto; margin-bottom: 28px; padding: 0 var(--pad); }
  .pillar-cards { grid-template-columns: 1fr; padding-bottom: 40px; }
  .pillar { padding: 18px 20px; }
  .pillar h3 br { display: none; }
}

/* ============ WORK ============ */
.work { position: relative; }
.work-bg {
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(0);
}
.work-bg .bg-video {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh; height: 100dvh;
}
.bg-shade--work {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  background:
    linear-gradient(to right, rgba(5, 6, 5, 0.92) 0%, rgba(5, 6, 5, 0.55) 60%, rgba(5, 6, 5, 0.35) 100%);
}
.work-inner {
  position: relative; z-index: 3;
  padding: clamp(110px, 18vh, 200px) var(--pad);
}
.work-title {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 150px);
  line-height: 0.9;
  margin-bottom: clamp(48px, 8vh, 90px);
}
.work-list { display: flex; flex-direction: column; }
.work-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "idx name arrow" "idx desc arrow";
  column-gap: clamp(18px, 3vw, 48px);
  align-items: center;
  padding: clamp(22px, 3.6vh, 40px) 0;
  border-top: 1px solid var(--hairline);
  position: relative;
  transition: padding-left 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.work-row:last-child { border-bottom: 1px solid var(--hairline); }
.work-row::before {
  content: ''; position: absolute; left: 0; top: -1px;
  width: 100%; height: 1px; background: var(--emerald);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.work-row:hover::before { transform: scaleX(1); }
.work-row:hover { padding-left: clamp(10px, 1.6vw, 26px); }
.work-idx {
  grid-area: idx;
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--emerald);
}
.work-name {
  grid-area: name;
  font-family: var(--display);
  font-size: clamp(26px, 4.4vw, 68px);
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.35s ease;
}
.work-row:hover .work-name { color: var(--emerald); }
.work-desc {
  grid-area: desc;
  margin-top: 8px;
  font-size: 14px; line-height: 1.55;
  color: var(--cream-dim);
  max-width: 60ch;
}
.work-arrow {
  grid-area: arrow;
  font-size: clamp(22px, 3vw, 40px);
  color: var(--cream-dim);
  transform: translateX(-8px);
  transition: transform 0.4s ease, color 0.4s ease;
}
.work-row:hover .work-arrow { transform: translateX(0); color: var(--emerald); }

/* ============ FINALE ============ */
.finale {
  position: relative; z-index: 10;
  background: var(--ink);
  min-height: 92vh;
  min-height: 92dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(110px, 16vh, 180px) var(--pad);
  overflow: hidden;
}
.finale-title {
  position: relative; z-index: 2;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 8.4vw, 140px);
  line-height: 0.96;
  text-transform: uppercase;
  max-width: 12ch;
  margin-bottom: clamp(40px, 7vh, 72px);
}
.finale-word { display: inline-block; margin: 0 0.12em; }
.finale-word--accent { color: var(--emerald); }
.finale-ctas {
  position: relative; z-index: 2;
  display: flex; gap: clamp(14px, 2vw, 24px); flex-wrap: wrap; justify-content: center;
}
.btn {
  display: inline-block;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: clamp(16px, 2vw, 20px) clamp(30px, 4vw, 46px);
  border-radius: 999px;
  will-change: transform;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.btn--solid {
  background: var(--emerald); color: var(--ink);
  border: 1px solid var(--emerald);
  font-weight: 500;
}
.btn--solid:hover { background: var(--cream); border-color: var(--cream); }
.btn--ghost {
  border: 1px solid var(--hairline); color: var(--cream);
}
.btn--ghost:hover { border-color: var(--emerald); color: var(--emerald); }

/* ============ FOOTER ============ */
.footer {
  position: relative; z-index: 10;
  background: var(--ink-2);
  border-top: 1px solid var(--hairline);
  padding: clamp(40px, 6vh, 64px) var(--pad) clamp(24px, 4vh, 36px);
}
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  margin-bottom: clamp(30px, 5vh, 48px);
}
.footer-mark {
  font-family: var(--display);
  font-size: 30px;
}
.footer-mark span { color: var(--emerald); }
.footer-links { display: flex; gap: clamp(18px, 3vw, 40px); flex-wrap: wrap; }
.footer-links a {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-dim);
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--emerald); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 11px; letter-spacing: 0.14em;
  color: rgba(242, 237, 227, 0.35);
}

/* ============ REVEAL DEFAULTS (JS toggles) ============ */
.js [data-reveal] { opacity: 0; transform: translateY(46px); }
.js [data-fword] { opacity: 0; transform: translateY(70%) rotate(3deg); }
.js .pillar { opacity: 0; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue, .dust { display: none; }
  .js [data-reveal], .js [data-fword], .js .pillar {
    opacity: 1 !important; transform: none !important;
  }
  .marquee-track { transform: none !important; }
  /* collapse scrub runways — no scrub means no reason to scroll through them */
  .hero { height: 100vh; height: 100dvh; }
  .pillars { height: auto; }
  .pillars-sticky { position: relative; }
}

@media (min-width: 861px) {
  .pillar {
    background: rgba(7, 9, 7, 0.62);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
