/* ============================================================
   KODEY TOMAKA — cinematic 3D-scroll portfolio
   ink black / emerald / cream
   ============================================================ */
:root {
  --ink: #050605;
  --ink-2: #0a0c0b;
  --emerald: #10df8f;
  --emerald-deep: #0a8f5c;
  --cream: #f3eddd;
  --cream-dim: rgba(243, 237, 221, 0.55);
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", -apple-system, "Helvetica Neue", sans-serif;
}

* { 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);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.accent { color: var(--emerald); }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -100px; z-index: 90; pointer-events: none;
  opacity: 0.07;
  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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 30px); }
  50% { transform: translate(30px, -50px); }
  75% { transform: translate(-30px, -20px); }
  100% { transform: translate(0, 0); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  mix-blend-mode: normal;
}
.nav__logo {
  font-family: var(--display); font-size: 26px; letter-spacing: 0.04em;
  color: var(--cream); text-decoration: none;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--cream-dim); text-decoration: none; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--emerald); }
.nav__pill {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(243, 237, 221, 0.2); border-radius: 100px;
  padding: 8px 16px; font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cream); text-decoration: none;
  transition: border-color 0.25s, background 0.25s;
}
.nav__pill:hover { border-color: var(--emerald); background: rgba(16, 223, 143, 0.06); }
.nav__pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- shared scene / sticky ---------- */
.sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}

.section-eyebrow {
  font-size: 12px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 28px;
}
.section-eyebrow::before { content: "— "; }

/* ---------- hero ---------- */
.hero-wrap { height: 420vh; position: relative; }
.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;
}
.hero__eyebrow {
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--cream-dim); margin-bottom: 20px; overflow: hidden;
}
.hero__eyebrow span { display: inline-block; }
.hero__title {
  font-family: var(--display);
  font-size: clamp(64px, 14.5vw, 240px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-transform: uppercase;
  display: flex; flex-wrap: wrap; justify-content: center;
}
.hero__title .word { display: flex; overflow: hidden; padding: 0 0.12em; }
.hero__title .ch {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  will-change: transform;
}
.hero__subtitle {
  margin-top: 26px;
  font-size: clamp(14px, 1.6vw, 20px);
  letter-spacing: 0.55em; text-transform: uppercase;
  color: var(--emerald);
  opacity: 0; transform: translateY(14px);
  will-change: opacity, transform;
}
.hero__hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 6; display: flex; align-items: center; gap: 14px;
}
.hero__hint-label {
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream-dim);
}
.hero__hint-bar {
  width: 120px; height: 2px; background: rgba(243,237,221,0.15);
  display: block; overflow: hidden;
}
.hero__hint-bar span {
  display: block; height: 100%; width: 0%;
  background: var(--emerald);
}

/* ---------- marquee + stats ---------- */
.stats { background: var(--ink); position: relative; z-index: 10; padding-bottom: 16vh; }
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid rgba(243,237,221,0.08);
  border-bottom: 1px solid rgba(243,237,221,0.08);
  padding: 18px 0; margin-bottom: 14vh;
}
.marquee__inner {
  display: inline-block; white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 40px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 237, 221, 0.35);
  letter-spacing: 0.06em;
  will-change: transform;
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px; max-width: 1280px; margin: 0 auto; padding: 0 40px;
}
.stat { border-left: 1px solid rgba(16,223,143,0.35); padding-left: 24px; }
.stat__value {
  font-family: var(--display);
  font-size: clamp(48px, 6.5vw, 96px);
  color: var(--cream); line-height: 1;
}
.stat__value .suffix { color: var(--emerald); }
.stat__label {
  margin-top: 10px; font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cream-dim);
}

/* ---------- pillars ---------- */
.pillars-wrap { height: 380vh; position: relative; }
.pillars__content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8vw; pointer-events: none;
}
.pillars__list { list-style: none; }
.pillar {
  display: flex; align-items: baseline; gap: 3vw;
  padding: 3.2vh 0;
  border-bottom: 1px solid rgba(243,237,221,0.1);
  opacity: 0.12;
  transform: translateX(-24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.pillar.active { opacity: 1; transform: translateX(0); }
.pillar__num {
  font-family: var(--display); font-size: clamp(16px, 2vw, 26px);
  color: var(--emerald);
}
.pillar__title {
  font-family: var(--display);
  font-size: clamp(40px, 7.5vw, 110px);
  line-height: 0.95; color: var(--cream); text-transform: uppercase;
  flex: 1;
}
.pillar__copy {
  max-width: 320px; font-size: 14px; line-height: 1.65;
  color: var(--cream-dim);
}

/* ---------- work ---------- */
.work-wrap { height: 360vh; position: relative; }
.work__content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 6vw;
}
.work__title {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 170px);
  line-height: 0.9; color: transparent;
  -webkit-text-stroke: 1.5px rgba(243,237,221,0.65);
  text-transform: uppercase;
  margin-bottom: 6vh;
  will-change: transform;
}
.work__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: rgba(8, 10, 9, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(243,237,221,0.1);
  padding: 24px 24px 22px;
  color: inherit; text-decoration: none; display: block;
  opacity: 0; transform: translateY(60px);
  transition: opacity 0.7s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease, background 0.3s ease;
  will-change: transform, opacity;
  cursor: pointer;
  position: relative; overflow: hidden;
}
.card.visible { opacity: 1; transform: translateY(0); }
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--emerald);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover { border-color: rgba(16,223,143,0.5); background: rgba(10, 14, 12, 0.85); }
.card:hover::after { transform: scaleX(1); }
.card__tag {
  font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 18px;
}
.card__title {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 32px);
  color: var(--cream); text-transform: uppercase; margin-bottom: 12px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .card__title { transform: translateX(8px); }
