/* ============================================================
   UPPER INT GAMES — "Uppercase" landing (option 20)
   structural black · monument fuchsia · momentum orange ·
   architectural cream · Anton + Space Grotesk
   ============================================================ */

:root {
  --ink: #080708;
  --ink-2: #100d0e;
  --cream: #F2D2A4;
  --cream-dim: rgba(242, 210, 164, 0.55);
  --fuchsia: #D8004C;
  --orange: #FF8A00;
  --display: "Anton", "Arial Narrow", sans-serif;
  --body: "Space Grotesk", "Helvetica Neue", sans-serif;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { 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: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; height: 100vh; }

::selection { background: var(--fuchsia); color: var(--cream); }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; }

em.b-int { font-style: normal; color: var(--orange); }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner { width: min(560px, 82vw); }
.preloader__medallion {
  width: min(340px, 64vw); margin: 0 auto 34px;
  filter: drop-shadow(0 22px 50px rgba(216, 0, 76, 0.22));
  animation: pre-breathe 2.6s ease-in-out infinite;
}
.preloader__medallion img { width: 100%; height: auto; display: block; }
@keyframes pre-breathe { 50% { transform: scale(1.025); } }
.preloader__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-dim); margin-bottom: 10px;
}
.preloader__pct { color: var(--orange); font-variant-numeric: tabular-nums; }
.preloader__bar {
  height: 1px; background: rgba(242, 210, 164, 0.14); overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--fuchsia), var(--orange));
  transition: width 0.25s ease-out;
}
.preloader.is-done { animation: pre-exit 0.8s var(--ease-out) forwards; }
@keyframes pre-exit {
  to { clip-path: inset(0 0 100% 0); visibility: hidden; }
}

/* ============ GRAIN + SCROLL PROGRESS ============ */
.grain {
  position: fixed; inset: -100px; z-index: 90; pointer-events: none;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.055;
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 22px); }
  50% { transform: translate(30px, -34px); }
  75% { transform: translate(-22px, -12px); }
  100% { transform: translate(0, 0); }
}

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80;
}
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--fuchsia), var(--orange));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}
body:not(.is-loading) .nav { opacity: 1; }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand-logo {
  height: 54px; width: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.4s var(--ease-out);
}
.nav__brand:hover .nav__brand-logo { transform: scale(1.05); }
.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); mix-blend-mode: difference; }
.nav__links a {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream);
  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: 100% 50%;
  transition: transform 0.45s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.lang-toggle { display: flex; align-items: center; gap: 6px; mix-blend-mode: difference; }
.lang-toggle__btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--body); font-size: 12px; letter-spacing: 0.14em;
  color: var(--cream); opacity: 0.45;
  padding: 4px 2px;
  transition: opacity 0.3s ease;
}
.lang-toggle__btn.is-active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.lang-toggle__btn:hover { opacity: 1; }
.lang-toggle__sep { color: var(--cream); opacity: 0.35; font-size: 12px; }

/* ============ HERO ============ */
.hero { height: 520vh; position: relative; }
.hero__pin {
  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 120% 90% at 50% 45%, transparent 55%, rgba(8, 7, 8, 0.85) 100%),
    linear-gradient(180deg, rgba(8, 7, 8, 0.55) 0%, transparent 22%, transparent 72%, rgba(8, 7, 8, 0.8) 100%);
}

