/* Clap Crew — "The house on the hill" scroll story */

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/PlusJakartaSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/PlusJakartaSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/PlusJakartaSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/PlusJakartaSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --night: #0c0a14;
  --night-2: #15111f;
  --night-3: #1f1930;
  --cream: #f6f0e7;
  --cream-2: #e9dfd0;
  --muted: rgba(246, 240, 231, 0.7);
  --faint: rgba(246, 240, 231, 0.14);
  --orange: #ff7a18;
  --magenta: #ef2f7a;
  --violet: #6c3bff;
  --violet-2: #a88bff;
  --brand: linear-gradient(95deg, #ff8a2b 0%, #f2427a 45%, #8b4dff 100%);
  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(16px, 4.5vw, 64px);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--cream); color: var(--night); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-2); opacity: 0.85; margin-bottom: 18px;
}
.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7.2vw, 112px); line-height: 0.98; letter-spacing: -0.015em;
  text-wrap: balance;
}
.display em { font-style: italic; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--muted); max-width: 34ch; margin-top: 22px; }
.lede.big { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 72px); line-height: 1; color: var(--cream); max-width: none; margin-top: 10px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 22px;
  background: radial-gradient(80% 60% at 50% 40%, #1d1530, var(--night));
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { width: 96px; height: auto; animation: loaderBob 1.6s var(--ease) infinite alternate; }
@keyframes loaderBob { from { transform: translateY(0) scale(1); } to { transform: translateY(-6px) scale(1.03); } }
.loader__line { display: flex; gap: 14px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.loader__line b { color: var(--cream); font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.loader__bar { width: min(240px, 60vw); height: 2px; background: var(--faint); border-radius: 2px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.25s linear; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(12, 10, 20, 0.62); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-color: var(--faint); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.nav__brand img { width: 34px; height: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--cream); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 999px; background: rgba(246, 240, 231, 0.1); border: 1px solid rgba(246, 240, 231, 0.22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background 0.25s, transform 0.25s var(--ease);
}
.nav__cta:hover { background: rgba(246, 240, 231, 0.18); transform: translateY(-1px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 rgba(62, 224, 143, 0.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 143, 0.55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(62, 224, 143, 0); } }

/* ---------- Store badges ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 11px 20px 11px 16px; border-radius: 14px; background: rgba(12, 10, 20, 0.55);
  border: 1px solid rgba(246, 240, 231, 0.28); color: var(--cream);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.store:hover { transform: translateY(-2px); border-color: rgba(246, 240, 231, 0.55); background: rgba(12, 10, 20, 0.75); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.1; letter-spacing: -0.01em; }
.store small { font-size: 10.5px; font-weight: 500; letter-spacing: 0.04em; opacity: 0.75; margin-bottom: 2px; }
.store--big { padding: 14px 24px 14px 18px; border-radius: 16px; }
.store--big svg { width: 30px; height: 30px; }
.store--big span { font-size: 20px; }
.store__tag {
  position: absolute; top: -9px; right: -8px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(239, 47, 122, 0.4);
}
.btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: 14px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform 0.3s var(--ease); }
.btn--light { background: var(--cream); color: var(--night); }
.btn:hover { transform: translateY(-2px); }

/* ---------- Film sections (scroll-scrubbed image sequences) ---------- */
.film { position: relative; height: 520vh; }
.film--reveal { height: 520vh; }
.film__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #0b0a12; }
.film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.film__shade {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 10, 20, 0.5) 0%, rgba(12, 10, 20, 0) 20%),
    linear-gradient(0deg, rgba(12, 10, 20, 0.78) 0%, rgba(12, 10, 20, 0.35) 26%, rgba(12, 10, 20, 0) 46%),
    radial-gradient(120% 90% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(8, 6, 14, 0.45) 100%);
}

.beat {
  position: absolute; z-index: 6; opacity: 0; visibility: hidden; will-change: opacity, transform, filter;
  text-shadow: 0 2px 30px rgba(8, 6, 14, 0.45);
}
.beat--hero { inset: 0; }
.hero__top { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + clamp(16px, 5vh, 56px)); }
.hero__top .display { font-size: clamp(48px, 6.8vw, 116px); }
.hero__bottom { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(64px, 9vh, 110px); }
.hero__bottom .lede { margin-top: 0; }
.hero__bottom .stores { margin-top: 22px; }
.hero__bottom .scrollcue { margin-top: 26px; }
/* Film beats sit in the lower third so the house, always framed at centre, stays clear. */
.beat--left { left: var(--gutter); bottom: clamp(84px, 12vh, 130px); max-width: min(760px, 86vw); }
.beat--right { right: var(--gutter); bottom: clamp(84px, 12vh, 130px); text-align: right; max-width: min(760px, 86vw); }
.beat--left .display, .beat--right .display { font-size: clamp(42px, 5.8vw, 96px); }
.beat--right .lede { margin-left: auto; }
.beat--center { left: 0; right: 0; bottom: clamp(84px, 12vh, 130px); text-align: center; }
.beat--center .display { font-size: clamp(56px, 10vw, 170px); }
.beat--final { inset: 0; text-align: center; }
.final__top { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + clamp(8px, 3vh, 40px)); }
.final__bottom { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(70px, 11vh, 120px); display: flex; flex-direction: column; align-items: center; }
.beat--final .display { font-size: clamp(44px, 6.6vw, 112px); }
.beat--final .lede { max-width: none; color: var(--cream); margin-top: 0; }
.beat--final .btn { margin-top: 18px; }
/* The reveal ends on a golden aerial: keep the grade light, darken only the edges that hold type. */
.film--reveal .film__shade {
  background:
    linear-gradient(180deg, rgba(12, 10, 20, 0.6) 0%, rgba(12, 10, 20, 0) 34%),
    linear-gradient(0deg, rgba(12, 10, 20, 0.6) 0%, rgba(12, 10, 20, 0) 30%);
}

.scrollcue { display: inline-flex; align-items: center; gap: 12px; margin-top: 34px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.scrollcue i { position: relative; width: 22px; height: 36px; border-radius: 12px; border: 1.5px solid rgba(246, 240, 231, 0.55); }
.scrollcue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cream); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.hud {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px; z-index: 6;
  display: flex; align-items: center; gap: 26px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.hud__alt { display: flex; align-items: baseline; gap: 8px; }
.hud__alt b { font-size: 15px; color: var(--cream); letter-spacing: 0.06em; min-width: 3ch; text-align: right; }
.hud__chapter { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.hud__chapter i { width: clamp(80px, 14vw, 200px); height: 2px; background: var(--faint); border-radius: 2px; overflow: hidden; }
.hud__chapter b { display: block; width: 100%; height: 100%; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Tour (horizontal, inside the journey stage) ---------- */
.tour { position: absolute; inset: 0; z-index: 4; visibility: hidden; }
.film.is-touring .tour { visibility: visible; }
.film.is-touring .hud { opacity: 0; }
.hud { transition: opacity 0.3s; }
.tour__track { display: flex; height: 100%; width: max-content; will-change: transform; }
.room { position: relative; flex: none; width: 100vw; height: 100%; overflow: hidden; }
.room + .room { margin-left: 0; }
.room__media { position: absolute; inset: 0; overflow: hidden; }
.room__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.room::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--scrim, 1);
  background:
    linear-gradient(90deg, rgba(12, 10, 20, 0.86) 0%, rgba(12, 10, 20, 0.55) 30%, rgba(12, 10, 20, 0) 56%),
    linear-gradient(0deg, rgba(12, 10, 20, 0.5) 0%, rgba(12, 10, 20, 0) 30%);
}
.room__body {
  position: absolute; z-index: 2; left: var(--gutter); top: 50%; transform: translateY(-46%);
  width: min(520px, 84vw);
}
.room__no { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.room__no b { font-size: 13px; color: var(--cream); background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.room__title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 84px); line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; }
.room__text { margin-top: 18px; color: var(--muted); max-width: 40ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips li {
  font-size: 13px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: rgba(246, 240, 231, 0.1); border: 1px solid rgba(246, 240, 231, 0.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chips li:first-child { background: rgba(108, 59, 255, 0.35); border-color: rgba(168, 139, 255, 0.5); }

.plan { position: absolute; right: var(--gutter); bottom: 26px; z-index: 6; width: 150px; pointer-events: none; }
.plan__label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.plan__svg { width: 100%; height: auto; overflow: visible; }
.plan__room { fill: rgba(12, 10, 20, 0.35); stroke: rgba(246, 240, 231, 0.42); stroke-width: 0.8; transition: fill 0.45s var(--ease), stroke 0.45s; }
.plan__room[data-r="8"] { fill: rgba(12, 10, 20, 0.25); stroke-dasharray: 2 2; }
.plan__room.is-on { fill: rgba(239, 47, 122, 0.75); stroke: #fff; }
.plan__bar { height: 2px; margin-top: 12px; background: var(--faint); border-radius: 2px; overflow: hidden; }
.plan__bar i { display: block; height: 100%; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Works ---------- */
.works { position: relative; padding: clamp(110px, 16vh, 180px) 0 clamp(80px, 12vh, 140px); background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); overflow: hidden; }
.works__head { padding: 0 var(--gutter); }
.works__head .display { font-size: clamp(48px, 8vw, 132px); }
.works__head .display em { color: var(--cream-2); }
.count { font-variant-numeric: tabular-nums; }
.works__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); padding: 0 var(--gutter); margin-top: clamp(48px, 8vh, 90px); }
.wcol { border-top: 1px solid var(--faint); padding-top: 22px; }
.wcol b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 6vw, 92px); line-height: 1; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wcol h3 { font-size: 19px; font-weight: 700; margin-top: 10px; }
.wcol p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.marquee { margin-top: clamp(60px, 10vh, 110px); display: grid; gap: 14px; transform: rotate(-2deg); }
.marquee__row { display: flex; width: max-content; white-space: nowrap; font-family: var(--serif); font-size: clamp(34px, 4.6vw, 68px); line-height: 1.1; will-change: transform; }
.marquee__row--alt { color: transparent; -webkit-text-stroke: 1px rgba(246, 240, 231, 0.55); }

/* ---------- How ---------- */
.how { padding: clamp(110px, 16vh, 180px) var(--gutter); background: var(--night-2); }
.how__head .display { font-size: clamp(44px, 6.6vw, 104px); }
.how__head .display em { color: var(--violet-2); }
.steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2vw, 30px); margin-top: clamp(48px, 8vh, 90px); }
.steps__line { position: absolute; left: 0; right: 0; top: 23px; width: 100%; height: 4px; overflow: visible; }
.steps__line path { stroke: #8b4dff; stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.steps li { position: relative; }
.steps b {
  position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--night-3); border: 1px solid rgba(168, 139, 255, 0.5); font-weight: 800; font-size: 17px; margin-bottom: 22px;
}
.steps h3 { font-size: 19px; font-weight: 700; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Download ---------- */
.download {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: clamp(24px, 4vw, 60px);
  min-height: 100vh; padding: clamp(110px, 14vh, 160px) var(--gutter); overflow: hidden; background: var(--night);
}
.download__glow {
  position: absolute; width: 90vw; height: 90vw; max-width: 1300px; max-height: 1300px; right: -30vw; top: 50%; transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(139, 77, 255, 0.42), rgba(242, 66, 122, 0.18) 50%, rgba(12, 10, 20, 0) 75%);
  pointer-events: none; filter: blur(10px);
}
.download__copy { position: relative; z-index: 1; }
.download .display { font-size: clamp(44px, 6.2vw, 100px); }
.download .lede { max-width: 46ch; }
.fine { margin-top: 18px; font-size: 13px; color: rgba(246, 240, 231, 0.5); max-width: 52ch; }
.phones { position: relative; z-index: 1; height: min(78vh, 720px); perspective: 1400px; }
.phone {
  position: absolute; width: min(300px, 40vw); aspect-ratio: 9 / 19.5; border-radius: 44px; padding: 10px;
  background: linear-gradient(160deg, #2a2340, #0e0b18); box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; }
.phone--front { left: 6%; top: 8%; transform: rotate(-6deg); }
.phone--back { right: 0; top: 0; transform: rotate(7deg) scale(0.9); opacity: 0.85; }

/* ---------- Footer ---------- */
.foot { padding: 56px var(--gutter) 40px; background: #08070d; border-top: 1px solid var(--faint); display: grid; gap: 14px; color: var(--muted); font-size: 14px; }
.foot__brand { display: flex; align-items: center; gap: 12px; color: var(--cream); font-weight: 800; font-size: 20px; }
.foot__brand img { width: 40px; height: auto; }
.foot ul { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.foot a { text-decoration: none; color: var(--cream); }
.foot a:hover { text-decoration: underline; }
.foot__small { font-size: 12px; opacity: 0.7; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .works__cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps__line { display: none; }
  .steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; }
  .steps li b { grid-row: span 2; margin: 0; }
  .download { grid-template-columns: 1fr; text-align: left; }
  .phones { height: 520px; }
  .phone { width: 220px; }
  .phone--front { left: 4%; }
  .phone--back { right: 4%; }
  .room::after {
    background: linear-gradient(0deg, rgba(12, 10, 20, 0.94) 0%, rgba(12, 10, 20, 0.7) 42%, rgba(12, 10, 20, 0) 70%);
  }
  .room__body { top: auto; bottom: 86px; transform: none; }
  .room__title { font-size: clamp(36px, 10vw, 54px); }
  .room__text { font-size: 15px; }
  .chips li { font-size: 12px; padding: 6px 11px; }
  .chips li:nth-child(n + 5) { display: none; }
  .plan { left: var(--gutter); right: var(--gutter); width: auto; bottom: 30px; }
  .plan__svg, .plan__label { display: none; }
  .room__body { bottom: 64px; }
  .beat--right { text-align: left; right: auto; left: var(--gutter); }
  .beat--right .lede { margin-left: 0; }
  .hero__bottom { bottom: 64px; }
  .hero__bottom .scrollcue { display: none; }
  .hud__geo { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .stores { gap: 10px; }
  .store { padding: 9px 14px 9px 12px; }
  .store span { font-size: 15px; }
  .store--big span { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .loader__mark, .dot, .scrollcue i::after, .tour__hint span { animation: none; }
}

/* Room 1 is framed exactly like the film's last frame (the film is cropped around x = 48.5%). */
.room[data-room="1"] .room__media img { object-position: 48.5% 50%; }
