/* ============================================================
   BLOOM — Specialty Coffee Roastery & Café
   Motion spine per build-premium-site: fonts gate + static
   fallback + reduced motion. Light paper page, dark media bands.
   ============================================================ */

:root{
  --paper:#F5EFE4;
  --paper-2:#EDE5D6;
  --ink:#16110D;
  --ink-soft:#2A211A;
  --accent:#B4622C;
  --muted:#7A6A5B;

  --display:"Fraunces", Georgia, "Times New Roman", serif;
  --body:"Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:"JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad:clamp(20px, 5vw, 88px);
  --maxw:1440px;
}

*,*::before,*::after{ box-sizing:border-box; }

html,body{ margin:0; padding:0; }
html{ -webkit-text-size-adjust:100%; }

body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  font-size:clamp(15px,1.05vw,17px);
  line-height:1.6;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

img{ display:block; max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,p{ margin:0; }

/* ---------- FONTS GATE ---------------------------------------
   Content stays hidden until real fonts are ready, so SplitText
   never measures against a fallback face. ------------------- */
main,footer,.nav{ visibility:hidden; }
html.is-ready main, html.is-ready footer, html.is-ready .nav{ visibility:visible; }

/* ---------- STATIC FALLBACK (CDN down) ---------------------- */
html.is-static main, html.is-static footer, html.is-static .nav{ visibility:visible; }
html.is-static .preloader{ display:none; }
html.is-static [data-reveal]{ opacity:1; transform:none; }
html.is-static .hero__stencil{ display:none; }
html.is-static .hero__after{ opacity:1; }
html.is-static .hero__sticky{ position:relative; }
html.is-static .hero{ height:auto; }
html.is-static .manifesto__text .word{ opacity:1; }
html.is-static .stage__pin{ position:relative; height:auto; padding-block:14vh; }
html.is-static .beat{ opacity:1; transform:none; }

html.is-locked, html.is-locked body{ overflow:hidden; }

::selection{ background:var(--accent); color:var(--paper); }

/* ---------- SHARED BITS ------------------------------------- */
.label{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
  display:flex; align-items:center; gap:.7em;
}
.label i{ font-style:normal; color:var(--accent); }
.label--light{ color:rgba(245,239,228,.55); }
.label--light i{ color:var(--accent); }

[data-reveal]{ opacity:0; transform:translateY(30px); }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader{
  position:fixed; inset:0; z-index:200;
  background:var(--ink); color:var(--paper);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:22px;
}
.preloader__inner{ display:flex; align-items:baseline; gap:14px; }
.preloader__label{
  font-family:var(--mono); font-size:11px; letter-spacing:.24em;
  text-transform:uppercase; color:rgba(245,239,228,.5);
}
.preloader__count{
  font-family:var(--display); font-weight:300;
  font-size:clamp(48px,9vw,120px); line-height:1;
  font-variant-numeric:tabular-nums;
}
.preloader__bar{
  width:min(240px,42vw); height:1px; background:rgba(245,239,228,.18); overflow:hidden;
}
.preloader__bar i{ display:block; height:100%; width:0%; background:var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px var(--pad);
  mix-blend-mode:difference;
  color:#fff;
}
.nav__mark{
  font-family:var(--display); font-weight:600; font-size:19px;
  letter-spacing:.16em;
}
.nav__links{ display:flex; gap:30px; }
.nav__links a{
  font-family:var(--mono); font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; opacity:.75; transition:opacity .3s;
}
.nav__links a:hover{ opacity:1; }
.nav__cta{
  font-family:var(--mono); font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; padding:9px 18px;
  border:1px solid rgba(255,255,255,.45); border-radius:100px;
  transition:background .35s, color .35s;
}
.nav__cta:hover{ background:#fff; color:#000; }

@media (max-width:820px){
  .nav__links{ display:none; }
  .nav{ padding:16px var(--pad); }
}

/* ============================================================
   01 · HERO — MASK ZOOM-THROUGH
   ============================================================ */
.hero{ height:320vh; position:relative; }
.hero__sticky{
  position:sticky; top:0; height:100vh; overflow:hidden;
  background:var(--ink);
}

.hero__media{ position:absolute; inset:0; }
.hero__media img{
  width:100%; height:100%; object-fit:cover;
  transform:scale(1.12); will-change:transform;
}
.hero__grade{
  position:absolute; inset:0;
  background:
    linear-gradient(to bottom, rgba(22,17,13,.62) 0%, rgba(22,17,13,.42) 42%, rgba(22,17,13,.82) 100%);
  opacity:0;
}

/* the paper stencil sits above the photo */
.hero__stencil{ position:absolute; inset:0; }
.stencil{ width:100%; height:100%; display:block; }
.stencil__fill{ fill:var(--paper); }
.stencil__text{
  font-family:var(--display);
  font-weight:700;
  font-size:300px;
  letter-spacing:-.02em;
}

.hero__type{
  position:absolute; left:var(--pad); right:var(--pad); bottom:12vh;
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  color:var(--ink); pointer-events:none;
}
.hero__eyebrow{
  font-family:var(--mono); font-size:11px; letter-spacing:.2em;
  text-transform:uppercase; color:var(--muted);
}
.hero__sub{
  font-family:var(--display); font-style:italic; font-weight:300;
  font-size:clamp(17px,1.9vw,26px); color:var(--ink-soft);
}

.hero__scroll{
  position:absolute; left:50%; bottom:34px; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:9px;
  font-family:var(--mono); font-size:10px; letter-spacing:.24em;
  text-transform:uppercase; color:var(--muted);
}
.hero__scroll i{ width:1px; height:34px; background:currentColor; opacity:.4; }

/* the payoff after the camera is through the letter */
.hero__after{
  position:absolute; inset:0; z-index:3;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:20px; text-align:center; padding:0 var(--pad);
  color:var(--paper); opacity:0; pointer-events:none;
}
.hero__h1{
  font-family:var(--display); font-weight:300;
  font-size:clamp(34px,6.2vw,88px); line-height:1.03; letter-spacing:-.025em;
}
.hero__line{ display:block; }
.hero__afterSub{
  font-family:var(--mono); font-size:11px; letter-spacing:.2em;
  text-transform:uppercase; color:rgba(245,239,228,.62);
}

@media (max-width:820px){
  .hero{ height:260vh; }
  .stencil__text{ font-size:210px; }
  .hero__type{ flex-direction:column; align-items:flex-start; gap:8px; bottom:15vh; }
}

/* ============================================================
   02 · MANIFESTO
   ============================================================ */
.manifesto{
  max-width:var(--maxw); margin:0 auto;
  padding:clamp(90px,15vh,170px) var(--pad);
  display:grid; grid-template-columns:1fr; gap:44px;
}
.manifesto__text{
  font-family:var(--display); font-weight:300;
  font-size:clamp(21px,3.1vw,44px); line-height:1.32; letter-spacing:-.015em;
  max-width:19ch; max-width:min(100%,26ch);
}
.manifesto__text{ max-width:none; }
.manifesto__text .word{ opacity:.13; }

@media (min-width:900px){
  .manifesto{ grid-template-columns:180px 1fr; gap:60px; align-items:start; }
  .label{ padding-top:1.1em; }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee{
  border-block:1px solid rgba(22,17,13,.14);
  padding:20px 0; overflow:hidden; white-space:nowrap;
  background:var(--paper-2);
}
.marquee__track{ display:inline-flex; align-items:center; gap:26px; will-change:transform; }
.marquee__track span{
  font-family:var(--display); font-weight:300; font-style:italic;
  font-size:clamp(19px,2.5vw,34px); letter-spacing:-.01em;
}
.marquee__track i{ color:var(--accent); font-style:normal; }

/* ============================================================
   03 · THE BLOOM — PINNED SCRUB
   ============================================================ */
.stage{ background:var(--ink); }
.stage__pin{
  position:relative; height:100vh; overflow:hidden;
  color:var(--paper);
  display:grid;
  grid-template-rows:auto 1fr auto;
  padding:clamp(84px,12vh,120px) var(--pad) clamp(30px,5vh,50px);
}
.stage__media{ position:absolute; inset:0; z-index:0; }
.stage__media img{ width:100%; height:100%; object-fit:cover; opacity:.58; }
.stage__grade{
  position:absolute; inset:0;
  background:linear-gradient(to right, rgba(22,17,13,.95) 0%, rgba(22,17,13,.88) 38%, rgba(22,17,13,.44) 100%);
}
.stage__head{ position:relative; z-index:2; display:flex; flex-direction:column; gap:16px; }
.stage__title{
  font-family:var(--display); font-weight:300;
  font-size:clamp(30px,5.4vw,72px); line-height:1.04; letter-spacing:-.025em;
}
.stage__beats{
  position:relative; z-index:2; align-self:center;
  display:flex; flex-direction:column; gap:clamp(10px,2.2vh,22px);
  max-width:640px;
}
.beat{
  display:grid; grid-template-columns:44px 150px 1fr; align-items:baseline; gap:16px;
  padding-bottom:clamp(10px,2vh,18px);
  border-bottom:1px solid rgba(245,239,228,.14);
  opacity:.22;
}
.beat__no{ font-family:var(--mono); font-size:11px; color:var(--accent); letter-spacing:.12em; }
.beat__name{
  font-family:var(--display); font-weight:400;
  font-size:clamp(20px,2.8vw,34px); letter-spacing:-.02em;
}
.beat__note{ font-size:clamp(12px,1.05vw,14px); color:rgba(245,239,228,.66); line-height:1.5; }

.stage__timer{
  position:relative; z-index:2; justify-self:end;
  display:flex; align-items:baseline; gap:10px;
  font-family:var(--mono); font-variant-numeric:tabular-nums;
}
.stage__timer span:first-child{ font-size:clamp(22px,3vw,40px); color:var(--paper); }
.stage__timerLabel{ font-size:10px; letter-spacing:.24em; text-transform:uppercase; color:rgba(245,239,228,.45); }

@media (max-width:820px){
  .beat{ grid-template-columns:38px 1fr; gap:10px 14px; }
  .beat__note{ grid-column:2 / -1; }
  .stage__pin{ height:auto; padding-block:14vh 10vh; }
  .stage__beats{ margin-block:40px; }
  .beat{ opacity:1; }
}

/* ============================================================
   04 · MENU
   ============================================================ */
.menu{ position:relative; padding:clamp(90px,15vh,160px) 0; overflow:hidden; }
.menu__bg{ position:absolute; inset:0; opacity:0; z-index:0; }
.menu__bg img{ width:100%; height:100%; object-fit:cover; }
.menu__bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to right, rgba(245,239,228,.97) 0%, rgba(245,239,228,.9) 46%, rgba(245,239,228,.7) 100%);
}
.menu__inner{
  position:relative; z-index:1;
  max-width:var(--maxw); margin:0 auto; padding-inline:var(--pad);
  display:flex; flex-direction:column; gap:26px;
}
.menu__title{
  font-family:var(--display); font-weight:300;
  font-size:clamp(32px,6vw,80px); line-height:1; letter-spacing:-.03em;
  margin-bottom:14px;
}
.menu__list{ border-top:1px solid rgba(22,17,13,.16); }
.row{
  display:grid; grid-template-columns:minmax(180px,1.1fr) 2fr auto;
  align-items:baseline; gap:24px;
  padding:clamp(18px,2.6vh,26px) 0;
  border-bottom:1px solid rgba(22,17,13,.16);
  transition:padding-left .45s cubic-bezier(.2,.8,.2,1);
}
.row__name{
  font-family:var(--display); font-weight:400;
  font-size:clamp(19px,2.4vw,32px); letter-spacing:-.02em;
  transition:color .35s;
}
.row__desc{ color:var(--muted); font-size:clamp(12px,1.05vw,14.5px); }
.row__price{
  font-family:var(--mono); font-size:clamp(13px,1.15vw,16px);
  font-variant-numeric:tabular-nums; color:var(--ink);
}
@media (hover:hover){
  .row:hover{ padding-left:16px; }
  .row:hover .row__name{ color:var(--accent); }
}
@media (max-width:820px){
  .row{ grid-template-columns:1fr auto; gap:6px 16px; }
  .row__desc{ grid-column:1 / -1; }
}

/* ============================================================
   05 · STATS
   ============================================================ */
.stats{
  background:var(--ink); color:var(--paper);
  padding:clamp(80px,13vh,140px) var(--pad);
}
.stats .label{ max-width:var(--maxw); margin:0 auto 52px; }
.stats__grid{
  max-width:var(--maxw); margin:0 auto;
  display:grid; grid-template-columns:repeat(4,1fr); gap:36px;
}
.stat{ display:flex; flex-direction:column; gap:12px; }
.stat__num{
  font-family:var(--display); font-weight:300;
  font-size:clamp(44px,6.4vw,92px); line-height:.94; letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;
}
.stat--hero .stat__num{ color:var(--accent); }
.stat__label{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.16em;
  text-transform:uppercase; color:rgba(245,239,228,.55); line-height:1.6;
}
@media (max-width:820px){ .stats__grid{ grid-template-columns:repeat(2,1fr); gap:34px 22px; } }

/* ============================================================
   06 · VISIT
   ============================================================ */
.visit{ position:relative; }
.visit__media{ height:56vh; overflow:hidden; }
.visit__media img{ width:100%; height:120%; object-fit:cover; will-change:transform; }
.visit__inner{
  max-width:var(--maxw); margin:0 auto;
  padding:clamp(70px,11vh,120px) var(--pad) clamp(80px,13vh,150px);
  display:flex; flex-direction:column; gap:30px;
}
.visit__title{
  font-family:var(--display); font-weight:300;
  font-size:clamp(32px,6vw,80px); line-height:1.02; letter-spacing:-.03em;
}
.visit__cols{ display:grid; grid-template-columns:repeat(3,1fr); gap:34px; margin-top:16px; }
.visit__k{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.18em;
  text-transform:uppercase; color:var(--accent); margin-bottom:10px;
}
.visit__v{ font-size:clamp(14px,1.15vw,16.5px); line-height:1.75; }
.visit__cta{
  align-self:flex-start; margin-top:14px;
  font-family:var(--mono); font-size:11px; letter-spacing:.2em; text-transform:uppercase;
  padding:15px 30px; border:1px solid var(--ink); border-radius:100px;
  transition:background .4s, color .4s;
}
.visit__cta:hover{ background:var(--ink); color:var(--paper); }
@media (max-width:820px){ .visit__cols{ grid-template-columns:1fr; gap:26px; } .visit__media{ height:40vh; } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{
  background:var(--ink); color:var(--paper);
  padding:clamp(60px,9vh,100px) var(--pad) 36px;
  display:flex; flex-direction:column; gap:34px;
}
.footer__mark{
  font-family:var(--display); font-weight:700;
  font-size:clamp(58px,16vw,220px); line-height:.82; letter-spacing:-.04em;
  color:rgba(245,239,228,.1);
}
.footer__meta, .footer__fine{
  display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap;
  font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
}
.footer__meta{ color:rgba(245,239,228,.7); }
.footer__fine{ color:rgba(245,239,228,.36); border-top:1px solid rgba(245,239,228,.13); padding-top:22px; }
.footer__demo{ color:var(--accent); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  .hero{ height:100vh; }
  .hero__stencil{ display:none; }
  .hero__after{ opacity:1; }
  .hero__grade{ opacity:1; }
  .hero__media img{ transform:none; }
  .manifesto__text .word{ opacity:1; }
  .beat{ opacity:1; }
  [data-reveal]{ opacity:1; transform:none; }
  .marquee__track{ transform:none; }
  .stage__pin{ height:auto; padding-block:14vh; }
}
