/* ==========================================================================
   BeSpokeHQ — Design System
   Palette: warm paper + terracotta ember. Type: Inter Tight / Instrument Serif.
   ========================================================================== */

:root{
  /* Ink & paper */
  --ink:        #17120F;
  --ink-2:      #241C17;
  --ink-3:      #3B2F27;
  --bone:       #F8F2E9;
  --bone-2:     #F1E7D9;
  --bone-3:     #E5D7C4;

  /* Warm accents */
  --clay:       #C2512B;
  --clay-deep:  #9E3D1E;
  --ember:      #E2793C;
  --amber:      #EDB04A;
  --olive:      #5D6550;

  /* Semantic */
  --bg:         var(--bone);
  --fg:         var(--ink);
  --muted:      #7C6A5C;
  --line:       rgba(23,18,15,.14);
  --line-soft:  rgba(23,18,15,.08);

  /* Type */
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale — fluid */
  --t-hero:  clamp(2.6rem, 6.6vw, 6.75rem);
  --t-h1:    clamp(2.25rem, 6vw, 5.5rem);
  --t-h2:    clamp(1.9rem, 4.4vw, 4rem);
  --t-h3:    clamp(1.35rem, 2.3vw, 2rem);
  --t-lead:  clamp(1.05rem, 1.6vw, 1.45rem);
  --t-body:  clamp(1rem, 1.1vw, 1.125rem);
  --t-small: .8125rem;
  --t-label: .6875rem;

  /* Rhythm */
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --sec: clamp(5rem, 11vw, 11rem);
  --maxw: 1560px;
  --r: 14px;
  --r-lg: 26px;

  /* Motion */
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-io: cubic-bezier(.65,.05,.36,1);
  --dur: .8s;
}

/* ---------- Reset ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:var(--sans); font-size:var(--t-body); font-weight:400;
  line-height:1.55; letter-spacing:-.011em;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}
h1,h2,h3,h4,p,figure,blockquote{ margin:0; }
ul,ol{ margin:0; padding:0; list-style:none; }
img,svg,video{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button,input,textarea,select{ font:inherit; color:inherit; }
button{ background:none; border:0; cursor:pointer; }
::selection{ background:var(--clay); color:var(--bone); }
:focus-visible{ outline:2px solid var(--clay); outline-offset:3px; border-radius:3px; }
.sr{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.skip{ position:absolute; left:-999px; top:0; z-index:200; background:var(--ink); color:var(--bone); padding:.75rem 1rem; }
.skip:focus{ left:.5rem; top:.5rem; }

/* ---------- Layout ---------- */
.wrap{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gut); }
.section{ padding-block:var(--sec); position:relative; isolation:isolate; }
.grid{ display:grid; gap:clamp(1.25rem,2.6vw,2.5rem); }
.cols-2{ grid-template-columns:repeat(2,1fr); }
.cols-3{ grid-template-columns:repeat(3,1fr); }
.cols-4{ grid-template-columns:repeat(4,1fr); }
.rule{ height:1px; background:var(--line); border:0; margin:0; }

/* ---------- Type utilities ---------- */
.display{ font-size:var(--t-hero); line-height:.92; font-weight:600; letter-spacing:-.045em; }
.h1{ font-size:var(--t-h1); line-height:.96; font-weight:600; letter-spacing:-.042em; }
.h2{ font-size:var(--t-h2); line-height:1.02; font-weight:600; letter-spacing:-.036em; }
.h3{ font-size:var(--t-h3); line-height:1.18; font-weight:600; letter-spacing:-.028em; }
.lead{ font-size:var(--t-lead); line-height:1.5; color:var(--muted); letter-spacing:-.015em; }
.em{ font-family:var(--serif); font-weight:400; font-style:italic; font-size:1.05em; letter-spacing:-.015em; color:var(--clay); }
.dark .em{ color:var(--ember); }
.label{
  font-family:var(--mono); font-size:var(--t-label); font-weight:500;
  text-transform:uppercase; letter-spacing:.16em; color:var(--muted);
}
.label-ink{ color:var(--clay); }
.tnum{ font-variant-numeric:tabular-nums; }

