/* home.css — index.html: scroll-driven "motion" home page.
   Scenes: hero, clients, stats (pinned), practices (horizontal reel), manifesto, founder, notes.
   GSAP ScrollTrigger in home.js drives the motion; these styles are the resting layout plus
   the mobile / reduced-motion fallbacks. */

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.page-home main { overflow-x: clip; }
.scene { position: relative; }

.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  width: 100%; height: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* Word splitting (home.js wraps words in .w > .wi) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .03em .16em; margin: -.06em -.03em -.16em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Scene 01: Hero (centred, floating cards, logo strip) ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + var(--header-top) + 48px); padding-bottom: 0;
  background: var(--cream); color: var(--ink); overflow: hidden; text-align: center;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 48% 42% at 50% 46%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 60%, rgba(185, 138, 47, .14), transparent 70%),
    linear-gradient(180deg, rgba(250, 246, 239, 0), rgba(250, 246, 239, .85));
}
.hero-inner { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 24px 72px; will-change: transform, opacity; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; margin-bottom: 30px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .7);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  backdrop-filter: blur(6px);
}
.hero-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(185, 138, 47, .18); }
.hero-title { font-size: clamp(52px, 8vw, 128px); line-height: .94; letter-spacing: -.025em; max-width: 12ch; margin-inline: auto; }
.hero-title em { color: var(--gold); }
.hero-sub { font-size: clamp(17px, 1.4vw, 21px); max-width: 48ch; color: var(--muted); margin: 28px auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }

/* Floating cards */
.float {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 24px 50px -24px rgba(21, 42, 74, .45); text-align: left; will-change: transform;
  animation: drift 7s ease-in-out infinite;
}
.float img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }
.float-chip b { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; }
.float-chip small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.float-tl { left: 2%; top: 22%; }
.float-tr { right: 2%; top: 20%; animation-delay: -2s; }
.float-bl { left: 6%; bottom: 10%; animation-delay: -4s; }
.float-br { right: 5%; bottom: 12%; animation-delay: -1s; }
.float-stat, .float-path { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 20px; border-radius: 16px; }
.float-stat small, .float-path small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.float-stat b { font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 1; }
.float-stat .accent { color: var(--gold); font-weight: 340; }
.float-bar { display: block; width: 150px; height: 4px; border-radius: 2px; background: var(--cream-3); overflow: hidden; margin-top: 6px; }
.float-bar em { display: block; width: 0; height: 100%; background: var(--gold); animation: fill 1.6s var(--ease) 1.2s forwards; }
.float-path b { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.float-path svg { width: 48px; height: 12px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fill { to { width: 72%; } }

/* ---------- Scene 02: Clients ---------- */
.clients { min-height: 100svh; display: flex; align-items: center; background: var(--cream-2); padding: var(--section-y) 0; }
.clients-inner { text-align: center; width: 100%; }
.clients .section-label { justify-content: center; }
.clients .section-label::before { display: none; }
.clients .section-title { margin: 0 auto 56px; max-width: 16ch; }
.logo-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: 1000px; margin: 0 auto; }
.logo-card {
  display: grid; place-items: center;
  width: 224px; height: 104px; padding: 18px 28px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 30px -22px rgba(21, 42, 74, .35); will-change: transform, opacity;
  transition: box-shadow .3s, border-color .3s;
}
.logo-card:hover { border-color: var(--gold-line); box-shadow: 0 18px 36px -22px rgba(21, 42, 74, .45); }
.logo-card img { max-height: 48px; max-width: min(160px, 100%); width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.logo-card:hover img { filter: none; opacity: 1; }

/* ---------- Scene 03: Stats (pinned sequence) ---------- */
.stats { background: var(--cream); padding: 0; }
.stats-stage { position: relative; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.stats-stage .container { position: relative; z-index: 1; width: 100%; }
.stat-stack { position: relative; height: clamp(240px, 30vw, 400px); }
.stat-slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: transform, opacity; }
.stat-num { font-family: var(--font-display); font-weight: 300; font-size: clamp(120px, 23vw, 360px); line-height: .8; letter-spacing: -.05em; }
.stat-num .accent { color: var(--gold); font-weight: 340; }
.stat-label { margin-top: 28px; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat-dots { display: flex; gap: 10px; margin-top: 44px; }
.stat-dots i { display: block; width: 36px; height: 2px; background: var(--line-strong); transition: background .3s; }
.stat-dots i.on { background: var(--gold); }
.stat-ring {
  position: absolute; right: -12vw; top: 50%; width: 64vw; height: 64vw; translate: 0 -50%;
  color: var(--gold); opacity: .35; will-change: transform;
}

/* ---------- Scene 04: Practices (horizontal reel) ---------- */
/* The pin is exactly one viewport tall; the track takes whatever height is left after the
   heading and progress bar, and every panel stretches to that height so nothing is clipped. */
.practices { background: var(--cream-2); padding: 0; }
.h-pin {
  height: 100svh; display: flex; flex-direction: column; gap: clamp(20px, 3vh, 36px); overflow: hidden;
  padding: calc(var(--header-h) + var(--header-top) + 20px) 0 clamp(20px, 3vh, 36px);
}
.h-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex: 0 0 auto; }
.h-head .section-label { margin-bottom: 14px; }
.h-head .section-title { margin-bottom: 0; font-size: clamp(32px, 3.6vw, 52px); }
.h-track {
  display: flex; align-items: stretch; gap: 20px; flex: 0 1 auto; min-height: 0; margin-block: auto;
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2)); padding-right: 12vw; will-change: transform;
}
.panel {
  position: relative; overflow: hidden auto; scrollbar-width: none; align-self: stretch; min-height: 0;
  flex: 0 0 min(680px, 80vw);
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(24px, 3.4vh, 40px) 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.panel::-webkit-scrollbar { display: none; }
.panel-num {
  position: absolute; right: 18px; top: -12px; pointer-events: none;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(110px, 15vh, 160px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--gold-line);
}
.panel-glyph { width: 40px; height: 40px; color: var(--gold); flex: 0 0 auto; }
.panel h3 { font-size: clamp(26px, 3.4vh + .8vw, 44px); line-height: 1.05; max-width: 16ch; }
.panel .line { color: var(--muted); font-size: clamp(16px, 2.3vh, 21px); line-height: 1.5; max-width: 40ch; margin-bottom: 10px; }
.panel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 12px; }
.panel-cols h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-weight: 500; }
.panel-cols li { padding: 10px 0; font-size: clamp(14px, 2vh, 17px); line-height: 1.45; color: var(--fg); border-top: 1px solid var(--line); }
.panel .link-arrow { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-top: auto; padding-top: 18px; }
.panel-end { background: var(--navy); color: var(--cream); border-color: transparent; justify-content: center; align-items: flex-start; gap: 22px; flex-basis: min(400px, 70vw); }
.panel-end p { font-family: var(--font-display); font-size: clamp(26px, 3vh + .4vw, 38px); line-height: 1.1; }
.h-progress { height: 2px; background: var(--line); flex: 0 0 auto; }
.h-progress i { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Scene 05: Manifesto ---------- */
.approach { padding: var(--section-y) 0; background: var(--cream); }
.manifesto { font-family: var(--font-display); font-weight: 340; font-size: clamp(30px, 4.6vw, 72px); line-height: 1.1; letter-spacing: -.015em; max-width: 21ch; }
.manifesto .wi { color: rgba(20, 20, 20, .16); }
.approach-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 96px; }
.approach-list li { padding-top: 24px; border-top: 1px solid var(--line-strong); }
.approach-list .num { display: block; margin-bottom: 22px; }
.approach-list h3 { font-size: 22px; margin-bottom: 10px; }
.approach-list p { color: var(--muted); font-size: 15px; }