.hero__title {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; pointer-events: none;
  z-index: 3;
}
.hero__line {
  font-size: clamp(56px, 12.5vw, 216px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  color: var(--cream);
  display: flex; overflow: hidden;
  padding-top: 0.15em; margin-top: -0.15em; /* headroom so glyph tops aren't clipped by the reveal mask */
}
.hero__line .ch {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform, opacity;
}
.hero__line--2 { color: transparent; -webkit-text-stroke: 2px var(--orange); }

.hero__subtitle {
  position: absolute; left: 50%; bottom: 15vh; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  font-size: clamp(11px, 1.3vw, 15px);
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
  z-index: 3;
}
.hero__subtitle-rule { width: 56px; height: 1px; background: var(--fuchsia); display: inline-block; }

.hero__coords {
  position: absolute; left: clamp(20px, 4vw, 48px); bottom: 40px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.16em; color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.hero__coords-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero__hint {
  position: absolute; right: clamp(20px, 4vw, 48px); bottom: 40px; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream-dim);
}
.hero__hint-line {
  width: 1px; height: 44px; background: var(--cream-dim);
  transform-origin: 50% 0;
  animation: hint-drop 1.8s var(--ease-out) infinite;
}
@keyframes hint-drop {
  0% { transform: scaleY(0); transform-origin: 50% 0; }
  45% { transform: scaleY(1); transform-origin: 50% 0; }
  55% { transform: scaleY(1); transform-origin: 50% 100%; }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* ============ MANIFESTO ============ */
.manifesto {
  position: relative; z-index: 4;
  background: var(--ink);
  padding: clamp(90px, 14vh, 160px) clamp(20px, 5vw, 64px);
  border-top: 1px solid rgba(242, 210, 164, 0.08);
}
.manifesto__kicker {
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 40px;
}
.manifesto__line {
  font-size: clamp(38px, 6.4vw, 108px);
  line-height: 1.02;
  color: var(--cream);
  max-width: 14em;
}
.manifesto__line .w {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding-top: 0.16em; margin-top: -0.16em;
}
.manifesto__line .w > span { display: inline-block; transform: translateY(110%); }

/* ============ THE SIX GENERATIONS ============ */
.eras {
  position: relative; z-index: 4;
  background: var(--ink);
  padding: clamp(40px, 7vh, 84px) clamp(20px, 5vw, 64px);
  border-top: 1px solid rgba(242, 210, 164, 0.08);
  border-bottom: 1px solid rgba(242, 210, 164, 0.08);
}
.eras__kicker {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 26px;
}
.eras__kicker .section-tag__num { color: var(--orange); }
.eras__grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
}
.era {
  appearance: none; background: none; border: none; padding: 0;
  cursor: pointer; text-align: left;
  font-family: var(--body);
  will-change: transform;
  transition: transform 0.45s var(--ease-out);
}
.era:hover { transform: translateY(-6px); }
.era__thumb {
  display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid rgba(242, 210, 164, 0.14);
  margin-bottom: 12px;
  position: relative;
}
.era__thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 7, 8, 0.45) 100%);
  transition: opacity 0.4s ease;
}
.era:hover .era__thumb { border-color: var(--orange); }
.era:hover .era__thumb::after { opacity: 0; }
.era__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.02);
  transition: transform 0.6s var(--ease-out);
}
.era:hover .era__thumb img { transform: scale(1.1); }
.era__meta { display: flex; align-items: baseline; gap: 8px; }
.era__num {
  font-family: var(--display);
  font-size: 12px; color: var(--orange);
}
.era__label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-dim);
  transition: color 0.3s ease;
}
.era:hover .era__label { color: var(--cream); }

/* ============ PILLARS ============ */
.pillars { height: 400vh; position: relative; z-index: 4; }
.pillars__pin {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.pillars__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  will-change: transform;
}
.pillars__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 7, 8, 0.92) 0%, rgba(8, 7, 8, 0.55) 55%, rgba(8, 7, 8, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 7, 8, 0.85) 0%, transparent 30%, transparent 75%, rgba(8, 7, 8, 0.9) 100%);
}
.pillars__head {
  position: absolute; top: calc(var(--nav-h) + 4vh); left: clamp(20px, 5vw, 64px);
  z-index: 2;
}
.section-tag {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 18px;
}
.section-tag__num { color: var(--orange); }
.pillars__title {
  font-size: clamp(40px, 7vw, 110px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 210, 164, 0.5);
}

.pillars__list {
  position: relative; z-index: 2;
  margin-left: clamp(20px, 5vw, 64px);
  margin-top: 12vh;
  max-width: 760px;
  display: grid;
}
.pillar {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}
.pillar__num {
  font-family: var(--display);
  font-size: clamp(15px, 1.6vw, 22px);
  color: var(--orange);
  display: block; margin-bottom: 14px;
}
.pillar__name {
  font-size: clamp(38px, 5.6vw, 88px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 22px;
}
.pillar__desc {
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--cream-dim);
  max-width: 34em;
}
.pillars__index {
  position: absolute; right: clamp(20px, 4vw, 48px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 2;
}
.pillars__index-item {
  width: 2px; height: 34px;
  background: rgba(242, 210, 164, 0.18);
  transition: background 0.4s ease;
}
.pillars__index-item.is-active { background: var(--fuchsia); }

/* ============ GAMES / SHOWCASE ============ */
.work {
  position: relative; z-index: 4;
  padding: clamp(100px, 16vh, 190px) clamp(20px, 5vw, 64px) clamp(90px, 14vh, 160px);
  overflow: hidden;
}
.work__bg {
  position: absolute; inset: 0; overflow: hidden;
}
.work__bgimg {
  position: sticky; top: 0; display: block;
  width: 100%; height: 100svh;
  object-fit: cover;
}
.work__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(8, 7, 8, 0.76) 24%, rgba(8, 7, 8, 0.76) 78%, var(--ink) 100%);
}
.work__head { position: relative; z-index: 2; margin-bottom: clamp(48px, 8vh, 96px); }
.work__title {
  font-size: clamp(58px, 11.5vw, 190px);
  line-height: 0.9;
  color: var(--cream);
}
.work__title .w {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding-top: 0.16em; margin-top: -0.16em;
}
.work__title .w > span { display: inline-block; transform: translateY(110%); }