.eyebrow{ display:flex; align-items:center; gap:.6rem; }
.eyebrow::before{
  content:""; width:26px; height:1px; background:var(--clay); flex:none;
}

/* ---------- Theme blocks ---------- */
.dark{ background:var(--ink); color:var(--bone); --fg:var(--bone); --muted:#A08E7E; --line:rgba(248,242,233,.16); --line-soft:rgba(248,242,233,.08); }
.dark ::selection{ background:var(--ember); color:var(--ink); }
.tint{ background:var(--bone-2); }

/* ---------- Buttons ---------- */
.btn{
  --bg-b:var(--ink); --fg-b:var(--bone);
  position:relative; display:inline-flex; align-items:center; gap:.7rem;
  padding:1rem 1.6rem; border-radius:999px; overflow:hidden; isolation:isolate;
  background:var(--bg-b); color:var(--fg-b);
  font-size:.9375rem; font-weight:500; letter-spacing:-.01em; line-height:1;
  transition:transform .45s var(--ease), color .35s var(--ease);
}
.btn::after{
  content:""; position:absolute; inset:0; z-index:-1; background:var(--clay);
  transform:translateY(101%); transition:transform .55s var(--ease);
}
.btn:hover{ transform:translateY(-2px); color:var(--bone); }
.btn:hover::after{ transform:translateY(0); }
.btn .arw{ transition:transform .45s var(--ease); }
.btn:hover .arw{ transform:translate(3px,-3px); }
.btn--clay{ --bg-b:var(--clay); --fg-b:var(--bone); }
.btn--clay::after{ background:var(--ink); }
.btn--ghost{ --bg-b:transparent; --fg-b:var(--fg); box-shadow:inset 0 0 0 1px var(--line); }
.btn--lg{ padding:1.2rem 2rem; font-size:1.0625rem; }
.btn--sm{ padding:.7rem 1.1rem; font-size:.8125rem; }

/* Text link with underline sweep */
.tlink{ position:relative; display:inline-block; padding-bottom:2px; }
.tlink::after{
  content:""; position:absolute; left:0; bottom:0; width:100%; height:1px;
  background:currentColor; transform:scaleX(0); transform-origin:100% 50%;
  transition:transform .5s var(--ease);
}
.tlink:hover::after{ transform:scaleX(1); transform-origin:0 50%; }

/* ---------- Media treatment (unifies all photography) ---------- */
.media{
  position:relative; overflow:hidden; border-radius:var(--r);
  background:var(--bone-3);
}
.media img{
  width:100%; height:100%; object-fit:cover;
  filter:saturate(.72) contrast(1.04) sepia(.14) brightness(.98);
  transition:transform 1.1s var(--ease), filter .7s var(--ease);
}
.media::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(194,81,43,.14), rgba(23,18,15,.24));
  mix-blend-mode:multiply; opacity:.78; transition:opacity .7s var(--ease);
}
.media--tall{ aspect-ratio:3/4; }
.media--square{ aspect-ratio:1/1; }
.media--wide{ aspect-ratio:16/10; }
/* will-change only while the hover transform is actually running — permanent
   will-change on every photo on the page was leaving dozens of compositor
   layers alive at once, a real cost during scroll. */
a:hover .media img, .hov:hover .media img{ will-change:transform; transform:scale(1.045); filter:saturate(.9) contrast(1.03) sepia(.05); }
a:hover .media::after, .hov:hover .media::after{ opacity:.5; }

/* ==========================================================================
   Animation primitives
   ========================================================================== */
/* No default will-change here: a long headline can wrap 40+ words into their
   own spans, and promoting all of them to compositor layers for the whole
   life of the page — not just the one-time reveal — was a real scroll-jank
   source. The transition still runs fine without it. */
[data-split] .ln{ display:inline-block; overflow:hidden; vertical-align:top; padding-bottom:.14em; margin-bottom:-.14em; }
[data-split] .wd{ display:inline-block; }
.js [data-split] .wd{ transform:translateY(105%); transition:transform 1.05s var(--ease); }
.js [data-split].is-in .wd{ transform:none; }

