/* ==========================================================================
   Gavin Generation — Gavin Plant
   ========================================================================== */
:root {
  --ink: #0a0f1a;
  --ink-2: #101828;
  --graphite: #182132;
  --steel: #2a3446;
  --line: rgba(255, 255, 255, .12);
  --text: #e8ecf2;
  --muted: #98a3b6;
  --paper: #f2efe8;
  --paper-2: #e7e2d7;
  --paper-ink: #121722;
  --amber: #f2ad33;
  --amber-2: #dc3d1a;
  --ice: #bfe6f7;
  --electric: #6ad1ff;
  --ember: #e2792a;

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --radius: 22px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:not(.motion) { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 16px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: .98;
  letter-spacing: -.01em;
  margin-bottom: 28px;
  max-width: 16ch;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: #ffc66e; }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.04); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: #fff; }
.btn--ink { background: var(--paper-ink); color: var(--paper); }
.text-link { position: relative; text-decoration: none; font-weight: 600; padding-bottom: 4px; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: right; transition: transform .5s var(--ease); }
.text-link:hover::after { transform: scaleX(0); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: transform .45s var(--ease), background .35s, backdrop-filter .35s;
}
.site-header.is-scrolled { background: rgba(10, 15, 26, .78); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.site-header.is-hidden { transform: translateY(-110%); }
.header-inner {
  max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; padding: 6px 14px 6px 7px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); flex: none; }
.brand-mark { width: 40px; height: 40px; display: block; }
.brand-word { height: 30px; width: auto; display: block; }
@media (max-width: 420px) { .brand-mark { width: 34px; height: 34px; } .brand-word { height: 25px; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-display); font-size: 25px; letter-spacing: .01em; }
.brand-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.primary-nav { display: flex; gap: 26px; }
.primary-nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.82); transition: color .2s; }
.primary-nav a:hover { color: var(--amber); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { background: none; border: 0; padding: 5px 9px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; border-radius: 999px; cursor: pointer; color: var(--muted); }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.nav-cta { text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 999px; background: var(--amber); color: var(--ink); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.menu-bars { display: grid; gap: 6px; justify-items: center; }
.menu-bars span { display: block; width: 18px; height: 1.5px; background: #fff; transition: transform .3s; }
.menu-toggle[aria-expanded="true"] .menu-bars span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { background: var(--ink); border-top: 1px solid var(--line); padding: 16px var(--gutter) 28px; }
.mobile-menu nav { display: grid; }
.mobile-menu a { font-family: var(--f-display); font-size: 34px; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .brand-sub { display: none; }
  .lang-switch button { padding: 5px 7px; }
  .header-actions { gap: 8px; }
}

/* Hero */
.hero {
  position: relative; min-height: calc(100svh - var(--header-h));
  display: flex; align-items: flex-end; overflow: hidden;
  margin-top: calc(var(--header-h) * -1); padding-top: var(--header-h);
}
.hero-media { position: absolute; inset: 0; transform-origin: 60% 40%; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(10,15,26,.55) 0%, rgba(10,15,26,.05) 30%, rgba(10,15,26,.35) 60%, rgba(10,15,26,.96) 100%),
  linear-gradient(90deg, rgba(10,15,26,.6), transparent 60%); }
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(48px, 9vh, 110px); padding-top: 120px; }
.hero-eyebrow { color: #fff; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(242,173,51,.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(242,173,51,0); } 100% { box-shadow: 0 0 0 0 rgba(242,173,51,0); } }
.hero-title { font-family: var(--f-display); font-size: clamp(50px, 8.2vw, 132px); line-height: .92; letter-spacing: -.02em; margin-bottom: 40px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title .accent { font-style: italic; color: var(--amber); }
.motion .hero-title .line > span { transform: translateY(105%); animation: lineUp 1.1s var(--ease) forwards; }
.motion .hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.motion .hero-title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes lineUp { to { transform: none; } }
.hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.hero-lede { max-width: 46ch; color: rgba(255,255,255,.85); margin: 0; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-cue { position: absolute; z-index: 2; right: var(--gutter); top: 50%; width: 1px; height: 80px; background: rgba(255,255,255,.25); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--amber); animation: cue 2s infinite var(--ease); }
@keyframes cue { to { top: 100%; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* Reveal */
.motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Growing frame */
.frame-section { padding: clamp(40px, 8vw, 120px) 0 0; }
.frame {
  --inset: 64px; --r: 48px;
  position: relative; margin-inline: var(--inset);
  border-radius: var(--r); overflow: hidden; height: min(88vh, 860px);
  background: var(--graphite);
}
@media (max-width: 700px) { .frame { --inset: 16px; --r: 20px; height: 70vh; } }
.frame-media { position: absolute; inset: -8% 0; }
.frame-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.frame::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(0deg, rgba(10,15,26,.85), rgba(10,15,26,0) 55%); transition: opacity 1s; }
.frame-caption { position: absolute; z-index: 3; left: clamp(20px, 5vw, 72px); bottom: clamp(20px, 5vw, 64px); right: 20px; pointer-events: none; }
.frame-caption .frame-title { transition: font-size .8s var(--ease), opacity .8s; }
.frame-caption button { pointer-events: auto; }
.frame-title { font-family: var(--f-display); font-size: clamp(32px, 5vw, 72px); line-height: 1; max-width: 18ch; margin: 0; }
.frame-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; top: 24px; right: 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; padding: 8px 14px; border-radius: 999px; background: rgba(10,15,26,.6); backdrop-filter: blur(8px); border: 1px solid var(--line); }

/* 360° plant tour */
.frame-media { transition: opacity 1.2s var(--ease); }
.pano-slot { position: absolute; inset: 0; z-index: 1; overflow: hidden; opacity: 0; transition: opacity 1.4s var(--ease); background: #000; }
/* Player is oversized and cropped so YouTube's title bar (top) and logo/overlays (bottom) fall outside the frame */
.pano-slot iframe { position: absolute; left: 0; top: -140px; width: 100%; height: calc(100% + 280px); border: 0; transform: scale(calc(1.18 - .18 * var(--pw, 1))); transform-origin: 50% 50%; }
.frame--pano.is-live:not(.is-paused) .pano-slot { opacity: 1; }
.frame--pano.is-live:not(.is-paused) .frame-media { opacity: 0; }
.frame--pano.is-live::after { background: linear-gradient(0deg, rgba(10,15,26,.78), rgba(10,15,26,0) 34%); }
.frame--pano.is-live .frame-title { font-size: clamp(26px, 3.2vw, 46px); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(242,173,51,.6); }
.frame--pano.is-live .live-dot { background: #ff4d3d; animation: pulse 2s infinite; }
.pano-ring { position: absolute; z-index: 3; top: 22px; left: 22px; width: clamp(78px, 8vw, 110px); aspect-ratio: 1; color: #fff; pointer-events: none; display: grid; place-items: center; transform: rotate(calc(var(--pw, 0) * 220deg)); }
.pano-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.motion .pano-ring svg { animation: spin 22s linear infinite; }
.pano-ring text { font-family: var(--f-mono); font-size: 9.2px; letter-spacing: .18em; fill: currentColor; }
.pano-ring > span { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 32px); line-height: 1; transform: rotate(calc(var(--pw, 0) * -220deg)); }
.pano-hint { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 999px; background: rgba(10,15,26,.55); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); font-size: 14px; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity .6s, transform .6s var(--ease); }
.frame--pano.hint-on .pano-hint { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pano-hand { display: inline-flex; color: var(--amber); }
.motion .pano-hand svg { animation: sway 1.8s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.pano-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.pano-play { gap: 10px; }
.pano-play-icon { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.pano-play.is-playing .pano-play-icon { width: 10px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.pano-sound { appearance: none; border: 1px solid rgba(255,255,255,.4); background: rgba(10,15,26,.45); backdrop-filter: blur(8px); color: #fff; font: 600 14px/1 var(--f-sans); padding: 14px 18px; border-radius: 999px; cursor: pointer; pointer-events: auto; }
.pano-sound:hover { border-color: var(--amber); color: var(--amber); }
@media (max-width: 700px) { .pano-ring { width: 64px; top: 14px; left: 14px; } .pano-ring text { display: none; } .frame--pano.is-live .frame-title { display: none; } }

/* Intro */
.intro { padding-block: clamp(80px, 14vw, 200px); }
.intro-text { font-family: var(--f-display); font-size: clamp(30px, 4.4vw, 64px); line-height: 1.12; letter-spacing: -.005em; max-width: 24ch; margin-bottom: 40px; }
.intro-text .w { transition: opacity .2s linear; }
.intro-links { display: flex; gap: 28px; flex-wrap: wrap; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding-bottom: clamp(80px, 12vw, 160px); }
.stat { border-radius: var(--radius); padding: 28px 24px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; will-change: transform; }
.stat-num { font-family: var(--f-display); font-size: clamp(48px, 5vw, 76px); line-height: 1; margin: 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.stat-num small { font-family: var(--f-mono); font-size: 14px; letter-spacing: .06em; }
.stat-num .tilde { opacity: .6; }
.stat-label { margin: 0; font-size: 15px; line-height: 1.4; }
.stat--amber { background: var(--amber); color: var(--ink); }
.stat--ice { background: var(--ice); color: var(--ink); }
.stat--paper { background: var(--paper); color: var(--ink); }
.stat--steel { background: var(--steel); color: #fff; }
.stat--ember { background: var(--ember); color: var(--ink); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } .stat { min-height: 200px; padding: 20px; } .stat:last-child { grid-column: 1 / -1; } }

/* Marquee */
.marquee-band { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.marquee { display: flex; width: max-content; }
.marquee-track { display: flex; align-items: center; gap: 36px; padding-right: 36px; flex: none; }
.motion .marquee-track { animation: marquee 38s linear infinite; }
.marquee-track span { font-family: var(--f-display); font-size: clamp(28px, 3.4vw, 48px); white-space: nowrap; color: rgba(255,255,255,.88); }
.marquee-track i { width: 10px; height: 10px; background: var(--amber); transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 7vw, 110px); align-items: center; padding-block: clamp(90px, 13vw, 180px); }
.about-media { position: relative; }
.about-frame { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--graphite); }
.about-frame img { width: 100%; height: 125%; object-fit: cover; will-change: transform; }
.about-tag { position: absolute; left: -12px; bottom: 32px; background: var(--amber); color: var(--ink); font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; }
.about-copy p { color: rgba(232,236,242,.82); max-width: 54ch; }
.facts { margin: 36px 0 0; display: grid; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .about-tag { left: 12px; } .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Generation */
.generation { background: var(--paper); color: var(--paper-ink); padding-block: clamp(90px, 12vw, 170px); border-radius: 40px 40px 0 0; }
.generation .eyebrow { color: #a85a00; }
.gen-head { margin-bottom: 56px; }
.flow { margin-top: 28px; }
.flow-svg { width: 100%; height: 60px; overflow: visible; }
.flow-base { stroke: rgba(18,23,34,.18); stroke-width: 2; fill: none; }
.flow-pulse { stroke: var(--amber-2); stroke-width: 3; fill: none; stroke-dasharray: 60 860; stroke-linecap: round; }
.motion .flow-pulse { animation: flow 3.2s linear infinite; }
@keyframes flow { from { stroke-dashoffset: 920; } to { stroke-dashoffset: 0; } }
.flow-nodes circle { fill: var(--paper); stroke: var(--paper-ink); stroke-width: 2; }
.flow-labels { list-style: none; margin: 10px 0 0; padding: 0; display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

.stack { display: grid; gap: 24px; }
.stack-item { position: sticky; top: calc(var(--header-h) + 24px); }
.stack-card {
  --shade: 0;
  position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  min-height: min(68vh, 560px); padding: clamp(28px, 5vw, 64px); border-radius: 32px; overflow: hidden;
  transform-origin: 50% 0; will-change: transform;
}
.stack-card::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade); pointer-events: none; }
.stack-card--1 { background: var(--ink); color: #fff; }
.stack-card--2 { background: var(--amber); color: var(--ink); }
.stack-card--3 { background: var(--graphite); color: #fff; }
.stack-card--4 { background: var(--ice); color: var(--ink); }
.stack-card--5 { background: var(--ember); color: var(--ink); }
.stack-card--2 .stack-photo img, .stack-card--4 .stack-photo img { box-shadow: 0 30px 60px -24px rgba(10,15,26,.5); }
.stack-num { font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; opacity: .7; }
.stack-card h3 { font-family: var(--f-display); font-size: clamp(38px, 5vw, 76px); line-height: 1; margin: 14px 0 22px; }
.stack-card p { max-width: 44ch; font-size: 18px; opacity: .88; margin: 0; }
.stack-art { color: currentColor; opacity: .9; }
.stack-art svg { width: 100%; height: auto; max-height: 360px; }
.stack-photo { opacity: 1; position: relative; z-index: 1; }
.stack-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; display: block; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.motion .belt circle { animation: belt 2.6s linear infinite; }
@keyframes belt { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }
.belt circle:nth-child(2) { animation-delay: .3s; } .belt circle:nth-child(3) { animation-delay: .6s; } .belt circle:nth-child(4) { animation-delay: .9s; } .belt circle:nth-child(5) { animation-delay: 1.2s; }
.motion .flame path { transform-origin: 50% 100%; transform-box: fill-box; animation: flicker 1.4s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scaleY(1.18) scaleX(.92); } }
.motion .rotor { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.motion .wire { stroke-dasharray: 8 10; animation: wire 1.2s linear infinite; }
@keyframes wire { to { stroke-dashoffset: -36; } }
@media (max-width: 800px) {
  .stack-card { grid-template-columns: 1fr; min-height: 0; }
  .stack-art svg { max-height: 180px; }
  .stack-photo img { aspect-ratio: 16 / 9; }
  .flow-labels { font-size: 10px; }
}

/* Layers / stewardship */
.layers { position: relative; height: 340vh; background: var(--paper); }
.layers-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.layers-head { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--header-h) + 20px); pointer-events: none; }
.layers-head .section-title { font-size: clamp(32px, 4.4vw, 60px); color: inherit; }
.layer { --wipe: 100%; position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: clamp(40px, 10vh, 120px); clip-path: inset(var(--wipe) 0 0 0); }
.layer:first-of-type { clip-path: none; }
.layer--1 { background: radial-gradient(120% 90% at 80% 20%, #23324b, var(--ink)); color: #fff; }
.layer--2 { background: radial-gradient(120% 90% at 20% 30%, #ffcb7a, var(--amber)); color: var(--ink); }
.layer--3 { background: radial-gradient(120% 90% at 70% 40%, #d8f1fb, var(--ice)); color: var(--ink); }
.layers-head { color: #fff; }
.layer { color: #fff !important; z-index: 0; isolation: isolate; }
.layer-bg { position: absolute; inset: 0; z-index: 0; }
.layer-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.layer-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,26,.55) 0%, rgba(10,15,26,.15) 38%, rgba(10,15,26,.78) 100%); }
.layer-inner { position: relative; z-index: 1; }
.layer .layer-num, .layer h3 { text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.layer .layer-tag { color: var(--amber); }
.layer-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.layer .layer-num { font-family: var(--f-display); font-size: clamp(120px, 24vw, 360px); line-height: .8; margin: 0; letter-spacing: -.03em; }
.layer .layer-num span { font-size: .4em; }
.layer .layer-num--word { font-size: clamp(90px, 18vw, 280px); }
.layer h3 { font-family: var(--f-display); font-size: clamp(32px, 4vw, 56px); line-height: 1; margin-bottom: 16px; }
.layer p { font-size: 18px; max-width: 42ch; }
.layer-tag { font-family: var(--f-mono); font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.layer-dots { position: absolute; z-index: 6; right: var(--gutter); top: 50%; transform: translateY(-50%); list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.layer-dots li { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; mix-blend-mode: difference; transition: background .3s; }
.layer-dots li.is-active { background: #fff; }
@media (max-width: 800px) { .layer-inner { grid-template-columns: 1fr; gap: 10px; } .layers { height: 300vh; } }
html:not(.motion) .layers { height: auto; }
html:not(.motion) .layers-sticky { position: relative; height: auto; }
html:not(.motion) .layers-head { position: relative; top: 0; padding-top: 80px; color: var(--paper-ink); mix-blend-mode: normal; }
html:not(.motion) .layer { position: relative; clip-path: none; min-height: 70vh; }
html:not(.motion) .layer-dots { display: none; }

/* Community / valley */
.community { background: var(--ink); padding-bottom: clamp(80px, 12vw, 160px); }
.valley { position: relative; height: min(100vh, 860px); overflow: hidden; }
.v-layer { position: absolute; left: 0; width: 100%; height: 115%; bottom: -8%; will-change: transform; }
.v-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.valley-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(10,15,26,.72) 0%, rgba(10,15,26,.15) 40%, rgba(10,15,26,.2) 70%, var(--ink) 100%); pointer-events: none; }
.steam circle { fill: #dfe6ef; opacity: 0; transform-box: fill-box; transform-origin: center; }
html:not(.motion) .steam circle { opacity: .35; }
.motion .steam circle { animation: steam 6s ease-in-out infinite; }
.steam circle:nth-child(3n+2) { animation-delay: -2s; }
.steam circle:nth-child(3n) { animation-delay: -4s; }
@keyframes steam { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: .5; } 100% { transform: translate(60px, -150px) scale(2.2); opacity: 0; } }
.motion .river-shine { stroke-dasharray: 30 40; animation: wire 3s linear infinite; }
.valley-copy { position: absolute; left: 0; right: 0; top: clamp(80px, 14vh, 160px); z-index: 3; margin-inline: auto; }
.com-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -60px; position: relative; z-index: 4; }
.com-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.com-big { font-family: var(--f-display); font-size: 64px; line-height: 1; color: var(--amber); margin-bottom: 26px; }
.com-big--icon { height: 64px; display: flex; align-items: center; }
.com-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.com-card p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .com-grid { grid-template-columns: 1fr; } .valley { height: 70vh; } }

/* Scroll gallery */
.gallery { overflow: hidden; padding-bottom: clamp(80px, 12vw, 160px); }
.gallery-track { display: flex; gap: 18px; width: max-content; padding-left: var(--gutter); will-change: transform; }
.g-item { margin: 0; position: relative; flex: none; width: clamp(280px, 36vw, 560px); height: clamp(240px, 30vw, 440px); border-radius: var(--radius); overflow: hidden; }
.g-photo--tall { width: clamp(220px, 24vw, 380px); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.g-item:hover img { transform: scale(1.05); }
.g-item figcaption { position: absolute; left: 18px; bottom: 16px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: rgba(10,15,26,.7); backdrop-filter: blur(6px); padding: 8px 12px; border-radius: 999px; color: #fff; }
.g-art { display: grid; place-items: center; padding: 30px; }
.g-art svg { width: 80%; height: auto; }
.g-art--amber { background: var(--amber); color: var(--ink); }
.g-art--ice { background: var(--ice); color: var(--ink); }
.g-art--ember { background: var(--ember); color: var(--ink); }

/* Careers */
.careers-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 8; margin-bottom: clamp(36px, 5vw, 64px); }
.careers-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
@media (max-width: 700px) { .careers-media { aspect-ratio: 4 / 3; } }
.careers { padding-block: clamp(40px, 6vw, 80px) clamp(90px, 13vw, 170px); }
.careers-lede { max-width: 56ch; color: rgba(232,236,242,.8); font-size: 19px; }
.values { list-style: none; padding: 0; margin: 56px 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.values li { padding: 28px 24px 28px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.values li:last-child { border-right: 0; }
.values span { font-family: var(--f-mono); font-size: 12px; color: var(--amber); }
.values h3 { font-family: var(--f-display); font-size: 34px; margin: 14px 0 10px; }
.values p { color: var(--muted); margin: 0; font-size: 15px; }
.careers-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.careers-cta p { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } .values li:nth-child(2) { border-right: 0; } }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } .values li { border-right: 0; border-bottom: 1px solid var(--line); margin-right: 0; } }

/* Vendors */
.vendors { background: linear-gradient(180deg, var(--ink) 0%, #0d1424 100%); padding-block: clamp(90px, 12vw, 160px); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.vendors::before { content: ""; position: absolute; width: 60vw; height: 60vw; right: -20vw; top: -20vw; background: radial-gradient(circle, rgba(242,173,51,.16), transparent 60%); pointer-events: none; }
.vendors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; position: relative; }
.vendors-copy > p { color: rgba(232,236,242,.82); max-width: 50ch; }
.vendors-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.vendors-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 900px) { .vendors-media { aspect-ratio: 4 / 3; } }
.ven-list { list-style: none; padding: 0; margin: 26px 0 34px; display: grid; gap: 10px; }
.ven-list li { position: relative; padding-left: 30px; }
.ven-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(-45deg); }
.ven-credit { margin-top: 26px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ui-window { background: #f7f6f2; color: var(--paper-ink); border-radius: 18px; box-shadow: 0 40px 100px rgba(0,0,0,.5); overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); }
.ui-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #e9e6de; font-family: var(--f-mono); font-size: 11px; color: #555; }
.ui-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfcac0; }
.ui-bar span { margin-left: 10px; }
.ui-body { padding: 18px; display: grid; gap: 12px; }
.ui-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ui-kpis div { background: #fff; border-radius: 12px; padding: 12px; }
.ui-kpis small { display: block; font-size: 11px; color: #667; }
.ui-kpis b { font-family: var(--f-display); font-size: 34px; font-weight: 400; }
.ui-card { background: #fff; border-radius: 12px; padding: 14px; }
.ui-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ui-meter { height: 8px; border-radius: 8px; background: #ece9e1; overflow: hidden; }
.ui-meter span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-radius: 8px; }
.ui-alert { margin: 8px 0 0; font-size: 11px; color: #a85a00; }
.ui-pill { font-size: 11px; background: #fff1dc; color: #a85a00; padding: 3px 10px; border-radius: 999px; }
.ui-ts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 11px; color: #667; }
.ui-ts b { font-family: var(--f-mono); font-size: 13px; color: var(--paper-ink); background: #f3f1ec; border-radius: 6px; padding: 6px 0; font-weight: 500; }
.ui-ts b.ot { background: #ffe2b8; }
.ui-actions { display: flex; gap: 8px; margin-top: 12px; }
.ui-btn { font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid #d9d5cb; }
.ui-btn--ok { background: var(--paper-ink); color: #fff; border-color: var(--paper-ink); }
.ui-note { margin-top: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-align: right; }
@media (max-width: 900px) { .vendors-grid { grid-template-columns: 1fr; } .ui-window { transform: none; } }

/* History */
.history { padding-block: clamp(90px, 13vw, 170px); }
.timeline { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.t-year { font-family: var(--f-display); font-size: clamp(44px, 5vw, 72px); line-height: 1; color: var(--amber); }
.timeline p { margin: 0; font-size: 19px; max-width: 56ch; }
@media (max-width: 700px) { .timeline li { grid-template-columns: 1fr; gap: 6px; } }

/* News */
.news { padding-bottom: clamp(90px, 13vw, 170px); }
.news-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.news-card { display: flex; flex-direction: column; gap: 18px; min-height: 280px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; background: linear-gradient(160deg, var(--ink-2), var(--ink)); transition: border-color .3s, transform .4s var(--ease); }
.news-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.news-cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.news-card h3 { font-family: var(--f-display); font-size: 32px; line-height: 1.05; flex: 1; }
.news-date { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } .news-card { min-height: 200px; } }

/* Contact (light) */
.contact { --lift: 0; background: var(--paper); color: var(--paper-ink); padding-block: clamp(90px, 12vw, 160px); border-radius: 0 0 40px 40px; position: relative; z-index: 2; box-shadow: 0 40px 80px rgba(0,0,0,.35); }
.contact .eyebrow { color: #a85a00; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); }
.con-address { font-style: normal; font-size: 19px; line-height: 1.6; }
.con-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.con-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.con-form .full { grid-column: 1 / -1; }
.con-form input, .con-form select, .con-form textarea { font: inherit; font-weight: 400; font-size: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid #cfc9bb; background: #fbfaf7; color: var(--paper-ink); width: 100%; }
.con-form input:focus, .con-form select:focus, .con-form textarea:focus { outline: 2px solid var(--amber-2); outline-offset: 1px; }
.con-form button { justify-self: start; }
.con-status { grid-column: 1 / -1; margin: 0; font-weight: 600; min-height: 1.5em; }
@media (max-width: 800px) { .contact-grid, .con-form { grid-template-columns: 1fr; } }

/* Footer curtain */
.page { position: relative; z-index: 2; background: var(--ink); }
.site-footer { position: relative; z-index: 1; background: #05080f; }
.motion .site-footer { position: sticky; bottom: 0; }
.footer-inner { padding: clamp(80px, 12vw, 150px) 0 32px; }
.motion .footer-inner { transform: translateY(calc((1 - var(--reveal, 1)) * -30%)); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid var(--line); }
.footer-big { font-family: var(--f-display); font-size: clamp(44px, 7vw, 110px); line-height: .95; max-width: 13ch; }
.magnetic { display: grid; place-items: center; width: clamp(150px, 16vw, 210px); aspect-ratio: 1; border-radius: 50%; background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; transition: background .3s; will-change: transform; }
.magnetic:hover { background: #fff; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 50px 0; }
.footer-cols h3 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-cols a { display: block; text-decoration: none; margin-bottom: 8px; }
.footer-cols a:hover { color: var(--amber); }
.footer-cols p { color: rgba(232,236,242,.8); }
.credits { font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr; } }

/* Dot cursor */
.dot-cursor { position: fixed; z-index: 300; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--amber); pointer-events: none; opacity: 0; transform: translate3d(var(--x, -100px), var(--y, -100px), 0); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s, background .3s; display: grid; place-items: center; mix-blend-mode: normal; }
.dot-cursor.is-visible { opacity: 1; }
.dot-cursor.is-link { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: rgba(242,173,51,.25); border: 1px solid var(--amber); }
.dot-cursor.is-view { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--amber); }
.dot-cursor.is-down { transform: translate3d(var(--x), var(--y), 0) scale(.85); }
.dot-cursor-label { font-size: 13px; font-weight: 700; color: var(--ink); opacity: 0; transition: opacity .2s; }
.dot-cursor.is-view .dot-cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .dot-cursor { display: none; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