.work__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 32px);
}
.trip {
  position: relative;
  display: block;
  border: 1px solid rgba(242, 210, 164, 0.14);
  background: rgba(8, 7, 8, 0.55);
  backdrop-filter: blur(6px);
  padding: 18px 18px 26px;
  transition: transform 0.6s var(--ease-out), border-color 0.4s ease, background 0.4s ease;
  will-change: transform;
}
.trip:hover {
  transform: translateY(-10px);
  border-color: var(--orange);
  background: rgba(16, 13, 14, 0.78);
}
.trip__art {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 22px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 16px;
  transition: transform 0.6s var(--ease-out);
}
.trip:hover .trip__art { transform: scale(1.02); }
.trip__art-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
}
.trip__art::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(8, 7, 8, 0.38) 0%, transparent 42%, rgba(8, 7, 8, 0.55) 100%);
}
.trip__art::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay; opacity: 0.5;
}
/* Vertex Ascent — golden stairway dawn */
.trip__art--vertex {
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 138, 0, 0.45), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(216, 0, 76, 0.4), transparent 52%),
    linear-gradient(165deg, #16090c 0%, #080708 72%);
}
/* The Generations — fuchsia monument on black */
.trip__art--generations {
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 138, 0, 0.35), transparent 55%),
    radial-gradient(circle at 30% 20%, rgba(216, 0, 76, 0.35), transparent 50%),
    linear-gradient(170deg, #120a0e 0%, #080708 75%);
}
/* Pocket Momentum — cream light leak */
.trip__art--mobile {
  background:
    radial-gradient(circle at 70% 20%, rgba(242, 210, 164, 0.28), transparent 48%),
    radial-gradient(circle at 25% 75%, rgba(255, 138, 0, 0.3), transparent 50%),
    linear-gradient(160deg, #100d0e 0%, #080708 70%);
}
.trip__num {
  position: relative; z-index: 2;
  font-family: var(--display);
  font-size: clamp(44px, 5vw, 84px);
  line-height: 1;
  color: rgba(242, 210, 164, 0.9);
}
.trip__route {
  position: relative; z-index: 2;
  align-self: flex-end;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(242, 210, 164, 0.7);
}
.trip__name {
  font-size: clamp(24px, 2.4vw, 38px);
  text-transform: uppercase;
  line-height: 1;
  color: var(--cream);
  margin-bottom: 12px;
}
.trip__pitch {
  font-size: 14px; line-height: 1.6;
  color: var(--cream-dim);
  padding-right: 40px;
  min-height: 3.2em;
}
.trip__cta {
  position: absolute; right: 18px; bottom: 20px;
  font-size: 22px; color: var(--orange);
  transform: translateX(-8px); opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.45s ease;
}
.trip:hover .trip__cta { transform: translateX(0); opacity: 1; }

/* ============ FINALE ============ */
.finale {
  position: relative; z-index: 4;
  min-height: 100vh;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(90px, 16vh, 180px) clamp(20px, 5vw, 64px) 0;
  border-top: 1px solid rgba(242, 210, 164, 0.08);
  overflow: hidden;
}
.finale__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.finale__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 30%, rgba(8, 7, 8, 0.9) 100%),
    linear-gradient(180deg, rgba(8, 7, 8, 0.9) 0%, rgba(8, 7, 8, 0.4) 35%, rgba(8, 7, 8, 0.45) 70%, rgba(8, 7, 8, 0.95) 100%);
}
.finale__inner { text-align: center; position: relative; z-index: 2; }
.finale__title {
  font-size: clamp(52px, 12.5vw, 220px);
  line-height: 0.92;
  color: var(--cream);
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  overflow: hidden;
  margin-bottom: 26px;
}
.finale__title .word { display: inline-block; white-space: nowrap; }
.finale__title .ch {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}
.finale__title .ch.sp { width: 0.3em; }
.finale__sub {
  font-size: clamp(14px, 1.6vw, 19px);
  color: var(--cream-dim);
  letter-spacing: 0.04em;
  margin-bottom: 54px;
}
.finale__actions {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
.btn {
  display: inline-block;
  font-family: var(--body); font-weight: 500;
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 20px 44px;
  border-radius: 999px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}
.btn--solid {
  background: var(--fuchsia); color: var(--cream);
  border: 1px solid var(--fuchsia);
}
.btn--solid:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn--ghost {
  border: 1px solid rgba(242, 210, 164, 0.35); color: var(--cream);
}
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }

.footer {
  margin-top: auto;
  padding: 60px 0 36px;
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 16px;
  position: relative; z-index: 2;
}
.footer__brandline {
  font-family: var(--display);
  font-size: 14px; letter-spacing: 0.22em;
  color: var(--cream);
}
.footer__note { font-size: 12px; color: rgba(242, 210, 164, 0.38); letter-spacing: 0.06em; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav__brand-name { display: none; }
  .nav__links { display: none; }
  .hero { height: 400vh; }
  .hero__subtitle { letter-spacing: 0.22em; bottom: 17vh; }
  .hero__coords { left: 50%; transform: translateX(-50%); bottom: 42px; white-space: nowrap; }
  .hero__hint { display: none; }
  .manifesto__line { font-size: clamp(34px, 9.4vw, 64px); }
  .nav__brand-logo { height: 42px; }
  .eras__grid { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .pillars { height: 340vh; }
  .pillars__list { margin-top: 16vh; }
  .work__grid { grid-template-columns: 1fr; }
  .trip__pitch { min-height: 0; }
  .footer { justify-content: center; text-align: center; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .grain, .hero__hint-line, .hero__coords-dot { animation: none; }
  html { scroll-behavior: auto; }
}