.js [data-reveal]{
  opacity:0; transform:translateY(26px);
  transition:opacity .9s var(--ease), transform .9s var(--ease), clip-path 1s var(--ease);
}
.js [data-reveal="fade"]{ transform:none; }
.js [data-reveal="mask"]{ opacity:1; transform:none; clip-path:inset(0 0 101% 0); }
.js [data-reveal].is-in{ opacity:1; transform:none; clip-path:inset(0 0 0 0); }

[data-parallax]{ will-change:transform; }

/* Curtain intro */
.curtain{
  position:fixed; inset:0; z-index:120; background:var(--ink);
  display:grid; place-items:center; pointer-events:none;
}
.curtain__mark{ font-family:var(--mono); font-size:var(--t-label); letter-spacing:.22em; text-transform:uppercase; color:var(--bone); opacity:.85; }
.curtain.is-done{ display:none; }

/* Cursor */
.cursor{
  position:fixed; top:0; left:0; z-index:110; pointer-events:none;
  width:10px; height:10px; margin:-5px 0 0 -5px; border-radius:50%;
  background:var(--clay);
  transition:width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s;
  opacity:0;
}
.cursor.is-on{ opacity:1; }
.cursor.is-big{ width:54px; height:54px; margin:-27px 0 0 -27px; background:rgba(194,81,43,.22); }
@media (hover:none),(pointer:coarse){ .cursor{ display:none; } }

/* ==========================================================================
   Header
   ========================================================================== */
.hdr{
  position:fixed; top:0; left:0; right:0; z-index:100;
  transition:transform .55s var(--ease), background .4s var(--ease), backdrop-filter .4s;
}
.hdr.is-hidden{ transform:translateY(-102%); }
.hdr.is-stuck{ background:rgba(248,242,233,.86); backdrop-filter:blur(7px); box-shadow:0 1px 0 var(--line-soft); }
.hdr.is-stuck.on-dark{ background:rgba(23,18,15,.74); }
.hdr__in{
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem;
  padding-block:clamp(.9rem,1.6vw,1.35rem);
}
.brand{ display:flex; align-items:center; gap:.6rem; font-weight:600; letter-spacing:-.03em; font-size:1.0625rem; }
.brand__dot{ width:9px; height:9px; border-radius:50%; background:var(--clay); flex:none; animation:pulse 3.2s var(--ease) infinite; }
@keyframes pulse{ 0%,100%{ transform:scale(1); opacity:1 } 50%{ transform:scale(.7); opacity:.6 } }

.nav{ display:flex; align-items:center; gap:clamp(1rem,2vw,2rem); }
.nav a{ font-size:.9375rem; font-weight:450; color:var(--fg); opacity:.86; }
.nav a:hover{ opacity:1; }
.hdr__cta{ display:flex; align-items:center; gap:.75rem; }

.burger{ display:none; width:42px; height:42px; border-radius:999px; box-shadow:inset 0 0 0 1px var(--line); place-items:center; }
.burger span{ display:block; width:16px; height:1.5px; background:var(--fg); transition:transform .4s var(--ease), opacity .3s; }
.burger span+span{ margin-top:4px; }
.is-open .burger span:first-child{ transform:translateY(5.5px) rotate(45deg); }
.is-open .burger span:nth-child(2){ opacity:0; }
.is-open .burger span:last-child{ transform:translateY(-5.5px) rotate(-45deg); }

