/* ============================================================
   JAY STANTS — cinematic scroll portfolio
   ink black · emerald accent · cream type
   ============================================================ */

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

:root {
  --ink: #050605;
  --ink-2: #0a0d0b;
  --cream: #f2ecdd;
  --cream-dim: rgba(242, 236, 221, 0.55);
  --emerald: #17e68c;
  --emerald-deep: #0a8f55;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Space Grotesk', 'Segoe UI', sans-serif;
}

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

html { background: var(--ink); }
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);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { text-align: center; }
.loader__name {
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1;
}
.loader__name::after { content: ''; display: inline-block; width: 0.18em; height: 0.18em; background: var(--emerald); margin-left: 0.08em; }
.loader__bar {
  width: min(320px, 60vw); height: 2px;
  background: rgba(242, 236, 221, 0.12);
  margin: 2rem auto 0.8rem;
  overflow: hidden;
}
.loader__fill { height: 100%; width: 0%; background: var(--emerald); transition: width 0.2s ease; }
.loader__pct { font-size: 0.75rem; letter-spacing: 0.3em; color: var(--cream-dim); }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%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");
  opacity: 0.035;
  animation: grain 0.8s steps(4) infinite;
}
@media (max-width: 820px) {
  .grain { opacity: 0.028; animation: none; }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  mix-blend-mode: normal;
  transition: transform 0.4s ease;
}
.nav__logo {
  font-family: var(--display);
  font-size: 1.6rem; color: var(--cream); text-decoration: none;
  letter-spacing: 0.03em;
}
.nav__dot { color: var(--emerald); }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a {
  color: var(--cream-dim); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.22em; font-weight: 500;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--emerald); }
.nav__cta {
  border: 1px solid rgba(242, 236, 221, 0.25);
  padding: 0.55em 1.2em; border-radius: 999px;
  color: var(--cream) !important;
}
.nav__cta:hover { border-color: var(--emerald); }

/* ---------- hero ---------- */
.hero { height: 520vh; position: relative; }
.hero__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(5, 6, 5, 0.75) 100%),
    linear-gradient(to top, rgba(5, 6, 5, 0.9), transparent 30%),
    linear-gradient(to bottom, rgba(5, 6, 5, 0.55), transparent 25%);
}
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
  padding: 0 4vw;
}
.hero__kicker {
  font-size: clamp(0.6rem, 1vw, 0.8rem);
  letter-spacing: 0.45em; color: var(--emerald);
  margin-bottom: 1.6rem; font-weight: 500;
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(4.5rem, 16.5vw, 15.5rem);
  line-height: 0.88;
  letter-spacing: 0.015em;
  color: var(--cream);
  text-transform: uppercase;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--emerald);
}
.hero__title .ltr {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}
.hero__title.is-in .ltr { transform: translateY(0) rotate(0); opacity: 1; }
.hero__sub {
  margin-top: 2rem;
  font-size: clamp(0.95rem, 1.6vw, 1.35rem);
  color: var(--cream-dim);
  letter-spacing: 0.06em;
  font-weight: 400;
}
.hero__scrollcue {
  position: absolute; bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.65rem; letter-spacing: 0.4em; color: var(--cream-dim);
}
.hero__scrollline {
  width: 1px; height: 48px;
  background: linear-gradient(var(--emerald), transparent);
  animation: scrollcue 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}
[data-hero-fade] { transition: opacity 0.3s linear; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  padding: 3.2rem 0;
  border-top: 1px solid rgba(242, 236, 221, 0.08);
  border-bottom: 1px solid rgba(242, 236, 221, 0.08);
  background: var(--ink);
  position: relative; z-index: 5;
}
.marquee__track {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 236, 221, 0.28);
  will-change: transform;
}
.marquee__track span { display: inline-block; }

/* ---------- stats ---------- */
.stats {
  position: relative; z-index: 5;
  background: var(--ink);
  padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 5vw, 4rem);
}
.stats__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; max-width: 1400px; margin: 0 auto;
}
.stat { text-align: center; padding: 2rem 1rem; position: relative; }
.stat + .stat::before {
  content: ''; position: absolute; left: -1rem; top: 15%; bottom: 15%;
  width: 1px; background: rgba(242, 236, 221, 0.1);
}
.stat__num {
  font-family: var(--display);
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  color: var(--cream); line-height: 1;
}
.stat__suffix { color: var(--emerald); }
.stat__label {
  margin-top: 1rem;
  font-size: 0.75rem; letter-spacing: 0.32em;
  color: var(--cream-dim); text-transform: uppercase;
}

/* ---------- section headers ---------- */
.section-kicker {
  font-size: 0.72rem; letter-spacing: 0.45em;
  color: var(--emerald); font-weight: 500; margin-bottom: 1rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 7.5vw, 7rem);
  line-height: 0.95; color: var(--cream);
  text-transform: uppercase;
}

