/* =========================================================
   MASON & FIELDS — one page
   Black / white. The footage brings the colour.
   ========================================================= */

@font-face { font-family: "NHG Display"; src: url("assets/fonts/NeueHaasGrotDisp-95Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "NHG Display"; src: url("assets/fonts/NeueHaasGrotDisp-75Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "NHG Display"; src: url("assets/fonts/NeueHaasGrotDisp-65Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Glacial"; src: url("assets/fonts/GlacialIndifference-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "NHG Text"; src: url("assets/fonts/NeueHaasGrotText-55Roman.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "NHG Text"; src: url("assets/fonts/NeueHaasGrotText-65Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --black: #000;
  --white: #fff;
  --dim: rgba(255,255,255,.42);
  --rule: rgba(255,255,255,.18);
  --gutter: clamp(16px, 3.2vw, 48px);
  --display: "NHG Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: "NHG Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, figure { margin: 0; }
img, video { display: block; max-width: 100%; }

/* ---------- Type system ---------- */
.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  word-spacing: .06em;
  line-height: .84;
}
.kicker {
  font-family: var(--text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.kicker--dim { color: var(--dim); }

/* masked lines (reveal from below) */
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; will-change: transform; }

/* ---------- Video plumbing ---------- */
video {
  width: 100%; height: 100%;
  object-fit: cover;
  background: #0a0a0a center / cover no-repeat;
}
.reel { position: absolute; inset: 0; overflow: hidden; }
.reel video {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s var(--ease), transform 3.2s linear;
}
.reel video.is-on { opacity: 1; transform: scale(1); }

.shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 50%, rgba(0,0,0,.75) 100%),
    rgba(0,0,0,.22);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 18px) var(--gutter) 18px;
  mix-blend-mode: difference;
  pointer-events: none;
}
.nav a { pointer-events: auto; }
.nav__brand {
  --logo-w: clamp(118px, 11vw, 158px);
  display: flex; flex-direction: column; align-items: center;
  width: var(--logo-w);
}
.nav__brand img { width: 100%; height: auto; }
.nav__tag {
  font-family: "Glacial", var(--text);
  font-size: calc(var(--logo-w) * .044);
  letter-spacing: .46em; margin-right: -.46em;
  text-transform: uppercase; line-height: 1;
  margin-top: calc(var(--logo-w) * .06);
  white-space: nowrap;
}
.nav__link {
  font-weight: 500; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  padding: 8px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.nav__link:hover, .nav__link:focus-visible { background-size: 100% 1px; }

/* ---------- 01 Hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.shade--hero { background:
  linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,.1) 45%, rgba(0,0,0,.85) 100%),
  rgba(0,0,0,.18); }
.hero__inner {
  position: absolute; inset: auto 0 0 0;
  padding: 0 var(--gutter) calc(env(safe-area-inset-bottom) + clamp(20px, 3vw, 40px));
}
.hero__title { font-size: clamp(64px, 12.6vw, 250px); }
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-top: clamp(18px, 2.2vw, 32px);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.hero__copy { max-width: 34ch; font-size: clamp(14px, 1.1vw, 17px); color: rgba(255,255,255,.86); }
.explore {
  font-weight: 500; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  white-space: nowrap; display: inline-flex; gap: .6em;
}
.explore span { display: inline-block; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0) } 50% { transform: translateY(5px) } }

/* ---------- 02 Manifesto ---------- */
.manifesto { position: relative; height: 420vh; background: var(--black); }
.manifesto__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.manifesto .kicker { position: absolute; top: calc(env(safe-area-inset-top) + 88px); left: var(--gutter); color: var(--dim); }
.manifesto__lines { font-size: clamp(44px, 8.4vw, 160px); }
.m-line { overflow: hidden; }
.m-line > span { display: block; }
.m-line.is-past > span { color: rgba(255,255,255,.16); transition: color .6s var(--ease); }
.manifesto__close {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 50%;
  transform: translateY(-50%);
  font-size: clamp(46px, 9.4vw, 180px);
}

/* ---------- 03 Numbers ---------- */
.numbers { position: relative; padding: clamp(80px, 12vh, 140px) var(--gutter) clamp(40px, 8vh, 100px); }
.numbers__head { display: flex; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.stat {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 32px;
  padding: clamp(28px, 6vh, 72px) 0 clamp(18px, 3vh, 30px);
  border-bottom: 1px solid var(--rule);
  min-height: 62vh;
}
.stat__idx { position: absolute; top: 18px; left: 0; font-size: 11px; letter-spacing: .22em; color: var(--dim); }
.stat__num {
  font-size: clamp(110px, 25vw, 470px);
  line-height: .78;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: -.04em;
}
.stat__num small { font-size: .26em; letter-spacing: -.02em; vertical-align: .18em; margin-left: .1em; }
.stat__label {
  font-weight: 500; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  text-align: right; padding-bottom: .6em; color: rgba(255,255,255,.8); white-space: nowrap;
}

/* ---------- 04 What we build ---------- */
.build { position: relative; height: 600vh; }
.build__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.build__media { position: absolute; inset: 0; }
.build__media video { position: absolute; inset: 0; opacity: 0; transform: scale(1.08); }
.build__media video:first-child { opacity: 1; }
.build__ui {
  position: absolute; top: calc(env(safe-area-inset-top) + 88px); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
}
.build__count { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; font-size: 11px; letter-spacing: .2em; }
.build__count li { color: var(--dim); transition: color .4s; }
.build__count li.is-on { color: var(--white); }
.build__titles { position: absolute; inset: auto var(--gutter) clamp(40px, 7vh, 80px); }
.chapter { position: absolute; left: 0; right: 0; bottom: 0; }
.chapter h2 { font-size: clamp(54px, 10.4vw, 210px); }
.chapter__tag {
  font-weight: 500; font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 18px; color: rgba(255,255,255,.75);
}
.motion .chapter__tag { opacity: 0; }
.motion .chapter:first-child .chapter__tag { opacity: 1; }
.build__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rule); }
.build__progress span { display: block; height: 100%; width: 100%; background: var(--white); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 06 Statement ---------- */
.statement { position: relative; height: 480vh; background: var(--black); }
.statement__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.s-line, .s-final { grid-area: 1 / 1; }
.s-line { font-size: clamp(40px, 7.6vw, 150px); }
.motion .s-line { opacity: 0; }
.s-final { font-size: clamp(58px, 14.5vw, 300px); line-height: .8; }

/* ---------- 07 Closing ---------- */
.closing { position: relative; height: 200vh; height: 200svh; }
.closing__media { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.closing__fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55));
}
.closing__inner {
  position: absolute; z-index: 2; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 64px);
  padding: 0 var(--gutter);
}
.closing__title { font-size: clamp(64px, 12.6vw, 250px); }
.closing__sign {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-top: clamp(32px, 6vh, 72px); padding-top: 18px; border-top: 1px solid var(--rule);
}
.closing__name { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.closing__city { color: var(--dim); font-size: 13px; margin-top: 4px; }
.cta {
  font-size: clamp(38px, 5.6vw, 96px);
  letter-spacing: -.04em;
  display: inline-flex; align-items: center; gap: .25em;
  position: relative;
}
.cta span { display: inline-block; transition: transform .6s var(--ease); }
.cta:hover span, .cta:focus-visible span { transform: translateX(.18em); }
.cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.06em; height: .06em; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease);
}
.cta:hover::after, .cta:focus-visible::after { transform: scaleX(1); }