.drawer{
  position:fixed; inset:0; z-index:99; background:var(--ink); color:var(--bone);
  padding:clamp(5.5rem,14vw,7rem) var(--gut) var(--gut);
  display:flex; flex-direction:column; justify-content:space-between;
  clip-path:inset(0 0 100% 0); transition:clip-path .75s var(--ease);
  visibility:hidden;
}
.drawer.is-open{ clip-path:inset(0 0 0 0); visibility:visible; }
.drawer__nav a{
  display:block; font-size:clamp(2rem,9vw,3.25rem); font-weight:600; letter-spacing:-.04em;
  line-height:1.12; padding-block:.35rem; opacity:0; transform:translateY(18px);
  transition:opacity .5s var(--ease), transform .5s var(--ease), color .3s;
}
.drawer.is-open .drawer__nav a{ opacity:1; transform:none; }
.drawer__nav a:hover{ color:var(--ember); }
.drawer__foot{ display:flex; flex-wrap:wrap; gap:1rem 2rem; justify-content:space-between; align-items:end; border-top:1px solid rgba(248,242,233,.16); padding-top:1.25rem; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative; min-height:100svh; display:flex; flex-direction:column; justify-content:flex-end;
  padding-top:clamp(6rem,12vw,8rem); padding-bottom:clamp(1.25rem,2.4vw,2rem);
  overflow:hidden; isolation:isolate;
}
.hero__bg{ position:absolute; inset:0; z-index:-2; background:var(--ink); overflow:hidden; }
.hero__bg::before{
  content:""; position:absolute; inset:-20%;
  background:
    radial-gradient(58% 52% at 76% 20%, rgba(226,121,60,.66), transparent 66%),
    radial-gradient(54% 50% at 14% 80%, rgba(194,81,43,.58), transparent 68%),
    radial-gradient(44% 40% at 46% 48%, rgba(237,176,74,.3), transparent 74%);
  animation:drift 26s var(--ease-io) infinite alternate;
}
@keyframes drift{
  0%{ transform:translate3d(-2%,-1%,0) scale(1) }
  50%{ transform:translate3d(3%,2%,0) scale(1.08) }
  100%{ transform:translate3d(-1%,3%,0) scale(1.03) }
}
.hero__bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(23,18,15,.62) 0%, rgba(23,18,15,.18) 40%, rgba(23,18,15,.82) 100%);
}
/* ---------- Canvas backgrounds (assets/js/bg-fx.js) ---------- */
.bg-fx{ position:absolute; inset:0; z-index:-1; opacity:0; transition:opacity 1.4s var(--ease); pointer-events:auto; }
.bg-fx.is-live{ opacity:.9; }
.bg-fx canvas{ display:block; width:100%; height:100%; }

.hero__top{ display:flex; flex-wrap:wrap; gap:1rem 2rem; justify-content:space-between; align-items:start; margin-bottom:auto; }
.hero__title{ margin-block:clamp(1.25rem,3.4vw,2.4rem) clamp(1.1rem,2.2vw,1.6rem); max-width:18ch; }
.hero__title .em{ color:var(--ember); }
.hero__row{ display:flex; flex-wrap:wrap; gap:clamp(1.5rem,4vw,4rem); align-items:end; justify-content:space-between; }
.hero__copy{ flex:1 1 480px; max-width:54ch; }
.hero__acts{ display:flex; flex-wrap:wrap; gap:.75rem; }

/* Centred hero variant — home hero and "why it matters" use this so the
   read is one straight vertical line instead of a left-block layout.
   The plain .hero relies on the wrap filling the full viewport height and
   an auto-margin to push content to the bottom; a centred hero instead
   lets the wrap size to its content and centres that block in the
   viewport, so it needs its own vertical rhythm rather than the auto-margin
   push (which collapses to 0 once the wrap no longer fills the height). */
.hero--center{ justify-content:center; }
.hero--center .hero__top{ justify-content:center; text-align:center; margin-bottom:0; }
.hero--center .hero__title{ margin-inline:auto; text-align:center; max-width:22ch; margin-top:clamp(2rem,5vw,3.25rem); }
.hero--center .hero__row{ flex-direction:column; align-items:center; text-align:center; gap:clamp(1.5rem,3vw,2.25rem); margin-top:clamp(1.5rem,3.4vw,2.5rem); }
.hero--center .hero__copy{ max-width:58ch; }
.hero--center .hero__acts{ justify-content:center; }
.hero--center .scrollcue{ flex-direction:column-reverse; gap:.5rem; margin-top:clamp(2rem,4vw,3rem); }