/* ---------- pillars ---------- */
.pillars { height: 440vh; position: relative; }
.pillars__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 clamp(1.2rem, 6vw, 6rem);
}
.pillars__video, .work__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.pillars__shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(5, 6, 5, 0.92) 30%, rgba(5, 6, 5, 0.45) 70%, rgba(5, 6, 5, 0.75));
}
.pillars__head { position: relative; z-index: 2; margin-bottom: clamp(2rem, 6vh, 4.5rem); }
.pillars__list { position: relative; z-index: 2; display: flex; flex-direction: column; gap: clamp(1.4rem, 4vh, 3rem); max-width: 780px; }
.pillar {
  display: grid; grid-template-columns: auto 1fr; column-gap: 1.6rem;
  opacity: 0.14;
  transform: translateX(-24px);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar.is-active { opacity: 1; transform: translateX(0); }
.pillar__index {
  grid-row: span 2;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  color: transparent; -webkit-text-stroke: 1.5px var(--emerald);
  line-height: 1.1;
}
.pillar__name {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 3.4rem);
  color: var(--cream); line-height: 1; letter-spacing: 0.015em;
}
.pillar__desc {
  margin-top: 0.7rem;
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  color: var(--cream-dim); max-width: 56ch; line-height: 1.6;
}
.pillar.is-active .pillar__desc { color: rgba(242, 236, 221, 0.78); }

/* ---------- work ---------- */
.work { position: relative; padding: clamp(6rem, 14vh, 11rem) clamp(1.2rem, 6vw, 6rem); overflow: hidden; }
.work__shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(5, 6, 5, 0.88), rgba(5, 6, 5, 0.72) 40%, rgba(5, 6, 5, 0.92));
}
.work__inner { position: relative; z-index: 2; max-width: 1500px; margin: 0 auto; }
.work__cards {
  margin-top: clamp(2.5rem, 7vh, 5rem);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
  perspective: 1200px;
}
.card {
  position: relative;
  border: 1px solid rgba(242, 236, 221, 0.14);
  background: rgba(5, 6, 5, 0.55);
  backdrop-filter: blur(6px);
  padding: 2.2rem 1.9rem 4.2rem;
  min-height: 320px;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, background 0.35s, opacity 0.8s ease, translate 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  cursor: pointer;
}
.card[data-reveal] { opacity: 0; translate: 0 60px; }
.card.is-revealed { opacity: 1; translate: 0 0; }
.card:hover {
  border-color: var(--emerald);
  background: rgba(10, 20, 14, 0.7);
}
.card__tag {
  display: inline-block;
  font-size: 0.62rem; letter-spacing: 0.35em; font-weight: 700;
  color: var(--emerald);
  border: 1px solid rgba(23, 230, 140, 0.4);
  padding: 0.4em 0.9em; border-radius: 999px;
  margin-bottom: 1.6rem;
}
.card__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.02; color: var(--cream); letter-spacing: 0.02em;
}
.card__pitch {
  margin-top: 1.1rem;
  font-size: 0.95rem; line-height: 1.65; color: var(--cream-dim);
}
.card__arrow {
  position: absolute; right: 1.8rem; bottom: 1.5rem;
  font-size: 1.5rem; color: var(--emerald);
  transform: translateX(-8px); opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.card:hover .card__arrow { transform: translateX(0); opacity: 1; }

/* ---------- finale ---------- */
.finale {
  position: relative; z-index: 5;
  background: var(--ink);
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(6rem, 15vh, 10rem) clamp(1.2rem, 5vw, 4rem) 0;
  border-top: 1px solid rgba(242, 236, 221, 0.08);
}
.finale__inner { text-align: center; max-width: 1500px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.finale__title {
  font-family: var(--display);
  font-size: clamp(3.4rem, 11vw, 11rem);
  line-height: 0.92; text-transform: uppercase;
  color: var(--cream);
}
.finale__row { display: block; overflow: hidden; }
.finale__row > .frow {
  display: inline-block; transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.finale__title.is-in .frow { transform: translateY(0); }
.finale__row--accent { color: transparent; -webkit-text-stroke: 2px var(--emerald); }
.finale__sub {
  margin-top: 2.2rem; color: var(--cream-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem); letter-spacing: 0.05em;
}
.finale__actions {
  margin-top: 3.2rem;
  display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap;
}
.btn {
  font-family: var(--body); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.25em;
  text-decoration: none;
  padding: 1.15em 2.6em; border-radius: 999px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.btn--solid {
  background: var(--emerald); color: var(--ink);
}
.btn--solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(23, 230, 140, 0.35);
}
.btn--ghost {
  border: 1px solid rgba(242, 236, 221, 0.3); color: var(--cream);
}
.btn--ghost:hover {
  border-color: var(--emerald); color: var(--emerald);
  transform: translateY(-3px);
}

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: 2.4rem 0;
  margin-top: clamp(4rem, 10vh, 8rem);
  border-top: 1px solid rgba(242, 236, 221, 0.08);
  font-size: 0.68rem; letter-spacing: 0.28em; color: var(--cream-dim);
}
.footer__links { display: flex; gap: 2rem; }
.footer__links a { color: var(--cream-dim); text-decoration: none; transition: color 0.25s; }
.footer__links a:hover { color: var(--emerald); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stats__grid { grid-template-columns: 1fr; gap: 0; }
  .stat + .stat::before { left: 20%; right: 20%; top: 0; bottom: auto; width: auto; height: 1px; }
  .work__cards { grid-template-columns: 1fr; }
  .nav__links a:not(.nav__cta) { display: none; }
  .hero__line--accent { -webkit-text-stroke-width: 1.2px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__scrollline { animation: none; }
}