/* ---------- Scene 06: Founder ---------- */
.founder { padding: var(--section-y) 0; background: var(--cream-2); }
.founder-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.founder-mask { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; clip-path: inset(0 0 100% 0); }
.founder-mask img { width: 100%; height: 120%; object-fit: cover; object-position: top; will-change: transform; }
.founder-role { color: var(--gold); margin: -16px 0 22px; font-size: 15px; letter-spacing: .06em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.badges li { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; }
.founder-copy .link-arrow { margin-top: 32px; }

/* ---------- Scene 07: Notes ---------- */
.notes { padding: var(--section-y) 0; background: var(--cream); position: relative; z-index: 2; }
.notes .section-head { margin-bottom: 40px; }
.notes-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.note-card { display: flex; flex-direction: column; gap: 18px; min-height: 240px; will-change: transform, opacity; }
.note-card .note-cat { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.note-card .note-title { font-family: var(--font-display); font-size: clamp(20px, 1.7vw, 25px); line-height: 1.22; flex: 1; }

/* ---------- Mobile: no pinning, stacked scenes ---------- */
@media (max-width: 1024px) {
  .hero { min-height: 0; padding-top: calc(var(--header-h) + var(--header-top) + 32px); }
  .hero-inner { padding-bottom: 32px; }
  .float { position: static; animation: none; box-shadow: none; margin-top: 12px; }
  .float-stat, .float-path { display: none; }
  .clients { min-height: 0; }
  .logo-card { width: calc(50% - 9px); height: 84px; padding: 14px 18px; }
  .logo-card img { max-height: 40px; }
}
@media (max-width: 899px) {
  .stats-stage { height: auto; padding: var(--section-y) 0; }
  .stat-stack { height: auto; display: grid; gap: 56px; }
  .stat-slide { position: static; opacity: 1; }
  .stat-num { font-size: clamp(96px, 28vw, 150px); }
  .stat-dots, .stat-ring { display: none; }
  .h-pin { height: auto; padding: var(--section-y) 0; gap: 32px; }
  .h-head { flex-direction: column; align-items: flex-start; padding: 0 var(--gutter); }
  .h-head .section-title { font-size: clamp(32px, 4.2vw, 60px); }
  .h-track { flex-direction: column; padding: 0 var(--gutter); }
  .panel { flex-basis: auto; height: auto; padding: 28px; gap: 16px; }
  .panel h3 { font-size: 28px; }
  .panel .line { font-size: 17px; }
  .panel-cols { grid-template-columns: 1fr; margin-top: 0; }
  .panel-cols li { font-size: 15px; }
  .panel-num { font-size: 120px; }
  .panel-end { flex-basis: auto; }
  .h-progress { display: none; }
  .approach-list { grid-template-columns: 1fr; gap: 24px; margin-top: 64px; }
  .founder-grid { grid-template-columns: 1fr; gap: 40px; }
  .notes-row { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion: everything visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .stat-slide { position: static; opacity: 1; }
  .stat-stack { height: auto; display: grid; gap: 40px; }
  .stats-stage { height: auto; padding: var(--section-y) 0; }
  .manifesto .wi { color: inherit; }
  .founder-mask { clip-path: none; }
  .hero-scroll i { animation: none; }
}

/* Short viewports (browser toolbars, small laptops): tighten the pinned reel so cards fit */
@media (min-width: 900px) and (max-height: 860px) {
  .h-pin { gap: 14px; padding-top: calc(var(--header-h) + var(--header-top) + 8px); padding-bottom: 14px; }
  .h-head .section-label { margin-bottom: 6px; }
  .h-head .section-title { font-size: clamp(26px, 3vw, 38px); }
  .panel { gap: 8px; padding: 18px 28px 20px; }
  .panel-num { font-size: 96px; top: -8px; }
  .panel-glyph { width: 30px; height: 30px; }
  .panel h3 { font-size: clamp(22px, 2.4vw, 30px); }
  .panel .line { font-size: 15px; margin-bottom: 2px; }
  .panel-cols { gap: 20px; margin-top: 6px; }
  .panel-cols h4 { font-size: 10px; margin-bottom: 2px; }
  .panel-cols li { padding: 6px 0; font-size: 14px; line-height: 1.35; }
  .panel .link-arrow { padding-top: 10px; font-size: 12px; }
  .panel-end p { font-size: 26px; }
}