.hero__strip{
  margin-top:clamp(1.75rem,3.6vw,3rem); padding-top:1.25rem;
  border-top:1px solid rgba(248,242,233,.18);
  display:grid; grid-template-columns:repeat(4,1fr); gap:1rem;
}
.hero__stat b{ display:block; font-size:clamp(1.4rem,2.6vw,2.4rem); font-weight:600; letter-spacing:-.04em; line-height:1; }
.hero__stat > .label{ display:block; margin-top:.4rem; }
.hero__stat b span{ display:inline; }

/* Numeral + unit suffix (24h, 40+, 48h …) — a small gap and a step down in
   size keeps the unit reading as a unit instead of fusing into the number. */
.sfx{ margin-left:.06em; font-size:.62em; font-weight:500; color:var(--ember); }

.scrollcue{ display:flex; align-items:center; gap:.6rem; }
.scrollcue__line{ width:1px; height:34px; background:rgba(248,242,233,.25); position:relative; overflow:hidden; }
.scrollcue__line::after{ content:""; position:absolute; inset:0; background:var(--ember); animation:cue 2.2s var(--ease-io) infinite; }
@keyframes cue{ 0%{ transform:translateY(-100%) } 60%,100%{ transform:translateY(100%) } }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marq{ overflow:hidden; padding-block:clamp(1.1rem,2vw,1.6rem); border-block:1px solid var(--line); }
.marq__track{ display:flex; width:max-content; will-change:transform; animation:marq 44s linear infinite; }
.marq:hover .marq__track{ animation-play-state:paused; }
.marq--rev .marq__track{ animation-direction:reverse; }
@keyframes marq{ to{ transform:translate3d(-50%,0,0) } }
.marq__item{
  display:flex; align-items:center; gap:clamp(1.5rem,3vw,2.75rem);
  padding-inline:clamp(.75rem,1.5vw,1.4rem);
  font-size:clamp(1.05rem,2.1vw,1.9rem); font-weight:500; letter-spacing:-.03em; white-space:nowrap;
}
.marq__item::after{ content:"\002A"; color:var(--clay); font-size:.9em; }
.marq__item .em{ color:var(--clay); }

/* ==========================================================================
   Manifesto (scrubbed type)
   ========================================================================== */
.manifesto{ padding-block:clamp(6rem,14vw,13rem); }
.manifesto__lede{
  font-size:clamp(1.55rem,4.1vw,3.4rem); line-height:1.16; font-weight:500; letter-spacing:-.035em;
  max-width:24ch;
}
.manifesto__lede .em{ color:var(--clay); }
.manifesto__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(2rem,4vw,3.5rem); margin-top:clamp(3rem,7vw,6rem); }
.manifesto__note h3{ margin-bottom:.6rem; }
.manifesto__note{ border-top:1px solid var(--line); padding-top:1.25rem; }

/* Centred "why it matters" head — mirrors .hero--center so the two lead
   reads (hero, manifesto) sit on the same axis down the page. */
.manifesto--center .eyebrow{ justify-content:center; }
.manifesto--center .manifesto__lede{ margin-inline:auto; text-align:center; }

/* Sticky-aside split layout */
.split{ display:grid; grid-template-columns:minmax(200px,.36fr) 1fr; gap:clamp(2rem,5vw,5rem); align-items:start; }
.split__aside{ position:sticky; top:clamp(6rem,12vw,8rem); }
.split__aside .h3{ margin-top:.9rem; max-width:14ch; }
.split__aside p{ margin-top:1rem; max-width:32ch; }

/* ==========================================================================
   Stat band
   ========================================================================== */
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line); border-block:1px solid var(--line); }
.stats__cell{ background:var(--bg); padding:clamp(1.75rem,3.4vw,3rem) clamp(1.25rem,2vw,2rem); }
.dark .stats__cell{ background:var(--ink); }
.stats__n{ font-size:clamp(2.2rem,5.4vw,4.75rem); font-weight:600; letter-spacing:-.05em; line-height:.95; }
.stats__n .sfx{ color:var(--clay); }
.stats__cell p{ margin-top:.75rem; max-width:22ch; font-size:.9375rem; color:var(--muted); }
