@font-face { font-family: "Unbounded"; src: url(../fonts/unbounded-var.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Onest"; src: url(../fonts/onest-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f29a3b;           /* animated by GSAP on the flavour switch */
  --bg2: #f7b65f;
  --ink: #2a1205;
  --cream: #fff3e2;
  --accent: #fff7ec;
  --pad: clamp(20px, 5vw, 80px);
  --vh: 1vh;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font: 400 clamp(16px, 1.15vw, 19px)/1.55 "Onest", system-ui, sans-serif;
  background: radial-gradient(120% 90% at 70% 40%, var(--bg2) 0%, var(--bg) 55%, color-mix(in oklab, var(--bg) 82%, #000) 100%) fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--cream); }

/* ---------- fixed WebGL stage (sized to the LARGE viewport so mobile URL-bar moves do not resize it) */
.stage { position: fixed; inset: 0 0 auto 0; height: 100vh; height: 100lvh; z-index: 1; pointer-events: none; }
.stage canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; }
html.is-ready .stage canvas { opacity: 1; }
html.no-webgl .stage { display: none; }

/* ---------- loader (fades when textures are decoded, shaders compiled and the first frame is drawn) */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 18px; background: var(--bg); transition: opacity .7s ease, visibility .7s; }
.loader__word { font: 800 clamp(40px, 8vw, 96px)/1 "Unbounded", sans-serif; color: var(--cream); letter-spacing: -.02em; }
.loader__bar { width: min(240px, 50vw); height: 2px; background: rgb(255 255 255 / .3); justify-self: center; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--cream); transition: width .3s ease; }
html.is-ready .loader, html.no-webgl .loader, html:not(.js) .loader { opacity: 0; visibility: hidden; }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--pad); mix-blend-mode: normal; }
.nav__logo { font: 800 20px/1 "Unbounded", sans-serif; letter-spacing: .02em; }
.nav__meta { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }

/* ---------- sections: z-index 2 copy ABOVE the can, z-index 0 giant word BEHIND the can */
.s { position: relative; min-height: 100vh; min-height: 100svh; padding: 0 var(--pad); display: flex; align-items: center; }
.s--hero { min-height: 100vh; min-height: 100svh; }
.s--right { justify-content: flex-end; min-height: 130vh; }
.s--left { justify-content: flex-start; min-height: 130vh; }
.s--final { justify-content: center; align-items: flex-end; padding-bottom: 12vh; min-height: 110vh; }
.copy { position: relative; z-index: 2; max-width: 30rem; }
.copy--center { text-align: center; max-width: 36rem; }
.eyebrow { font: 600 12px/1.2 "Onest", sans-serif; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 18px; opacity: .8; }
.h2 { font: 750 clamp(30px, 4.1vw, 64px)/1.02 "Unbounded", sans-serif; letter-spacing: -.025em; margin: 0 0 20px; text-wrap: balance; }
.lede, .body { margin: 0; max-width: 28rem; }
.copy--center .body { margin-inline: auto; }

.hero__giant {
  position: absolute; z-index: 0; left: 50%; top: 50%; transform: translate(-50%, -54%); margin: 0; pointer-events: none;
  font: 900 clamp(120px, 31vw, 520px)/.8 "Unbounded", sans-serif; letter-spacing: -.05em; color: var(--cream); opacity: .92; white-space: nowrap;
}
.hero__copy { position: absolute; z-index: 2; left: var(--pad); bottom: 11vh; max-width: 25rem; }
.hero__copy .h2 { font-size: clamp(28px, 3vw, 46px); }
.scrollhint { position: absolute; z-index: 2; right: var(--pad); bottom: 11vh; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.scrollhint span { width: 1px; height: 44px; background: currentColor; transform-origin: top; animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* poster = LCP image + no-WebGL fallback; sits exactly where the hero keyframe puts the 3D can */
.poster { position: absolute; z-index: 1; left: 65%; top: 50%; height: 87vh; height: 87svh; width: auto; transform: translate(-50%, -50%); pointer-events: none; transition: opacity .6s ease; }
html.is-ready .poster { opacity: 0; }

/* ---------- flavour section (pinned) */
.s--flavour { z-index: 2; display: block; padding: 0 var(--pad); text-align: center; }
.flavour { position: relative; z-index: 2; height: 100vh; height: 100svh; padding-top: 10vh; }
.flavour__title { position: relative; height: 1.1em; min-width: 12ch; }
.fl { position: absolute; left: 50%; top: 0; transform: translateX(-50%); white-space: nowrap; }
.fl--b { opacity: 0; }
.flavour__note { position: absolute; left: 0; right: 0; bottom: 6vh; margin: 0 auto; }

.foot { position: relative; z-index: 2; padding: 40px var(--pad) 56px; font-size: 13px; opacity: .7; text-align: center; }

/* split-text helpers (GSAP SplitText adds the elements) */
.split-line { overflow: clip; padding-bottom: .06em; }

/* ---------- mobile: can lives in the upper part, copy at the bottom on a soft scrim */
@media (max-width: 799px) {
  /* each story section = 140svh: the copy card sticks at 58svh for the extra 40svh, so it is readable while the can rests */
  .s { align-items: flex-start; }
  .s--right, .s--left, .s--final { justify-content: flex-start; min-height: 140svh; padding-top: 58svh; padding-bottom: 0; }
  .s--right .copy, .s--left .copy, .s--final .copy { position: sticky; top: 58svh; align-self: flex-start; }
  .copy { max-width: none; width: 100%; padding: 20px 20px 18px; margin: 0 -8px; border-radius: 22px;
    background: color-mix(in oklab, var(--bg) 80%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .h2 { font-size: clamp(26px, 7.6vw, 36px); }
  .hero__giant { top: 15%; transform: translate(-50%, -50%); font-size: 34vw; }
  .hero__copy { left: var(--pad); right: var(--pad); bottom: 5svh; max-width: none; }
  .hero__copy .h2 { font-size: clamp(24px, 7vw, 32px); }
  .scrollhint { display: none; }
  .poster { left: 50%; top: 40%; height: 50svh; }
  .flavour { padding-top: 11svh; }
  .flavour__note { bottom: 9svh; padding: 0 12px; }
  .flavour__title { font-size: clamp(24px, 7vw, 34px); }
  .nav__meta { display: none; }
}

/* ---------- reduced motion: no smooth scroll, no idle spin; text simply visible */
@media (prefers-reduced-motion: reduce) {
  .scrollhint span { animation: none; transform: none; }
  .stage canvas, .poster, .loader { transition: none; }
}
html.no-webgl .poster { opacity: 1; }

/* reduced-motion flavour state + poster render mode */
.flavour-b .fl--a { opacity: 0; } .flavour-b .fl--b { opacity: 1; }
html.poster-mode, html.poster-mode body { background: transparent !important; }
html.poster-mode body > :not(.stage) { display: none !important; }
html.poster-mode .stage canvas { opacity: 1; transition: none; }
