:root {
  --ink: #0b0d0a;
  --ink-2: #101410;
  --cream: #f2ead9;
  --cream-dim: rgba(242, 234, 217, 0.55);
  --emerald: #17f083;
  --emerald-deep: #0a9e54;
}

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

html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: "Instrument Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

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

/* ---------- Grain ---------- */
.grain {
  position: fixed;
  inset: -50%;
  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='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ---------- Nav ---------- */
.pnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  mix-blend-mode: difference;
}
.pnav-mark { font-family: "Anton", sans-serif; font-size: 16px; letter-spacing: 0.12em; }
.pnav-mark .tick { color: var(--emerald); margin: 0 3px; }
.pnav-status { display: flex; align-items: center; gap: 9px; color: var(--cream-dim); font-size: 11px; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } }
.pnav-cta {
  color: var(--cream);
  text-decoration: none;
  font-size: 11px;
  padding: 10px 20px;
  border: 1px solid rgba(242,234,217,0.4);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pnav-cta:hover { background: var(--emerald); border-color: var(--emerald); color: var(--ink); }

/* ---------- Typography ---------- */
.mega {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 12rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cream);
}
.mega em {
  font-style: normal;
  color: var(--emerald);
  -webkit-text-stroke: 0;
}
.mega.med { font-size: clamp(2.6rem, 8vw, 7rem); }
.sub {
  margin-top: 26px;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.act-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--emerald);
  margin-bottom: 26px;
}

/* Kinetic letters */
.kinetic .kchar {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotate(4deg);
  animation: kchar-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes kchar-in { to { opacity: 1; transform: translateY(0) rotate(0); } }

/* ---------- Scrub act ---------- */
.act.scrub { position: relative; height: 520vh; padding: 0; }
#builder, #closer { height: 460vh; }
.act.scrub .sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--ink);
}
.act.scrub canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.haze {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 45%, transparent 40%, rgba(6,8,5,0.82) 100%),
    linear-gradient(180deg, rgba(6,8,5,0.6) 0%, transparent 22%, transparent 72%, rgba(6,8,5,0.85) 100%);
}
.overlay { position: absolute; inset: 0; z-index: 10; text-align: center; }
.reveal-line {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
  opacity: 0;
  will-change: opacity, transform;
}

.frame-meta {
  position: absolute;
  z-index: 12;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(242,234,217,0.5);
}
.frame-meta.tl { top: 84px; left: 30px; }
.frame-meta.tr { top: 84px; right: 30px; }
.frame-meta.bl { bottom: 78px; left: 30px; color: var(--emerald); }
.frame-meta.br { bottom: 34px; right: 30px; }

/* ---------- Stats strip ---------- */
.strip {
  border-top: 1px solid rgba(242,234,217,0.14);
  border-bottom: 1px solid rgba(242,234,217,0.14);
  background: var(--ink-2);
}
.strip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
}
.fig {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 54px 20px;
  border-right: 1px solid rgba(242,234,217,0.1);
}
.fig:last-child { border-right: none; }
.fig-num {
  font-family: "Anton", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  color: var(--emerald);
  line-height: 1;
}
.fig-cap {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ---------- Acts (static) ---------- */
.act { position: relative; padding: 150px 7vw; }
.pillars-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(23,240,131,0.07), transparent 65%),
    radial-gradient(50% 40% at 10% 90%, rgba(23,240,131,0.05), transparent 60%);
  pointer-events: none;
}

/* ---------- Pillars ---------- */
.pillar-list { margin-top: 70px; }
.pillar {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 40px;
  padding: 46px 0;
  border-top: 1px solid rgba(242,234,217,0.14);
  transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s;
  opacity: 0;
  transform: translateY(40px);
}
.pillar.in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s ease, padding-left 0.35s; }
.pillar:last-child { border-bottom: 1px solid rgba(242,234,217,0.14); }
.pillar:hover { padding-left: 26px; background: linear-gradient(90deg, rgba(23,240,131,0.05), transparent 60%); }
.pillar-index {
  font-family: "Anton", sans-serif;
  font-size: 1.6rem;
  color: var(--emerald);
  grid-row: span 2;
  align-self: start;
}
.pillar h3 {
  font-family: "Anton", sans-serif;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  letter-spacing: 0.02em;
}
.pillar p { color: var(--cream-dim); max-width: 620px; line-height: 1.7; font-size: 1rem; }

/* ---------- Work ---------- */
.work-grid {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
}
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 52px 40px 60px;
  background: var(--ink-2);
  border: 1px solid rgba(242,234,217,0.1);
  text-decoration: none;
  color: var(--cream);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s;
  opacity: 0;
  transform: translateY(40px);
}
.work-card.in { opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.35s; }
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,240,131,0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
}
.work-card:hover { transform: translateY(-8px); border-color: var(--emerald); }
.work-card:hover::before { opacity: 1; }
.work-card:hover .work-arrow { transform: translateX(8px); color: var(--emerald); }
.work-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; color: var(--emerald); }
.work-card h3 { font-family: "Anton", sans-serif; font-size: clamp(1.7rem, 3vw, 2.6rem); }
.work-card p { color: var(--cream-dim); line-height: 1.65; font-size: 0.95rem; }
.work-arrow { font-size: 1.6rem; margin-top: auto; transition: transform 0.3s, color 0.3s; }

/* ---------- Finale ---------- */
.finale {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 30px;
  background:
    radial-gradient(70% 55% at 50% 100%, rgba(23,240,131,0.1), transparent 65%),
    var(--ink);
}
.finale-btns { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 12px; }
.pbtn {
  font-family: "Anton", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  padding: 20px 44px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s, color 0.3s, box-shadow 0.3s;
}
.pbtn.solid {
  background: var(--emerald);
  color: var(--ink);
  box-shadow: 0 14px 50px rgba(23,240,131,0.3);
}
.pbtn.solid:hover { transform: translateY(-4px); box-shadow: 0 22px 70px rgba(23,240,131,0.45); }
.pbtn.ghost {
  color: var(--cream);
  border: 1px solid rgba(242,234,217,0.4);
}
.pbtn.ghost:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-4px); }

.pfoot {
  margin-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.pfoot-social { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; }
.pfoot-social a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  transition: color 0.25s;
}
.pfoot-social a:hover { color: var(--emerald); }
.pfoot-fine { font-size: 10px; letter-spacing: 0.3em; color: rgba(242,234,217,0.35); }

/* ---------- Skip intro ---------- */
.skip-intro {
  position: fixed;
  bottom: 26px; left: 30px;
  z-index: 85;
  font-family: "Instrument Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--cream-dim);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid rgba(242,234,217,0.25);
  background: rgba(11,13,10,0.55);
  backdrop-filter: blur(6px);
  transition: color 0.25s, border-color 0.25s;
}
.skip-intro:hover { color: var(--emerald); border-color: var(--emerald); }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .pnav { padding: 14px 16px; }
  .pnav-status { display: none; }
  .frame-meta.tl, .frame-meta.tr { top: 66px; }
  .act { padding: 100px 6vw; }
  .pillar { grid-template-columns: 1fr; }
  .pillar-index { grid-row: auto; }
  .fig { flex: 1 1 45%; border-right: none; padding: 34px 12px; }
}