.card__pitch { font-size: 14px; line-height: 1.6; color: var(--cream-dim); }
.card__arrow {
  position: absolute; top: 26px; right: 24px;
  color: var(--cream-dim); font-size: 18px;
  transition: transform 0.35s, color 0.35s;
}
.card:hover .card__arrow { transform: translate(4px, -4px); color: var(--emerald); }

/* ---------- finale ---------- */
.finale {
  position: relative; z-index: 10; background: var(--ink);
  min-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16vh 6vw 0;
}
.finale__title {
  font-family: var(--display);
  font-size: clamp(44px, 8.5vw, 150px);
  line-height: 0.95; text-align: center; text-transform: uppercase;
  color: var(--cream); max-width: 14em;
}
.finale__title .word { display: inline-flex; overflow: hidden; padding: 0 0.1em; }
.finale__title .ch {
  display: inline-block; transform: translateY(115%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.finale.in-view .finale__title .ch { transform: translateY(0); }
.finale__actions { display: flex; gap: 18px; margin-top: 7vh; flex-wrap: wrap; justify-content: center; }
.btn {
  font-family: var(--body); font-weight: 600; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  padding: 18px 40px; border-radius: 100px;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--emerald); color: #04140d; }
.btn--primary:hover { background: #2df0a5; }
.btn--ghost { border: 1px solid rgba(243,237,221,0.3); color: var(--cream); }
.btn--ghost:hover { border-color: var(--emerald); color: var(--emerald); }
.finale__footer {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10vh 0 30px;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-dim);
}
.finale__socials { display: flex; gap: 22px; }
.finale__socials a {
  color: var(--cream-dim); text-decoration: none;
  transition: color 0.25s;
}
.finale__socials a:hover { color: var(--emerald); }

/* ---------- gallery page ---------- */
.gallery-page { background: var(--ink); }
.ghead {
  padding: 20vh 6vw 6vh;
  max-width: 1600px; margin: 0 auto;
}
.ghead__title {
  font-family: var(--display);
  font-size: clamp(72px, 15vw, 240px);
  line-height: 0.9; color: var(--cream); letter-spacing: 0.01em;
}
.ghead__sub {
  margin-top: 24px; font-size: 15px; color: var(--cream-dim);
  letter-spacing: 0.04em; display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap;
}
.ghead__prints {
  color: var(--emerald); text-decoration: none; font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.ghead__prints:hover { text-decoration: underline; }
.masonry {
  columns: 3; column-gap: 18px;
  padding: 0 6vw 10vh; max-width: 1600px; margin: 0 auto;
}
.shot {
  break-inside: avoid; margin: 0 0 18px; position: relative;
  overflow: hidden; cursor: zoom-in;
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(243,237,221,0.06);
}
.shot.in { opacity: 1; transform: none; }
.shot img {
  width: 100%; display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  filter: saturate(0.92);
}
.shot:hover img { transform: scale(1.04); filter: saturate(1.05); }
.shot::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid rgba(16,223,143,0);
  transition: border-color 0.4s ease;
  pointer-events: none;
}
.shot:hover::after { border-color: rgba(16,223,143,0.6); }
.shot figcaption {
  position: absolute; left: 14px; bottom: 10px;
  font-family: var(--display); font-size: 13px;
  color: var(--cream); opacity: 0;
  letter-spacing: 0.2em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  transition: opacity 0.35s ease;
}
.shot:hover figcaption { opacity: 0.85; }
.gfoot {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  flex-wrap: wrap; padding: 0 6vw 12vh;
}
.gfoot__links { display: flex; gap: 22px; margin-left: 12px; }
.gfoot__links a {
  color: var(--cream-dim); text-decoration: none; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.gfoot__links a:hover { color: var(--emerald); }
.lightbox {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(3, 4, 3, 0.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 90vh; object-fit: contain;
  box-shadow: 0 0 80px rgba(16,223,143,0.12);
}
@media (max-width: 1100px) { .masonry { columns: 2; } }
@media (max-width: 640px)  { .masonry { columns: 1; } .ghead { padding-top: 16vh; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav__links { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); padding: 0 24px; }
  .work__cards { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 22px 20px; }
  .pillar { flex-wrap: wrap; gap: 12px; }
  .pillar__copy { max-width: 100%; }
  .finale__footer { flex-direction: column; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__title .ch, .finale__title .ch { transform: none; }
  .hero__subtitle { opacity: 1; transform: none; }
  .card { opacity: 1; transform: none; }
  .pillar { opacity: 1; transform: none; }
}