.legal {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 18px var(--gutter) calc(env(safe-area-inset-bottom) + 22px);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.legal span:first-child { margin-right: auto; }
.legal a:hover { color: var(--white); }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0) } 25% { transform: translate(-3%,2%) }
  50% { transform: translate(2%,-3%) } 75% { transform: translate(-2%,-1%) }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero__title, .closing__title { font-size: 17.4vw; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .explore { align-self: flex-end; margin-top: -1.6em; }
  .hero__copy { max-width: 26ch; }

  .manifesto { height: 360vh; }
  .manifesto__lines { font-size: 12.6vw; }
  .manifesto__close { font-size: 13.2vw; }

  .stat { grid-template-columns: 1fr; min-height: 0; padding-top: 56px; }
  .stat__num { font-size: 25vw; white-space: normal; }
  .stat__label { text-align: left; }

  .build { height: 520vh; }
  .chapter h2 { font-size: 15.4vw; }


  .statement { height: 420vh; }
  .s-line { font-size: 11.2vw; }
  .s-final { font-size: 19vw; }

  .closing__sign { flex-direction: column; align-items: flex-start; }
  .cta { font-size: 13vw; }
  .legal { gap: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain, .explore span { animation: none; }
  .reel video { transition: opacity .2s; transform: none; }
}

/* ---------- Fallback without JS motion ---------- */
html:not(.motion) .chapter { position: relative; margin-top: 24px; }
html:not(.motion) .statement { height: auto; }
html:not(.motion) .statement__pin { position: relative; height: auto; display: block; padding: 20vh var(--gutter); }
html:not(.motion) .manifesto { height: auto; }
html:not(.motion) .manifesto__pin { position: relative; height: auto; padding: 20vh var(--gutter); }
html:not(.motion) .manifesto__close { position: relative; top: auto; transform: none; margin-top: 10vh; left: 0; }
