/* =========================================================
   NOIR — BUILD 2 · "Noir identity" variant
   · dark roasted theme by default (light still available)
   · painted-sky artwork reserved for TWO hero-impact spots:
     the origins/map section + the footer
   · hero: 50% video / 50% content split
   (loads after style.css + pages.css + vintage.css)
   ========================================================= */

/* ---------- 1. no global sky — clean premium base ---------- */
body,
html[data-theme="light"] body,
html[data-theme="dark"] body{
  background-image:none;
  background-color:var(--bg);
}
html[data-theme="dark"] body{background-color:#14100a}
html[data-theme="light"] body{background-color:#ece5d7}
/* softer ambient wash without the painting */
body::before,
html[data-theme="light"] body::before{
  background:
    radial-gradient(110% 70% at 85% -10%,rgba(165,121,63,.10),transparent 55%),
    radial-gradient(90% 60% at 0% 100%,rgba(125,84,51,.08),transparent 60%);
}
html[data-theme="dark"] body::before{
  background:
    radial-gradient(110% 70% at 85% -10%,rgba(211,166,112,.07),transparent 55%),
    radial-gradient(90% 60% at 0% 100%,rgba(165,121,63,.06),transparent 60%);
}

/* nav over plain base */
html[data-theme="dark"] .nav.scrolled{background:rgba(18,13,8,.85)}
html[data-theme="light"] .nav.scrolled{background:rgba(238,231,218,.88)}

/* ---------- 2. sky artwork: ORIGINS section only ---------- */
#origins{position:relative;isolation:isolate;
  padding-block:clamp(110px,15vh,190px)}
#origins::before{content:"";position:absolute;inset:0;z-index:-2;
  background:url("../assets/bg-sky.webp") center / cover no-repeat}
#origins::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,var(--bg) 0%,transparent 14%,transparent 86%,var(--bg) 100%)}
html[data-theme="dark"] #origins::before{filter:brightness(.62) saturate(.9)}
html[data-theme="light"] #origins::before{opacity:.9}
/* readable panels over the painting */
#origins .origin-detail,#origins .origin-list li{
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
html[data-theme="dark"] #origins .map-panel-head b{color:#f4ead8}
html[data-theme="dark"] #origins .map-hint{background:rgba(20,14,9,.8)}

/* footer keeps its painted plants (2nd artwork spot) — inherited */

/* ---------- 3. HERO — 50 / 50 split ---------- */
.hero-vin{padding-block:calc(var(--nav-h) + 20px) 40px}
.hero-vin .wrap{
  max-width:min(1460px,96vw);
  grid-template-columns:1fr 1fr;
  gap:clamp(1.6rem,3.5vw,3.2rem)}
.hero-cine{height:clamp(430px,calc(100svh - var(--nav-h) - 120px),780px);cursor:pointer}
.hero-cine video{
  width:100%;height:100%;object-fit:cover;border-radius:26px;
  -webkit-mask-image:none;mask-image:none;
  border:1px solid var(--line-strong);
  box-shadow:0 50px 90px -50px rgba(0,0,0,.75)}
html[data-theme="light"] .hero-cine video{box-shadow:0 44px 80px -46px rgba(70,45,22,.55)}
/* subtle inner vignette so the fresco sits in the frame */
.hero-cine::after{content:"";position:absolute;inset:0;border-radius:26px;pointer-events:none;
  box-shadow:inset 0 0 70px rgba(20,12,6,.28)}
.hero-vin .bean-field{display:none}

/* hero typography breathes a bit more in the split */
.hero-vin .hero-tagline{max-width:20ch}
.hero-vin .hero-lead{max-width:46ch}

/* ---------- 4. separator reads on plain base ---------- */
.branch-sep img{filter:drop-shadow(0 26px 38px rgba(0,0,0,.45))}
html[data-theme="light"] .branch-sep img{filter:drop-shadow(0 26px 38px rgba(70,45,22,.35))}

/* ---------- 5. responsive ---------- */
@media (max-width:920px){
  .hero-vin .wrap{grid-template-columns:1fr;gap:1.8rem}
  .hero-cine{height:clamp(300px,46svh,480px);order:-1}
}
@media (max-width:560px){
  .hero-cine{height:clamp(240px,40svh,380px);border-radius:20px}
  .hero-cine video{border-radius:20px}
  #origins{padding-block:80px}
}

/* =========================================================
   V2.1 — luxury dark re-skin (edits assets)
   intro film · textured bg · painted footer · fused separators
   ========================================================= */

/* ---------- A. INTRO FILM (plays once, then hands off to hero) ---------- */
.intro{position:fixed;inset:0;z-index:200;background:#0b0703;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  opacity:1;transition:opacity .9s cubic-bezier(.4,0,.2,1)}
.intro-video{width:100%;height:100%;object-fit:cover;
  transform:scale(1.04);transition:transform 1.2s cubic-bezier(.4,0,.2,1),filter .9s ease}
.intro-vignette{position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(120% 90% at 50% 45%,transparent 45%,rgba(6,4,2,.55) 78%,rgba(6,4,2,.9) 100%)}
.intro-mark{position:absolute;inset-block-end:clamp(74px,12vh,120px);z-index:2;
  opacity:0;animation:introMark 1.6s cubic-bezier(.2,.7,.3,1) .5s forwards}
.intro-mark img{width:clamp(120px,17vw,190px);height:auto;opacity:.92;
  filter:drop-shadow(0 6px 20px rgba(0,0,0,.6))}
@keyframes introMark{from{opacity:0;transform:translateY(14px) scale(.97);filter:blur(6px)}
  to{opacity:1;transform:none;filter:blur(0)}}
.intro-skip{position:absolute;inset-block-end:26px;inset-inline-start:26px;z-index:3;
  padding:.6em 1.3em;border-radius:999px;font-size:0.82rem;font-family:inherit;cursor:pointer;
  color:#efe2cd;background:rgba(20,14,8,.5);border:1px solid rgba(233,214,183,.28);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  opacity:0;animation:introMark .8s ease 1.6s forwards;
  transition:background .25s,border-color .25s,color .25s}
.intro-skip:hover{background:rgba(40,28,16,.8);border-color:#d3a670;color:#fff}
.intro-bar{position:absolute;inset-block-end:0;inset-inline:0;height:2px;z-index:3;
  background:rgba(233,214,183,.14)}
.intro-bar i{display:block;height:100%;width:0%;background:linear-gradient(90deg,#a5793f,#e8c79b);
  transition:width .12s linear}
/* leaving state */
.intro.is-leaving{opacity:0;pointer-events:none}
.intro.is-leaving .intro-video{transform:scale(1.09);filter:blur(6px)}
.intro.is-done{display:none}
/* page is locked while the film runs */
html.intro-lock,html.intro-lock body{overflow:hidden;height:100%}
/* hero waits for the film, then reveals */
.intro-pending .hero-vin .hero-vin-text>*,
.intro-pending .hero-vin .hero-statue{opacity:0}
@media (prefers-reduced-motion:reduce){
  .intro,.intro-video,.intro-mark,.intro-skip{transition:none;animation:none;opacity:1}
}

/* ---------- B. textured dark background (site-wide) ---------- */
html[data-theme="dark"] body{
  background-color:#0d0906;
  background-image:url("../assets/bg-night.webp");
  background-size:cover;background-position:center top;background-repeat:no-repeat;
  background-attachment:scroll}
@media (min-width:900px) and (hover:hover){
  html[data-theme="dark"] body{background-attachment:fixed}
}
html[data-theme="dark"] body::before{
  background:
    linear-gradient(180deg,rgba(13,9,6,.34) 0%,rgba(13,9,6,.72) 45%,rgba(11,7,4,.9) 100%),
    radial-gradient(100% 60% at 80% 0%,rgba(211,166,112,.07),transparent 60%)}
/* light theme keeps the clean parchment base */
html[data-theme="light"] body{background-image:none;background-color:#ece5d7}

/* ---------- C. painted footer (fades out of the page) ---------- */
.footer{position:relative;margin-top:0;background:none;border-top:0;
  padding-block:clamp(150px,20vh,240px) 36px}
.footer::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url("../assets/bg-footer-night.webp") center bottom / cover no-repeat;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 22%,#000 46%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 22%,#000 46%)}
html[data-theme="dark"] .footer::after{content:"";position:absolute;inset:0;z-index:1;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(11,7,4,0) 0,rgba(11,7,4,.55) 40%,rgba(9,6,3,.86) 100%)}
html[data-theme="light"] .footer::before{opacity:.30}

/* ---------- D. fused separator (overlaps + fades both sides) ---------- */
.branch-sep{position:relative;z-index:3;pointer-events:none;
  display:flex;justify-content:center;align-items:center;
  margin-block:clamp(-120px,-8vw,-58px);
  isolation:isolate}
.branch-sep img{width:min(1500px,104vw);max-width:none;height:auto;display:block;
  /* melt the artwork into the sections above and below */
  -webkit-mask-image:
    linear-gradient(180deg,transparent 0,#000 26%,#000 74%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 12%,#000 88%,transparent 100%);
  mask-image:
    linear-gradient(180deg,transparent 0,#000 26%,#000 74%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 12%,#000 88%,transparent 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect;
  filter:drop-shadow(0 22px 34px rgba(0,0,0,.55));
  opacity:.96}
html[data-theme="light"] .branch-sep img{filter:drop-shadow(0 22px 30px rgba(70,45,22,.3))}
/* soft light pooling behind the branch so it reads as a seam, not a sticker */
.branch-sep::before{content:"";position:absolute;z-index:-1;
  width:min(1200px,92vw);height:62%;border-radius:50%;
  background:radial-gradient(60% 50% at 50% 50%,rgba(211,166,112,.10),transparent 70%);
  filter:blur(26px)}
.branch-sep::after{display:none}
/* the sections it joins get feathered edges to complete the blend */
.branch-sep+section,.branch-sep+.section{position:relative;z-index:1}

/* ---------- E. hero statue (replaces the in-hero video) ---------- */
.hero-statue{position:relative;display:flex;justify-content:center;align-items:flex-end}
.hero-statue img{width:min(460px,90%);height:auto;position:relative;z-index:1;
  filter:drop-shadow(0 42px 54px rgba(0,0,0,.6));
  animation:statueFloat 8s ease-in-out infinite;
  transition:transform .7s cubic-bezier(.2,.7,.3,1)}
.hero-statue:hover img{transform:translateY(-6px) scale(1.02)}
.hs-glow{position:absolute;inset:8% 6% 2%;z-index:0;border-radius:50%;
  background:radial-gradient(55% 45% at 50% 55%,rgba(211,166,112,.20),transparent 72%);
  filter:blur(34px)}
@media (prefers-reduced-motion:reduce){.hero-statue img{animation:none}}

/* ---------- F. section figures share the fused look ---------- */
.statue-fig img{filter:drop-shadow(0 34px 44px rgba(0,0,0,.55))}

/* ---------- G. shop: weight variants + centered last row ---------- */
.weights{display:flex;gap:.4rem;margin-top:.7rem;flex-wrap:wrap;justify-content:center}
.wv{flex:1 1 auto;min-width:64px;padding:.42em .5em;border-radius:9px;cursor:pointer;
  font-family:inherit;font-size:.78rem;font-weight:600;line-height:1.2;
  color:var(--muted);background:transparent;border:1px solid var(--line);
  transition:color .25s var(--ease),background .25s var(--ease),
             border-color .25s var(--ease),transform .18s var(--ease)}
.wv:hover{color:var(--text);border-color:var(--line-strong)}
.wv:active{transform:scale(.96)}
.wv.active{color:#1d1207;background:var(--accent);border-color:var(--accent);
  box-shadow:0 6px 16px -8px rgba(165,121,63,.7)}
html[data-theme="light"] .wv.active{color:#f7edda}
.p-val{font-variant-numeric:tabular-nums;display:inline-block}
.p-val.bump{animation:priceBump .42s cubic-bezier(.3,1.4,.4,1)}
@keyframes priceBump{0%{transform:scale(1)}40%{transform:scale(1.13);color:var(--accent-soft)}100%{transform:scale(1)}}
.product-card .price-row{flex-wrap:wrap;justify-content:center;gap:.7rem}

/* last-row centering: flex grid with fixed-basis cards */
.product-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:1.2rem}
.product-grid>.product-card{flex:0 1 calc(25% - .9rem);min-width:0}
@media (max-width:1100px){.product-grid>.product-card{flex-basis:calc(33.333% - .8rem)}}
@media (max-width:860px){.product-grid>.product-card{flex-basis:calc(50% - .6rem)}}
@media (max-width:520px){
  .product-grid{gap:1rem}
  .product-grid>.product-card{flex-basis:100%;max-width:340px}
  .weights{gap:.35rem}
  .wv{font-size:0.78rem;padding:.4em .35em;min-width:56px}
}

/* =========================================================
   H. COFFEE KNOWLEDGE page
   ========================================================= */
.kn-hero{position:relative;padding-block:calc(var(--nav-h) + 84px) clamp(40px,7vh,80px)}
.kn-hero .page-title{margin-block:.2rem .3rem}
.kn-stats{display:flex;gap:clamp(1.4rem,4vw,3rem);margin-top:2rem;flex-wrap:wrap}
.kn-stats div{display:flex;flex-direction:column;gap:.15rem}
.kn-stats b{font-size:1.7rem;font-weight:800;line-height:1;color:var(--text);
  font-variant-numeric:tabular-nums}
.kn-stats span{font-size:0.82rem;color:var(--muted)}

.kn-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1.4rem;
  flex-wrap:wrap;margin-bottom:2.2rem}
.kn-filters{gap:.5rem}

.kn-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.3rem}
.kn-card{position:relative;display:flex;flex-direction:column;cursor:pointer;
  border:1px solid var(--line);border-radius:18px;overflow:hidden;
  background:linear-gradient(168deg,var(--panel),var(--bg-2));
  contain:layout paint;
  transition:transform .5s var(--ease),border-color .45s var(--ease),box-shadow .5s var(--ease)}
.kn-card:hover,.kn-card:focus-visible{transform:translateY(-7px);border-color:var(--accent);
  box-shadow:0 28px 52px -30px rgba(0,0,0,.7)}
.kn-ph{position:relative;aspect-ratio:16/11;overflow:hidden;background:var(--green-deep)}
.kn-ph img{width:100%;height:100%;object-fit:cover;
  transition:transform .75s var(--ease),filter .5s var(--ease);
  filter:saturate(.92) brightness(.86)}
.kn-card:hover .kn-ph img{transform:scale(1.07);filter:saturate(1.02) brightness(1)}
.kn-ph::after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 45%,rgba(10,7,4,.82));opacity:.9}
.kn-tag{position:absolute;inset-block-start:-2.1rem;inset-inline-start:0;z-index:2;
  font-size:0.78rem;letter-spacing:.14em;padding:.3em .8em;border-radius:999px;
  color:#f0e0c6;background:rgba(20,14,8,.72);border:1px solid rgba(233,214,183,.26);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.kn-body{position:relative;padding:1.15rem 1.15rem 1.25rem;display:flex;
  flex-direction:column;gap:.45rem;flex:1}
.kn-body h3{font-size:1.05rem;font-weight:800;line-height:1.55}
.kn-body p{color:var(--muted);font-size:0.82rem;line-height:1.75;flex:1}
.kn-more{display:inline-flex;align-items:center;gap:.4em;margin-top:.3rem;
  color:var(--accent-soft);font-size:0.82rem;font-weight:600;
  transition:gap .3s var(--ease)}
.kn-more svg{width:1em;height:1em}
.kn-card:hover .kn-more{gap:.75em}
.kn-hidden{display:none}

/* modal extras */
#knModal .am-body .kn-list{list-style:none;margin:.4rem 0 1.1rem;padding:0;
  display:flex;flex-direction:column;gap:.55rem}
#knModal .am-body .kn-list li{color:var(--muted);line-height:1.8;font-size:0.95rem;
  padding-inline-start:1.1rem;position:relative}
#knModal .am-body .kn-list li::before{content:"";position:absolute;inset-inline-start:0;top:.75em;
  width:6px;height:6px;border-radius:50%;background:var(--accent)}
#knModal .am-body .kn-list b{color:var(--text);font-weight:700}
#knModal .am-body .kn-note{margin-top:.6rem;padding:.85rem 1.1rem;border-radius:12px;
  background:var(--green-deep);border:1px solid var(--line);
  color:var(--sage);font-size:0.88rem;line-height:1.8}

/* ratio calculator */
.calc-card{display:grid;grid-template-columns:1fr 1fr;gap:clamp(1.5rem,4vw,3rem);
  align-items:center;padding:clamp(1.5rem,4vw,2.6rem);border-radius:22px;
  border:1px solid var(--line);background:linear-gradient(165deg,var(--panel),var(--bg-2));
  box-shadow:0 30px 60px -40px rgba(0,0,0,.65)}
.calc-tool{display:flex;flex-direction:column;gap:1rem}
.calc-row{display:flex;flex-direction:column;gap:.45rem}
.calc-row label{font-size:0.82rem;color:var(--muted)}
.calc-row select{padding:.8em 1em;border-radius:12px;font-family:inherit;font-size:.95rem;
  color:var(--text);background:var(--bg-2);border:1px solid var(--line);cursor:pointer;
  transition:border-color .3s var(--ease)}
.calc-row select:focus{outline:none;border-color:var(--accent)}
.calc-stepper{display:flex;align-items:center;gap:.5rem}
.calc-stepper button{width:42px;height:42px;border-radius:11px;font-size:1.15rem;font-weight:800;
  color:#1d1207;background:var(--accent);cursor:pointer;flex:0 0 auto;
  transition:background .25s var(--ease),transform .15s var(--ease)}
html[data-theme="light"] .calc-stepper button{color:#f7edda}
.calc-stepper button:hover{background:var(--accent-soft)}
.calc-stepper button:active{transform:scale(.93)}
.calc-stepper input{flex:1;min-width:0;padding:.75em 1em;border-radius:12px;text-align:center;
  font-family:inherit;font-size:1.05rem;font-weight:700;font-variant-numeric:tabular-nums;
  color:var(--text);background:var(--bg-2);border:1px solid var(--line)}
.calc-stepper input:focus{outline:none;border-color:var(--accent)}
.calc-out{display:grid;grid-template-columns:repeat(4,1fr);gap:.6rem;margin-top:.4rem}
.calc-out div{display:flex;flex-direction:column;gap:.2rem;align-items:center;
  padding:.8rem .5rem;border-radius:12px;background:var(--green-deep);border:1px solid var(--line)}
.calc-out span{font-size:0.78rem;color:var(--muted)}
.calc-out b{font-size:1rem;font-weight:800;color:var(--text);text-align:center;
  font-variant-numeric:tabular-nums}
.calc-out b.bump{animation:priceBump .45s cubic-bezier(.3,1.4,.4,1)}

/* responsive */
@media (max-width:1100px){.kn-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:860px){
  .kn-grid{grid-template-columns:repeat(2,1fr)}
  .calc-card{grid-template-columns:1fr}
}
@media (max-width:560px){
  .kn-grid{grid-template-columns:1fr;gap:1.1rem}
  .kn-stats{gap:1.3rem}
  .kn-stats b{font-size:1.3rem}
  .calc-out{grid-template-columns:repeat(2,1fr)}
  .kn-head{gap:1rem}
}

/* =========================================================
   V2.2 — FILM HERO (auto-plays once → text over final frame)
   ========================================================= */
.fhero{position:relative;height:100svh;min-height:540px;overflow:hidden;
  background:#0b0703;isolation:isolate}
/* --fh-shift: how far the frame slides aside to clear the panel. Tune here.
   It is balanced against the panel width below: shift + panel must leave the
   cup, the pot and both hands inside the uncovered strip. */
.fhero{--fh-shift:13vw}
.fh-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;
  transform:translate3d(0,0,0);
  transition:transform 1.05s cubic-bezier(.16,.84,.28,1)}
/* the frame slides left in step with the panel, so the hands and cup stay visible.
   The gap it opens on the right is always narrower than the panel that covers it. */
.fhero.done .fh-video{transform:translate3d(calc(-1 * var(--fh-shift)),0,0)}
.fhero.instant .fh-video{transition-duration:.35s}

/* ---- loading state: black card + brand mark until the film can play ---- */
.fh-loader{position:absolute;inset:0;z-index:4;background:#0b0703;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.35rem;
  transition:opacity .55s ease;pointer-events:none}
.fh-loader-mark{width:min(200px,42vw);height:auto;opacity:.9;
  animation:fhBreathe 2.6s ease-in-out infinite}
@keyframes fhBreathe{0%,100%{opacity:.55}50%{opacity:.95}}
.fh-loader-track{position:relative;width:min(190px,44vw);height:2px;overflow:hidden;
  border-radius:2px;background:rgba(233,214,183,.15)}
.fh-loader-track i{position:absolute;inset-block:0;inset-inline-start:0;width:42%;
  background:linear-gradient(90deg,transparent,#e8c79b,#a5793f,transparent);
  animation:fhSweep 1.35s cubic-bezier(.55,0,.45,1) infinite}
@keyframes fhSweep{0%{transform:translateX(-115%)}100%{transform:translateX(285%)}}
.fh-loader-txt{font-size:.82rem;letter-spacing:.04em;color:rgba(233,214,183,.62)}
.fh-loader.is-hidden{opacity:0}
.fh-loader.is-gone{display:none}
.fhero.instant .fh-loader{display:none}
/* cinematic shade — fades in exactly when the film ends */
.fh-shade{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;
  background:
    radial-gradient(120% 90% at 50% 38%,transparent 38%,rgba(8,5,3,.5) 80%,rgba(8,5,3,.85) 100%),
    linear-gradient(180deg,rgba(9,6,3,.38) 0%,rgba(9,6,3,.16) 36%,rgba(8,5,3,.82) 100%);
  transition:opacity 1.15s cubic-bezier(.4,0,.2,1)}
.fhero.done .fh-shade{opacity:1}

/* ---- page is frozen while the film plays (no scrolling past the intro) ---- */
html.film-lock,html.film-lock body{overflow:hidden;height:100%;overscroll-behavior:none}

/* ---- content panel: slides in beside the film once it ends ---- */
.fh-content{position:absolute;inset:0;z-index:2;display:flex;align-items:stretch;
  justify-content:flex-start;pointer-events:none}
.fhero.done .fh-content{pointer-events:auto}

.fh-panel{position:relative;display:flex;align-items:center;
  width:clamp(340px,38vw,560px);max-width:100%;
  padding:calc(var(--nav-h) + 2.2rem) clamp(1.6rem,3.4vw,3.4rem) 2.6rem;
  background:linear-gradient(to left,rgba(10,6,3,.94) 0%,rgba(12,8,4,.88) 62%,rgba(14,9,5,.66) 100%);
  -webkit-backdrop-filter:blur(14px) saturate(.9);backdrop-filter:blur(14px) saturate(.9);
  transform:translateX(101%);opacity:0;
  transition:transform 1.05s cubic-bezier(.16,.84,.28,1),opacity .5s ease;
  will-change:transform}
/* the thin brass edge that draws the panel in */
.fh-panel::before{content:"";position:absolute;inset-block:0;inset-inline-end:100%;
  width:3px;background:linear-gradient(180deg,transparent,#e8c79b 22%,#a5793f 78%,transparent);
  box-shadow:0 0 18px rgba(232,199,155,.45);
  transform:scaleY(0);transform-origin:50% 0;
  transition:transform .55s cubic-bezier(.16,.84,.28,1)}
.fhero.done .fh-panel{transform:translateX(0);opacity:1}
.fhero.done .fh-panel::before{transform:scaleY(1);transition-delay:.15s}
.fhero.instant .fh-panel{transition-duration:.35s}
.fhero.instant .fh-panel::before{transition-duration:.2s;transition-delay:0s}

.fh-panel-inner{width:100%}
.fh-panel-inner>*{opacity:0;transform:translateY(20px);filter:blur(6px);
  transition:opacity .7s var(--ease),transform .7s var(--ease),filter .7s var(--ease);
  transition-delay:calc(.55s + var(--i,0)*110ms);will-change:transform,opacity}
.fhero.done .fh-panel-inner>*{opacity:1;transform:none;filter:blur(0)}
.fhero.instant .fh-panel-inner>*{transition-duration:.35s;transition-delay:calc(var(--i,0)*45ms)}
.fh-content .eyebrow{color:#e8c79b}
.fh-content .eyebrow::before{background:#c99c66}
.fh-logo{width:min(290px,58vw);height:auto;margin-block:.5rem 1.1rem;
  filter:drop-shadow(0 4px 18px rgba(0,0,0,.55))}
.fh-tagline{font-size:clamp(1.45rem,2.7vw,2.15rem);font-weight:800;color:#f5ecdc;
  line-height:1.5;margin-bottom:.9rem;text-shadow:0 2px 18px rgba(0,0,0,.55)}
.fh-lead{color:#e6d8c0;max-width:52ch;font-size:clamp(.95rem,1.25vw,1.12rem);
  line-height:2;margin-bottom:1.7rem;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.fhero .hero-actions{display:flex;gap:1rem;flex-wrap:wrap}
.fhero .btn-ghost{color:#f0e6d6;border-color:rgba(240,230,214,.42);
  background:rgba(20,14,9,.35);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.fhero .btn-ghost:hover{border-color:#e8c79b;color:#e8c79b}
.fh-stats{display:flex;gap:clamp(1.4rem,4vw,2.6rem);margin-top:2.1rem}
.fh-stats div{display:flex;flex-direction:column;gap:.15rem}
.fh-stats b{font-size:1.5rem;font-weight:800;color:#f0e4cf;line-height:1.2}
.fh-stats span{font-size:0.82rem;color:#c9b797}

/* film chrome — loading ring + progress line, both gone once the text arrives */
/* bottom of the frame, horizontally centred. The box is auto-height so the ring
   and its scrim stay concentric in the same grid cell. */
.fh-load{position:absolute;z-index:3;inset-inline:0;
  inset-block-end:clamp(26px,4.5vh,56px);
  display:grid;place-items:center;
  pointer-events:none;transition:opacity .5s ease}
.fh-load-ring{grid-area:1/1;place-self:center;
  width:clamp(48px,4.6vw,66px);height:auto;transform:rotate(-90deg);overflow:visible}
.fh-load-ring circle{fill:none;stroke-width:2.4;stroke-linecap:round}
.fl-track{stroke:rgba(233,214,183,.26)}
/* free-running sweep: reads as "loading" even before the first frame decodes */
.fl-spin{stroke:rgba(232,199,155,.5);stroke-dasharray:14 83;
  transform-origin:50% 50%;animation:flSpin 1.15s linear infinite}
@keyframes flSpin{to{transform:rotate(360deg)}}
/* determinate arc: how much of the film is left before the text lands */
.fl-fill{stroke:#e8c79b;stroke-dasharray:97.4;stroke-dashoffset:97.4;
  filter:drop-shadow(0 0 6px rgba(232,199,155,.45));
  transition:stroke-dashoffset .18s linear}
.fh-bar{position:absolute;inset-block-end:0;inset-inline:0;height:2px;z-index:3;
  background:rgba(233,214,183,.14);transition:opacity .5s}
.fh-bar i{display:block;height:100%;width:0;
  background:linear-gradient(90deg,#a5793f,#e8c79b)}
.fhero.done .fh-load,.fhero.done .fh-bar{opacity:0}

/* scroll cue — appears with the text */
.fh-cue{position:absolute;inset-inline:0;bottom:20px;z-index:3;
  display:flex;flex-direction:column;align-items:center;gap:.55rem;
  color:#efe3cc;font-size:clamp(.92rem,2.4vw,1.05rem);font-weight:600;letter-spacing:.03em;
  text-shadow:0 1px 12px rgba(0,0,0,.65);
  opacity:0;transition:opacity .9s ease 1.7s;pointer-events:none}
.fhero.done .fh-cue{opacity:1}
.fc-line{width:2px;height:44px;border-radius:2px;overflow:hidden;position:relative;
  background:rgba(233,214,183,.22)}
.fc-line::after{content:"";position:absolute;inset-inline:0;top:0;height:45%;
  background:#e8c79b;animation:fcDrop 2s var(--ease) infinite}
@keyframes fcDrop{0%{transform:translateY(-100%)}70%,100%{transform:translateY(240%)}}

/* ---- header stays legible while it sits over the film ---- */
body[data-page="home"] .nav:not(.scrolled){background:none;border-bottom-color:transparent;z-index:60}
/* scrim spills below the bar so it fades out instead of cutting off */
body[data-page="home"] .nav:not(.scrolled)::before{content:"";position:absolute;
  inset-block-start:0;inset-inline:0;height:220%;pointer-events:none;z-index:-1;
  background:linear-gradient(180deg,rgba(8,5,3,.78) 0%,rgba(8,5,3,.5) 34%,rgba(8,5,3,.2) 66%,transparent 100%)}
body[data-page="home"] .nav:not(.scrolled) .nav-links a{color:rgba(243,234,219,.82)}
body[data-page="home"] .nav:not(.scrolled) .nav-links a:hover,
body[data-page="home"] .nav:not(.scrolled) .nav-links a.active{color:#fff}
body[data-page="home"] .nav:not(.scrolled) .icon-btn{color:#f3ead9;border-color:rgba(243,234,219,.28)}
body[data-page="home"] .nav:not(.scrolled) .icon-btn:hover{border-color:#e8c79b;color:#fff}
body[data-page="home"] .nav:not(.scrolled) .burger span{background:#f3ead9}
body[data-page="home"] .nav:not(.scrolled) .brand img,
body[data-page="home"] .nav:not(.scrolled) .brand svg{filter:drop-shadow(0 2px 10px rgba(0,0,0,.6))}

@media (max-width:900px){
  /* Portrait crops the 16:9 frame down to a narrow slice, so sliding it sideways
     can't save the composition. On the hold frame we show the whole frame instead,
     letterboxed above the band — both hands and the cup stay in view. */
  .fhero{--fh-shift:0px}
  /* a length (not a %) pins the letterboxed frame just under the header whatever
     the phone's height is — a % re-centres it and drops the frame behind the band */
  .fhero.done .fh-video{object-fit:contain;
    object-position:center calc(var(--nav-h) + 14px);transform:none}
  .fh-content{align-items:flex-end}
  .fh-panel{width:100%;align-items:flex-end;
    padding:clamp(1.6rem,5vw,2.4rem) clamp(1.2rem,5vw,2rem) clamp(3.4rem,8vh,4.6rem);
    background:linear-gradient(to top,rgba(10,6,3,.95) 0%,rgba(11,7,4,.88) 58%,rgba(12,8,4,.42) 100%);
    transform:translateY(101%)}
  .fh-panel::before{inset-block:auto 100%;inset-inline:0;width:auto;height:3px;
    background:linear-gradient(90deg,transparent,#e8c79b 22%,#a5793f 78%,transparent);
    transform:scaleX(0);transform-origin:100% 50%}
  .fhero.done .fh-panel{transform:translateY(0)}
  .fhero.done .fh-panel::before{transform:scaleX(1)}
  /* the band already carries the eye down — drop the tall cue line */
  .fh-cue .fc-line{display:none}
  .fh-cue{bottom:14px}
}
/* The band under the hero that only phones use — see .fh-below below. */
.fh-below{display:none}

@media (max-width:720px){
  .fhero{min-height:100svh}
  .fh-logo{width:min(230px,62vw)}
  .fh-lead{font-size:0.95rem;line-height:1.95}
  .fh-stats{gap:1.3rem;margin-top:1.7rem}
  .fh-stats b{font-size:1.3rem}
  .fh-load-ring{width:clamp(42px,11vw,54px)}
  .fh-cue{bottom:16px}
  .fhero .hero-actions .btn{padding:.85em 1.5em}

  /* ---------------------------------------------------------------------
     Give the film back the screen.

     On a phone the panel had grown to two thirds of the viewport and the
     letterboxed frame was reduced to a strip under the header — the motion
     the whole hero exists for was the first thing to go. The paragraph and
     the stats are the two blocks that carry no identity, so they leave the
     overlay and reappear directly underneath it, where a phone reads them
     just as well while scrolling.

     What stays over the film is what has to be seen at once: the eyebrow,
     the mark, the sentence and the two buttons.
     --------------------------------------------------------------------- */
  .fh-panel .fh-lead,
  .fh-panel .fh-stats{display:none}
  .fh-panel{padding-top:clamp(1.2rem,4vw,1.8rem)}

  /* The frame was pinned just under the header because the panel used to fill
     everything below it. With the panel down to about 45svh that left a slab of
     empty black between the two, so the frame now sits centred in the space it
     actually has — dark above and below in equal measure, which reads as a
     cinema frame rather than a gap.

     The box is given the film's own height instead of the hero's and then
     placed: stretching it edge to edge and steering with object-position means
     the visible frame moves only as far as the leftover space allows, which is
     not a position you can reason about. A box that is exactly the frame is. */
  .fhero.done .fh-video{height:auto;inset-block:auto;top:clamp(84px,18svh,180px);
    object-fit:contain;object-position:center}
  /* the panel no longer needs to reach for the middle of the screen */
  .fh-panel-inner .fh-tagline{margin-bottom:1.4rem}

  .fh-below{display:block;position:relative;z-index:2;
    padding-block:clamp(1.8rem,6vw,2.6rem) clamp(1.4rem,5vw,2rem);
    background:linear-gradient(180deg,#0b0703 0%,var(--bg) 100%)}
  .fh-below .fh-lead{margin:0 auto;max-width:46ch;text-align:center;
    /* the reveal animation belongs to the panel; this copy is plain text */
    opacity:1;transform:none;filter:none}
  .fh-below .fh-stats{justify-content:space-between;margin-top:1.6rem;
    padding-top:1.4rem;border-top:1px solid rgba(233,214,183,.14);
    opacity:1;transform:none;filter:none}
  .fh-below .fh-stats div{align-items:center;text-align:center;flex:1}
}
@media (prefers-reduced-motion:reduce){
  .fh-shade,.fh-panel,.fh-panel::before,.fh-panel-inner>*,.fh-video{transition:none}
  .fc-line::after{animation:none}
}

/* overflow guard — the 104vw separator bleed must never widen the page */
html,body{overflow-x:clip}
.branch-sep{width:100%;overflow:hidden}

/* =========================================================
   V2.3 — refinements round
   ========================================================= */

/* A) map section uses the normal site background */
#origins::before,#origins::after{display:none}

/* B) separators: larger + hugging the sections (cover statue feet) */
.branch-sep{margin-block:clamp(-190px,-13vw,-95px)}
.branch-sep img{width:min(1750px,115vw);
  -webkit-mask-image:
    linear-gradient(180deg,transparent 0,#000 18%,#000 82%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 10%,#000 90%,transparent 100%);
  mask-image:
    linear-gradient(180deg,transparent 0,#000 18%,#000 82%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 10%,#000 90%,transparent 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect}
@media (max-width:720px){
  .branch-sep{margin-block:clamp(-110px,-14vw,-56px)}
  .branch-sep img{width:150vw}
}

/* C) light mode wears the painted sky like dark wears the night */
html[data-theme="light"] body{
  background-color:#e9e1d2;
  background-image:url("../assets/bg-sky.webp");
  background-size:cover;background-position:center top;background-repeat:no-repeat}
@media (min-width:900px) and (hover:hover){
  html[data-theme="light"] body{background-attachment:fixed}
}
html[data-theme="light"] body::before{
  background:linear-gradient(180deg,rgba(238,229,212,.40) 0%,rgba(236,226,208,.26) 45%,rgba(233,222,201,.5) 100%)}
html[data-theme="light"] .footer::before{opacity:.85;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 20%,#000 44%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 20%,#000 44%)}
html[data-theme="light"] .footer::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(236,229,215,.35) 0,rgba(238,231,218,.12) 40%,rgba(233,222,201,.25) 100%);
  -webkit-mask-image:none;mask-image:none}

/* D) product-page weight selector (bigger pills than shop) */
.pd-weights{display:flex;flex-direction:column;gap:.55rem;margin-block:1.1rem .3rem}
.pd-weights .lbl{font-size:0.88rem;color:var(--muted)}
.pd-weights .weights{display:flex;gap:.55rem}
.pd-weights .wv{flex:1;padding:.8em .4em;border-radius:12px;font-size:.95rem;font-weight:700;
  font-family:inherit;color:var(--muted);background:var(--bg-2);border:1px solid var(--line);
  cursor:pointer;transition:all .3s var(--ease)}
.pd-weights .wv small{display:block;font-size:0.78rem;font-weight:500;margin-top:.15rem;opacity:.75}
.pd-weights .wv:hover{border-color:var(--accent);color:var(--text)}
.pd-weights .wv.active{background:var(--accent);color:#1d1207;border-color:var(--accent);
  box-shadow:0 10px 22px -12px rgba(165,121,63,.7);transform:translateY(-2px)}
html[data-theme="light"] .pd-weights .wv.active{color:#f7edda}
.pd-info .price.bump{animation:priceBump .45s cubic-bezier(.3,1.4,.4,1)}

/* =========================================================
   E) BREW LAB — rebuilt calculator (premium, animated)
   ========================================================= */
.lab-card{position:relative;border-radius:26px;overflow:hidden;isolation:isolate;
  background:linear-gradient(160deg,rgba(42,30,18,.92),rgba(24,17,10,.94));
  border:1px solid rgba(233,214,183,.16);
  box-shadow:0 46px 90px -50px rgba(0,0,0,.85);
  padding:clamp(1.6rem,4vw,3rem)}
html[data-theme="light"] .lab-card{
  background:linear-gradient(160deg,rgba(252,247,238,.94),rgba(240,232,218,.96));
  border-color:rgba(84,58,36,.2);box-shadow:0 40px 80px -48px rgba(70,45,22,.5)}
/* aurora glow drifting behind the tool */
.lab-card::before{content:"";position:absolute;inset:-40%;z-index:-1;opacity:.5;
  background:
    radial-gradient(38% 30% at 25% 30%,rgba(211,166,112,.22),transparent 70%),
    radial-gradient(30% 26% at 75% 70%,rgba(165,121,63,.18),transparent 70%);
  animation:labAurora 14s ease-in-out infinite alternate}
@keyframes labAurora{from{transform:translate3d(-3%,-2%,0) rotate(0deg)}to{transform:translate3d(3%,2%,0) rotate(4deg)}}
@media (prefers-reduced-motion:reduce){.lab-card::before{animation:none}}

.lab-head{text-align:center;max-width:640px;margin:0 auto clamp(1.6rem,3vw,2.4rem)}
.lab-head .eyebrow{justify-content:center}
.lab-head p{color:var(--muted);font-size:1rem;line-height:1.9}

/* method picker — icon tiles */
.lab-methods{display:grid;grid-template-columns:repeat(6,1fr);gap:.6rem;margin-bottom:1.6rem}
.lm{position:relative;display:flex;flex-direction:column;align-items:center;gap:.45rem;
  padding:.95rem .4rem .8rem;border-radius:16px;cursor:pointer;font-family:inherit;
  color:var(--muted);background:rgba(255,255,255,.03);border:1px solid rgba(233,214,183,.12);
  transition:color .3s var(--ease),background .35s var(--ease),border-color .35s var(--ease),transform .35s var(--ease)}
html[data-theme="light"] .lm{background:rgba(84,58,36,.05);border-color:rgba(84,58,36,.14)}
.lm svg{width:30px;height:30px;stroke-width:1.5;transition:transform .35s var(--ease)}
.lm b{font-size:.82rem;font-weight:700}
.lm small{font-size:0.78rem;opacity:.75;font-variant-numeric:tabular-nums}
.lm:hover{color:var(--text);transform:translateY(-3px)}
.lm:hover svg{transform:scale(1.12)}
.lm.active{color:#f4e7d0;background:linear-gradient(160deg,rgba(165,121,63,.35),rgba(122,84,48,.25));
  border-color:#c99c66;transform:translateY(-3px);
  box-shadow:0 16px 30px -16px rgba(165,121,63,.55)}
html[data-theme="light"] .lm.active{color:#4a3115;background:linear-gradient(160deg,rgba(211,166,112,.4),rgba(233,214,183,.5))}
.lm.active svg{transform:scale(1.12)}
.lm .ping{position:absolute;inset:0;border-radius:16px;pointer-events:none;opacity:0;
  border:1.5px solid #e8c79b}
.lm.active .ping{animation:lmPing .6s var(--ease)}
@keyframes lmPing{0%{opacity:.9;transform:scale(.94)}100%{opacity:0;transform:scale(1.1)}}

/* dose dial row */
.lab-dose{display:flex;align-items:center;justify-content:center;gap:1.1rem;margin-bottom:1.7rem;flex-wrap:wrap}
.lab-dose .lbl{font-size:0.88rem;color:var(--muted)}
.dose-dial{display:flex;align-items:center;gap:.7rem}
.dose-dial button{width:46px;height:46px;border-radius:50%;font-size:1.3rem;font-weight:800;
  color:#1d1207;background:var(--accent);cursor:pointer;font-family:inherit;border:0;
  transition:background .25s,transform .18s var(--ease);box-shadow:0 10px 20px -10px rgba(165,121,63,.6)}
html[data-theme="light"] .dose-dial button{color:#f7edda}
.dose-dial button:hover{background:var(--accent-soft)}
.dose-dial button:active{transform:scale(.9)}
.dose-num{position:relative;min-width:120px;text-align:center;padding:.55rem 1rem;border-radius:16px;
  background:rgba(255,255,255,.04);border:1px solid rgba(233,214,183,.16)}
html[data-theme="light"] .dose-num{background:rgba(84,58,36,.06);border-color:rgba(84,58,36,.16)}
.dose-num b{font-size:1.9rem;font-weight:800;font-variant-numeric:tabular-nums;color:var(--text);line-height:1.1}
.dose-num span{display:block;font-size:0.78rem;color:var(--muted)}

/* ratio visual — coffee : water bar */
.lab-ratio{display:flex;align-items:center;gap:.8rem;max-width:560px;margin:0 auto 1.7rem}
.lab-ratio .cap{font-size:0.78rem;color:var(--muted);white-space:nowrap}
.ratio-bar{flex:1;height:14px;border-radius:999px;overflow:hidden;display:flex;
  border:1px solid rgba(233,214,183,.18);background:rgba(255,255,255,.05)}
html[data-theme="light"] .ratio-bar{border-color:rgba(84,58,36,.18);background:rgba(84,58,36,.06)}
.ratio-bar .rc{background:linear-gradient(90deg,#6b4423,#4a2f16);width:20%;
  transition:width .7s cubic-bezier(.3,1,.4,1)}
.ratio-bar .rw{background:linear-gradient(90deg,rgba(148,183,205,.85),rgba(108,143,167,.85));flex:1}
.lab-ratio b{font-size:0.88rem;color:var(--accent-soft);font-variant-numeric:tabular-nums;white-space:nowrap}

/* results — medallion stats */
.lab-out{display:grid;grid-template-columns:repeat(4,1fr);gap:.8rem}
.lo{position:relative;display:flex;flex-direction:column;align-items:center;gap:.3rem;
  padding:1.05rem .6rem .95rem;border-radius:18px;text-align:center;overflow:hidden;
  background:rgba(255,255,255,.035);border:1px solid rgba(233,214,183,.14);
  transition:transform .35s var(--ease),border-color .35s var(--ease)}
html[data-theme="light"] .lo{background:rgba(84,58,36,.05);border-color:rgba(84,58,36,.15)}
.lo:hover{transform:translateY(-4px);border-color:#c99c66}
.lo svg{width:22px;height:22px;color:var(--accent-soft);stroke-width:1.6}
.lo span{font-size:0.78rem;color:var(--muted)}
.lo b{font-size:clamp(1.02rem,1.5vw,1.22rem);font-weight:800;color:var(--text);
  font-variant-numeric:tabular-nums}
.lo b.bump{animation:priceBump .5s cubic-bezier(.3,1.4,.4,1)}
.lo::after{content:"";position:absolute;inset-inline:18%;bottom:0;height:2px;border-radius:2px;
  background:linear-gradient(90deg,transparent,#c99c66,transparent);opacity:0;transition:opacity .35s}
.lo:hover::after{opacity:1}

/* knowledge hero polish */
.kn-hero .page-title{
  background:linear-gradient(120deg,var(--text) 30%,#c99c66 55%,var(--text) 75%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  background-size:220% 100%;animation:knShimmer 7s ease-in-out infinite}
@keyframes knShimmer{0%,100%{background-position:0% 0}50%{background-position:100% 0}}
@media (prefers-reduced-motion:reduce){.kn-hero .page-title{animation:none}}
.kn-hero .lead{max-width:62ch}
.kn-stats{display:flex;gap:clamp(1rem,3vw,1.6rem)}
.kn-stats>div{position:relative;display:flex;flex-direction:column;align-items:center;gap:.2rem;
  padding:1rem 1.5rem;border-radius:16px;background:var(--panel);border:1px solid var(--line);
  box-shadow:0 18px 36px -24px rgba(0,0,0,.5)}
.kn-stats b{font-size:1.7rem;font-weight:800;color:var(--accent-soft);line-height:1.1}
.kn-stats span{font-size:.78rem;color:var(--muted)}

@media (max-width:860px){
  .lab-methods{grid-template-columns:repeat(3,1fr)}
  .lab-out{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:400px){
  .lab-methods{grid-template-columns:repeat(2,1fr)}
}

/* =========================================================
   V2.4 — QA round 2
   A) backgrounds on a fixed viewport layer → never zoomed
   B) dark: night bg + clearly visible painted footer
   C) light: painted footer + long clean fade
   D) separators truly hug & cover each section's bottom
   E) mobile optimization pass (standards)
   ========================================================= */

/* ---- A. no-zoom backgrounds ----
   cover was being computed against the FULL document height
   (background-attachment:fixed is ignored on mobile), which
   blew the painting up several times its pixels. The artwork
   now lives on a viewport-sized fixed layer: cover ≈ 1:1. */
body,
html[data-theme="dark"] body,
html[data-theme="light"] body{
  background-image:none;background-color:transparent;background-attachment:scroll}
html{background-color:#14100a}
html[data-theme="light"]{background-color:#e9e1d2}
html::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background-position:center top;background-size:cover;background-repeat:no-repeat}
html[data-theme="dark"]::before{background-image:url("../assets/bg-night.webp")}
html[data-theme="light"]::before{background-image:url("../assets/bg-sky.webp")}

/* ---- B. dark: bg-night on the body ↑ + the night footer painting,
        actually visible (the old brightness(.45) + heavy shade buried it) ---- */
.footer{padding-block:clamp(220px,28vh,340px) 36px}
html[data-theme="dark"] .footer::before{
  opacity:1;filter:brightness(.94) saturate(1);
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 18%,#000 44%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 18%,#000 44%)}
html[data-theme="dark"] .footer::after{
  background:linear-gradient(180deg,transparent 0,rgba(13,9,5,.14) 60%,rgba(11,7,4,.4) 100%)}

/* ---- C. light: its own painted footer + one long soft ramp ---- */
html[data-theme="light"] .footer::before{
  background:url("../assets/bg-footer.webp") center bottom / cover no-repeat;
  opacity:1;filter:none;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.3) 18%,rgba(0,0,0,.75) 42%,#000 60%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.3) 18%,rgba(0,0,0,.75) 42%,#000 60%)}
html[data-theme="light"] .footer::after{
  background:linear-gradient(180deg,rgba(238,229,213,.4) 0,rgba(238,229,213,0) 36%,rgba(236,227,210,.14) 100%)}

/* ---- D. separators: pulled hard onto the sections ----
   top overlap is the big one (covers the statue feet / card
   bottoms of the section ABOVE); bottom overlap milder so the
   next section's heading stays clear. Mask opened to 9 % so the
   cluster reads solid where it covers. */
.branch-sep{margin-top:clamp(-330px,-23vw,-160px);margin-bottom:clamp(-230px,-16vw,-105px)}
.branch-sep img{
  -webkit-mask-image:
    linear-gradient(180deg,transparent 0,#000 9%,#000 91%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 8%,#000 92%,transparent 100%);
  mask-image:
    linear-gradient(180deg,transparent 0,#000 9%,#000 91%,transparent 100%),
    linear-gradient(90deg,transparent 0,#000 8%,#000 92%,transparent 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect}
/* the film hero keeps its scroll cue clear of the branches */
@media (max-width:900px){
  .branch-sep{margin-top:clamp(-220px,-26vw,-110px);margin-bottom:clamp(-150px,-18vw,-75px)}
}
@media (max-width:720px){
  .branch-sep img{width:175vw}
}

/* ---- E. mobile optimization pass ---- */
@media (max-width:720px){
  :root{--nav-h:62px}
  .section{padding-block:clamp(54px,9vh,84px)}
  .footer{padding-block:clamp(140px,22vh,210px) 28px}
  .footer-top{padding:1.5rem;gap:1.8rem;row-gap:1.5rem}

  /* iOS: inputs under 16px trigger auto-zoom */
  input,select,textarea{font-size:max(16px,1em)}

  /* comfortable tap targets (≥44px where it matters) */
  .btn,.add-btn{min-height:44px}
  .wv{min-height:42px}
  .qty-control button{width:36px;height:36px}
  .nav .icon-btn{width:42px;height:42px}
  .footer .footer-col a{padding-block:.55rem}

  /* film hero: stats wrap instead of squeezing */
  .fh-stats{flex-wrap:wrap;row-gap:1rem}
  .fh-tagline{line-height:1.6}

  /* brew lab breathing room */
  .lab-ratio{flex-wrap:wrap;justify-content:center;row-gap:.5rem}
  .lab-dose{gap:.8rem}
  .kn-hero{padding-block:calc(var(--nav-h) + 56px) 40px}
  .kn-stats{width:100%;justify-content:space-between;gap:.6rem}
  .kn-stats>div{flex:1;padding:.85rem .6rem}

  /* section heads stack cleanly */
  .shop-section .sec-head{flex-wrap:wrap;gap:.7rem}

  /* mini-cart uses the full small screen */
  .mini-cart{width:min(410px,100vw)}

  /* statues scale to the viewport, feet ready for the branch */
  .statue-fig img{width:min(260px,74%)}

  /* lighter paints on small GPUs */
  .branch-sep img{filter:drop-shadow(0 14px 20px rgba(0,0,0,.4))}
  .lab-card::before{animation:none}
}
@media (max-width:400px){
  .fh-logo{width:min(200px,64vw)}
  .fh-stats{gap:1rem}
  .pd-weights .weights{flex-direction:column}
  .pd-weights .wv{min-height:46px}
}

/* ---- E2. footer painting on small screens ----
   the stacked footer grows very tall; cover against that height
   zoomed the art and cropped its character away. The painting
   becomes a bottom-anchored BAND above the link panel instead:
   native-ish scale, plants visible, fades both ways. */
@media (max-width:900px){
  .footer{padding-top:clamp(250px,36vh,330px)}
  html[data-theme="dark"] .footer::before,
  html[data-theme="light"] .footer::before{
    inset:0 0 auto 0;height:min(520px,72vh);
    background-position:center bottom;background-size:cover;
    -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 24%,#000 68%,transparent 100%);
            mask-image:linear-gradient(180deg,transparent 0,#000 24%,#000 68%,transparent 100%)}
  html[data-theme="dark"] .footer::after{
    background:linear-gradient(180deg,transparent 0,rgba(13,9,5,.1) 55%,rgba(11,7,4,.32) 100%)}
  html[data-theme="light"] .footer::after{
    background:linear-gradient(180deg,rgba(238,229,213,.3) 0,rgba(238,229,213,0) 40%,rgba(236,227,210,.1) 100%)}
}

/* ---- E3. touch standards: 44px-class tap targets & legible micro-type ---- */
@media (max-width:820px){
  /* nav & brand hit areas */
  .nav .brand{padding-block:.5rem}
  .burger{width:44px;height:44px}

  /* mini-cart controls */
  .mc-q button{min-width:34px;min-height:34px}
  .mc-rm{width:38px;height:38px;font-size:.95rem}
  .mc-continue{padding-block:.7em;display:inline-block}

  /* cart page + product links */
  .cart-row .rm{padding:.6em .4em}
  .product-card a.h3l{padding-block:.25em;display:inline-block}
  .breadcrumb a{padding:.5em .25em;display:inline-block}

  /* auth */
  .auth-input .eye{width:40px;height:40px}
  .auth-top a.back{padding:.5em .2em;display:inline-flex}
  .auth-top .brand{padding-block:.45rem}
  .auth-card input[type="checkbox"]{width:18px;height:18px}
  .auth-card a{padding-block:.35em;display:inline-block}

  /* micro-type floor: nothing under ~11.5px on touch screens */
  .lm small,.wv small,.kn-tag,.lo span,.calc-out span,
  .mc-continue,.product-card .tag,.tag,.fh-stats span,.kn-stats span{font-size:0.78rem}
  .cart-count{font-size:0.78rem}
}

/* =========================================================
   V2.5 — corrections round
   A) dark: bg ↔ footer artwork were swapped — fixed
   B) light: footer fade mirrors the dark ramp (soft, clean)
   C) price change animates like the site's text reveals
   D) mobile density pass: smaller items, more per screen
   ========================================================= */

/* ---- A. the plants/beans painting is the FOOTER, the clouds are the SKY ---- */
html[data-theme="dark"]::before{background-image:url("../assets/bg-footer-night.webp")}
html[data-theme="dark"] .footer::before{
  background-image:url("../assets/bg-night.webp")}

/* ---- B. light footer fade = same ramp shape as dark ---- */
html[data-theme="light"] .footer::before{
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 18%,#000 44%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 18%,#000 44%)}
html[data-theme="light"] .footer::after{
  background:linear-gradient(180deg,transparent 0,rgba(238,231,218,.10) 60%,rgba(236,227,210,.22) 100%)}

/* ---- C. price swap: soft rise + blur, like the text reveals ---- */
.p-val.bump,.pd-info .price.bump,.lo b.bump,.calc-out b.bump{
  animation:priceSoft .75s var(--ease)}
@keyframes priceSoft{
  0%{opacity:0;transform:translateY(12px);filter:blur(6px)}
  100%{opacity:1;transform:none;filter:blur(0)}}

/* ---- D. mobile density: smaller pieces, more on screen ---- */
@media (max-width:720px){
  html{font-size:15px}
  .section{padding-block:clamp(44px,7vh,64px)}
  .sec-head{margin-bottom:1.4rem}
  .sec-head h2,.shop-section .sec-head h2{font-size:1.5rem}
  .lead{font-size:0.95rem;line-height:1.85}

  /* hero: tighter composition */
  .fh-logo{width:min(190px,50vw);margin-block:.4rem .8rem}
  .fh-tagline{font-size:1.3rem;margin-bottom:.6rem}
  .fh-lead{font-size:.88rem;line-height:1.85;margin-bottom:1.2rem}
  .fh-stats{gap:.7rem;margin-top:1.3rem}
  .fh-stats div{flex:1;min-width:0;text-align:center;align-items:center}
  .fh-stats b{font-size:1.15rem}
  .fh-stats span{font-size:0.78rem}
  .fhero .hero-actions .btn{padding:.75em 1.25em;font-size:0.88rem}

  /* statues & separators scale down with the type */
  .statue-fig img{width:min(210px,62%)}
  .statue-fig{min-height:0}
}

@media (max-width:560px){
  /* two-up grids everywhere a card can breathe at ~170px */
  .cat-grid{grid-template-columns:1fr 1fr;gap:.7rem}
  .cat-card{padding:1.1rem .9rem 1rem}
  .cat-card h3{font-size:1rem}
  .cat-card p{font-size:0.78rem;line-height:1.6;margin-top:.3rem}
  .cat-card .go{margin-top:.7rem;font-size:.78rem}

  .adv-grid{grid-template-columns:1fr 1fr;gap:.7rem}
  .adv-card{padding:1.1rem .95rem}
  .adv-card h3{font-size:1rem}
  .adv-card p{font-size:0.78rem;line-height:1.65}

  /* An article card is a photo, a title, two lines of summary and a date. Two
     of those side by side on a 375px phone leaves each one 158px wide and its
     photo 156×97 — a thumbnail, not an image. One per row on a phone. */
  .journal-grid{grid-template-columns:1fr;gap:1rem}
  .post .body,.post-body{padding:1rem .95rem 1.1rem}

  .kn-grid{grid-template-columns:1fr;gap:1rem}
  .kn-body{padding:1rem .9rem 1.05rem;gap:.35rem}
  .kn-ph{aspect-ratio:16/10}

  .origin-list{grid-template-columns:1fr 1fr;gap:.45rem}
}

@media (max-width:520px){
  /* shop: two products per row, compact frames */
  .product-grid{gap:.75rem}
  .product-grid>.product-card{flex-basis:calc(50% - .4rem);max-width:none}
  .product-card .body{padding:.7rem .55rem .75rem;margin-top:.35rem;gap:.3rem}
  .product-card h3,.product-card a.h3l{font-size:.88rem;line-height:1.45}
  .product-card .meta{font-size:0.78rem;line-height:1.55}
    /* margin-top stays auto — it is what keeps the buy buttons on one line. */
  .product-card .price-row{padding-top:.55rem;gap:.5rem}
  .price{font-size:.95rem}
  .price small{font-size:0.78rem}
  .product-card .tag{font-size:0.78rem;padding:.28em .7em}
  .weights{gap:.3rem;margin-top:.5rem}
  .wv{min-width:0;min-height:36px;padding:.3em .2em;font-size:0.78rem}
  .add-btn{padding:.55em .9em;font-size:.78rem;min-height:38px}
  .qty-control{padding:.22rem .3rem}
  .qty-control button{width:30px;height:30px}
}

/* =========================================================
   V2.6 — shop weight pills: number + unit, jewel style
   ========================================================= */
.product-card .weights{gap:.45rem;margin-top:.65rem;width:100%}
/* A floor, not a fixed width: three chips still share the row equally, but a
   product with six of them wraps to a second row instead of squeezing each
   pill down to 30px where «۱ کیلوگرم» stops being readable. */
.product-card .wv{flex:1 1 3.4rem;min-width:3.4rem;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:.16rem;min-height:50px;padding:.45em .3em;border-radius:12px;
  border:1px solid var(--line);color:var(--muted);
  background:linear-gradient(165deg,rgba(255,255,255,.045),rgba(255,255,255,0));
  transition:color .3s var(--ease),border-color .3s var(--ease),
    background .3s var(--ease),transform .25s var(--ease),box-shadow .3s var(--ease)}
html[data-theme="light"] .product-card .wv{
  background:linear-gradient(165deg,rgba(84,58,36,.05),rgba(84,58,36,0))}
/* Number and unit are not peers. At 1rem/0.78rem they were only 1.13× apart on
   a phone, which reads as one two-word label rather than a figure with its
   unit; a full step of the scale between them — plus lighter weight and less
   ink — is what makes «۲۵۰» the thing you see and «گرم» the thing you read
   after it. */
.product-card .wv b{font-size:1.15rem;font-weight:800;line-height:1;
  font-variant-numeric:tabular-nums}
.product-card .wv i.u{font-style:normal;font-size:0.78rem;font-weight:600;
  opacity:.62;line-height:1;letter-spacing:.02em}
.product-card .wv:hover{color:var(--text);border-color:#c99c66;transform:translateY(-2px)}
.product-card .wv.active{color:#241304;border-color:#c99c66;transform:translateY(-2px);
  background:linear-gradient(165deg,#d8ab72,#a5793f);
  box-shadow:0 10px 20px -10px rgba(165,121,63,.75)}

.product-card .wv.active i.u{opacity:.85}
@media (max-width:520px){
  .product-card .weights{gap:.3rem;margin-top:.5rem}
  .product-card .wv{min-height:44px;border-radius:10px;padding:.3em .15em;gap:.12rem;flex-basis:2.7rem;min-width:2.7rem}
  .product-card .wv b{font-size:1.02rem}
  /* Narrower chips, so the unit steps down with them — «کیلوگرم» at 0.78rem
     was filling the whole pill and squaring up against the number. */
  .product-card .wv i.u{font-size:0.72rem}
}

/* =========================================================
   V2.4 — separators: a small garland, repeated
   The artwork is one wide branch on a mostly transparent canvas. Blown up to
   115vw it dominated every seam, so it now runs at a fraction of that width and
   repeats 2–3 times instead. The branch bleeds to both edges of its own canvas,
   so tiled copies join into one continuous garland.
   ========================================================= */
.branch-sep{gap:0;
  margin-top:clamp(-72px,-4.6vw,-34px);
  margin-bottom:clamp(-58px,-3.6vw,-26px);
  /* the row as a whole fades out at its ends… */
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 13%,#000 87%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 13%,#000 87%,transparent 100%)}
.branch-sep img{width:clamp(180px,21vw,310px);max-width:none;flex:0 0 auto;
  /* …so each tile only needs the vertical blend, never a side fade that would
     cut a visible seam between neighbours */
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 14%,#000 86%,transparent 100%);
  mask-image:linear-gradient(180deg,transparent 0,#000 14%,#000 86%,transparent 100%);
  -webkit-mask-composite:source-over;mask-composite:add;
  filter:drop-shadow(0 10px 16px rgba(0,0,0,.45))}
html[data-theme="light"] .branch-sep img{filter:drop-shadow(0 10px 14px rgba(70,45,22,.28))}
.branch-sep img:nth-child(2){transform:scaleX(-1)}   /* break the repeat */
.branch-sep::before{width:min(700px,80vw);height:70%}

@media (max-width:900px){
  .branch-sep{margin-top:clamp(-58px,-6vw,-26px);margin-bottom:clamp(-46px,-5vw,-22px)}
  .branch-sep img{width:clamp(170px,27vw,240px)}
  .branch-sep img:nth-child(3){display:none}
}
@media (max-width:560px){
  .branch-sep img{width:min(250px,58vw)}
  .branch-sep img:nth-child(2){display:none}
}

/* =========================================================
   V2.5 — statues: larger, and dissolving into the page at the base
   The artwork ends in a hard-cut plinth. A bottom mask fades that edge out so
   the figure sits in the background instead of on top of it — which also makes
   the old painted ground-shadow redundant.
   ========================================================= */
.statue-fig{min-height:0;align-items:flex-end}
.statue-fig img{width:min(560px,100%);max-width:none;
  -webkit-mask-image:linear-gradient(180deg,#000 0,#000 58%,rgba(0,0,0,.5) 80%,transparent 100%);
  mask-image:linear-gradient(180deg,#000 0,#000 58%,rgba(0,0,0,.5) 80%,transparent 100%);
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.42))}
html[data-theme="dark"] .statue-fig img{filter:drop-shadow(0 16px 28px rgba(0,0,0,.5))}
html[data-theme="light"] .statue-fig img{filter:drop-shadow(0 16px 24px rgba(55,34,16,.26))}
.statue-fig::after{display:none}      /* the fade replaces the painted ground shadow */
.statue-fig:hover img{transform:translateY(-6px) scale(1.015)}

@media (max-width:900px){
  .statue-fig img{width:min(440px,88%)}
}
@media (max-width:560px){
  .statue-fig img{width:min(330px,80%)}
}

/* ---- statues, larger still: the figure column takes the lead in the split ---- */
@media (min-width:901px){
  /* only the statue features rebalance; photo/other features keep their split */
  .feature:has(.statue-fig){grid-template-columns:.72fr 1.28fr}
  /* the wide track follows the figure, whichever side it sits on */
  .feature:has(> .statue-fig:first-child){grid-template-columns:1.28fr .72fr}
  .statue-fig img{width:min(820px,100%)}
}
@media (max-width:900px){
  .statue-fig img{width:min(560px,96%)}
}
@media (max-width:560px){
  .statue-fig img{width:min(400px,92%)}
}

/* ---- stacked view: the heading always comes before its statue ----
   On desktop the figure alternates sides, which is the point. Once the grid
   collapses to one column that alternation turns into "statue, then heading"
   on one section only — which reads as a mistake, not a rhythm. ---- */
@media (max-width:820px){
  .feature:has(> .statue-fig:first-child) > .feature-body{order:1}
  .feature:has(> .statue-fig:first-child) > .statue-fig{order:2}
}

/* ---- advantages: the heading block is centred over its grid ---- */
#advantages > .wrap > .eyebrow{display:flex;justify-content:center}
#advantages > .wrap > .h-lg{text-align:center;margin-inline:auto;max-width:24ch}

/* =========================================================
   V2.7 — compact luxury pass (desktop)
   A) one step down the whole scale: type, section padding, figures
   B) each section is sized to land inside a single viewport
   C) contact page rebuilt as one framed medallion card
   D) about page carries a portrait painting
   ========================================================= */

/* ---- A. global scale, one notch down --------------------------------
   The site was built on a poster-sized scale: 150px section padding and a
   2.8rem h-lg pushed every section well past one screen. Everything below
   is the same rhythm at ~0.78x, so it reads tighter without going flat. */
.section{padding-block:clamp(52px,7.2vh,92px)}
.h-xl{font-size:clamp(1.8rem,4.2vw,2.85rem)}
.h-lg{font-size:clamp(1.45rem,2.9vw,2.15rem)}
.lead{font-size:clamp(.95rem,1.02vw,1.05rem);line-height:1.9;max-width:56ch}
.eyebrow{font-size:0.78rem;letter-spacing:.28em;margin-bottom:1rem}
.eyebrow::before{width:24px}
.btn{padding:.82em 1.55em;font-size:0.95rem}

/* ---- B1. hero: same composition, less air ---- */
.fh-logo{width:min(228px,48vw);margin-block:.35rem .85rem}
.fh-tagline{font-size:clamp(1.3rem,2.15vw,1.75rem);line-height:1.45;margin-bottom:.7rem}
.fh-lead{font-size:clamp(.9rem,1.05vw,1rem);line-height:1.9;margin-bottom:1.35rem;max-width:46ch}
.fh-stats{margin-top:1.6rem;gap:clamp(1.1rem,3vw,2.1rem)}
.fh-stats b{font-size:1.3rem}
.fh-stats span{font-size:0.78rem}
/* Desktop only: below 901px the hero is V2.3's full-width bottom band, and an
   unscoped width here would win over that and shrink it back to a sidebar. */
@media (min-width:901px){
  .fh-panel{width:clamp(330px,35vw,510px);
    padding:calc(var(--nav-h) + 1.6rem) clamp(1.5rem,3vw,2.9rem) 2rem}
}

/* ---- B2. categories ---- */
.cat-head{margin-bottom:1.9rem}
.cat-grid{gap:1rem}
.cat-card{padding:1rem .9rem 1.25rem;border-radius:20px}
.cat-ring{width:min(148px,70%)}
.cat-card h3{font-size:1.05rem}
.cat-card p{font-size:.82rem;line-height:1.7}
.cat-card .go{margin-top:.9rem;font-size:.82rem}

/* ---- B3. statue features: cap by HEIGHT, not width -------------------
   The artwork is 4:5, so a width of 820px resolved to 1025px tall — on its
   own taller than the viewport. Driving the figure off max-height instead
   is what actually makes these sections fit one screen. */
.feature{gap:clamp(1.6rem,3.6vw,3.4rem);align-items:center}
.feature-body{max-width:44ch}
.feature-body .btn{margin-top:1.4rem}
.feature-note{margin-top:1.1rem;padding:.8rem 1rem;font-size:0.88rem;line-height:1.75}
/* The statue <img> tags carry no width/height attributes, so a bare width:auto
   measures 0x0 until the file lands. Declaring the artwork's own 4:5 ratio lets
   the box resolve from the height immediately — no reflow when it loads. */
@media (min-width:901px){
  .statue-fig img{aspect-ratio:4/5;height:clamp(320px,48vh,460px);
    width:auto;max-width:100%;object-fit:contain}
  /* V2.5 gave the figure the wide track because it was sized by width. Now that
     it is capped by height, that track was mostly empty air — so the text side
     takes the lead and the figure keeps only the room it actually fills. */
  .feature:has(.statue-fig){grid-template-columns:1.1fr .9fr}
  .feature:has(> .statue-fig:first-child){grid-template-columns:.9fr 1.1fr}
}

/* ---- B4. advantages ---- */
.adv-grid{gap:.8rem}
.adv-item{padding:1.3rem 1rem}
.adv-item .ico{width:28px;height:28px;margin-bottom:.75rem}
.adv-item h4{font-size:0.95rem;line-height:1.55}

/* ---- B5. origins / map ----
   The one section still running past a full screen (117vh).
   Two traps here, both avoided below:
   · #origins sets its own padding-block, so an ID-level override is required —
     the .section rule above never reaches it.
   · .origins-layer is inset:0 on .map-frame, and the pins are positioned in
     percentages of that layer. Capping the IMAGE height would leave the frame
     stretched by the grid and slide every pin off its country. So the frame is
     what gets sized, the image fills it, and the layer stays glued to the map. */
#origins{padding-block:clamp(48px,6.5vh,80px)}
.map-head{margin-bottom:1.25rem}
.map-head .h-lg{font-size:clamp(1.35rem,2.5vw,1.9rem)}
.map-head .lead{max-width:46ch}
.map-img{width:100%;height:auto;aspect-ratio:4/3;max-height:none}
/* Desktop only. style.css collapses .map-stage to one column on small screens,
   and an unscoped two-column rule here would win over that media query and
   crush the map track to a few pixels. */
@media (min-width:901px){
  .map-stage{grid-template-columns:minmax(0,1fr) 280px;gap:1.6rem;align-items:start}
  .map-frame{width:min(100%,calc(clamp(320px,56vh,540px) * 4 / 3));margin-inline:auto}
}
.map-panel{gap:.6rem}
.map-panel-head{padding-bottom:.5rem}
.map-panel-head b{font-size:.95rem}
.origin-list{gap:.35rem}
.origin-list li{padding:.4rem .55rem}
.origin-list .name{font-size:.82rem}
.map-cta{margin-top:.15rem}

/* ---- B6. inner-page heads ---- */
.page-head{padding-top:calc(var(--nav-h) + 44px)}
.page-title{font-size:clamp(1.75rem,3.6vw,2.5rem)}
.page-head .lead{margin-top:.85rem}
.statement{font-size:clamp(1.4rem,3vw,2.1rem);line-height:1.55}
.prose p{margin-bottom:1rem;line-height:1.9;font-size:.95rem}

/* ---- B7. separators sit closer now that the sections are shorter ---- */
.branch-sep img{width:clamp(160px,17vw,250px)}

/* =========================================================
   V2.7 - C — CONTACT: one framed card
   Was: a tall two-column [info stack | form]. Now a single centred card
   inside a brass double rule, headed by the site's ornate frame worn as a
   medallion — the same classic language as the product frames.
   ========================================================= */
body[data-page="contact"] .ct-section{
  padding-block:calc(var(--nav-h) + 16px) clamp(32px,5vh,56px)}
.ct-crumb{justify-content:center;margin-bottom:.6rem}

.ct-card{position:relative;max-width:820px;margin-inline:auto;
  padding:clamp(1.5rem,3.2vw,2.6rem) clamp(1.2rem,3vw,2.6rem) clamp(1.4rem,2.6vw,2.2rem);
  border-radius:22px;border:1px solid rgba(201,156,102,.34);
  background:linear-gradient(180deg,rgba(24,17,11,.86),rgba(16,11,7,.92));
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  box-shadow:0 30px 70px -40px rgba(0,0,0,.9),inset 0 1px 0 rgba(232,199,155,.10)}
html[data-theme="light"] .ct-card{
  background:linear-gradient(180deg,rgba(255,251,244,.9),rgba(245,236,222,.94));
  border-color:rgba(140,98,52,.3);
  box-shadow:0 26px 60px -38px rgba(72,46,20,.5),inset 0 1px 0 rgba(255,255,255,.6)}
/* the second, inner rule — what makes it read as a frame rather than a box */
.ct-card::before{content:"";position:absolute;inset:9px;border-radius:15px;
  border:1px solid rgba(201,156,102,.2);pointer-events:none}
html[data-theme="light"] .ct-card::before{border-color:rgba(140,98,52,.2)}

.ct-head{text-align:center;position:relative;z-index:1}
.ct-medal{position:relative;display:block;width:clamp(74px,8.5vw,98px);aspect-ratio:1;
  margin:0 auto .9rem}
.ct-medal::before{content:"";position:absolute;inset:0;
  background:url("../assets/frame-ornate.webp") center/contain no-repeat;
  filter:drop-shadow(0 10px 16px rgba(0,0,0,.5))}
html[data-theme="light"] .ct-medal::before{filter:drop-shadow(0 10px 14px rgba(70,45,22,.28))}
.ct-medal-ico{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:34%;height:auto;color:#c99c66}
html[data-theme="light"] .ct-medal-ico{color:#8a5f30}
.ct-title{font-size:clamp(1.4rem,2.8vw,2rem);font-weight:800;line-height:1.35}
.ct-lead{color:var(--muted);font-size:clamp(.88rem,1vw,.98rem);line-height:1.85;
  max-width:46ch;margin:.6rem auto 0}

/* brass hairline with a centred diamond — the card's own section divider */
.ct-rule{display:flex;align-items:center;justify-content:center;
  margin-block:clamp(1.1rem,2.2vw,1.6rem);height:1px;
  background:linear-gradient(90deg,transparent,rgba(201,156,102,.34) 22%,
    rgba(201,156,102,.34) 78%,transparent)}
.ct-rule-mark{width:7px;height:7px;transform:rotate(45deg);
  background:#c99c66;box-shadow:0 0 0 4px var(--bg)}
html[data-theme="light"] .ct-rule-mark{background:#8a5f30;box-shadow:0 0 0 4px #f6efe3}

/* facts strip: four small plaques, one row on desktop */
.ct-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:.7rem;list-style:none}
.ct-fact{display:flex;align-items:flex-start;gap:.6rem;
  padding:.75rem .7rem;border-radius:13px;
  border:1px solid var(--line);background:rgba(255,255,255,.028);
  transition:border-color .35s var(--ease),transform .35s var(--ease)}
html[data-theme="light"] .ct-fact{background:rgba(84,58,36,.035)}
.ct-fact:hover{border-color:rgba(201,156,102,.45);transform:translateY(-2px)}
.ct-fact-ic{flex:0 0 auto;width:19px;height:19px;color:#c99c66;margin-top:.15rem}
html[data-theme="light"] .ct-fact-ic{color:#8a5f30}
.ct-fact-ic svg{width:100%;height:100%}
.ct-fact-txt{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.ct-fact-txt b{font-size:0.78rem;font-weight:600;color:var(--muted-2);letter-spacing:.06em}
.ct-fact-txt a,.ct-fact-txt span{font-size:0.82rem;line-height:1.55;color:var(--text);
  overflow-wrap:anywhere}
.ct-fact-txt a:hover{color:#e8c79b}
html[data-theme="light"] .ct-fact-txt a:hover{color:#8a5f30}

/* form inside the card: tighter rows, brass focus */
.ct-form .form-row{gap:.8rem}
.ct-form .field{margin-bottom:.8rem}
.ct-form .field label{font-size:0.78rem;margin-bottom:.35rem}
.ct-form .field input,.ct-form .field select,.ct-form .field textarea{
  padding:.68rem .85rem;border-radius:11px;font-size:0.88rem;
  background:rgba(255,255,255,.035)}
html[data-theme="light"] .ct-form .field input,
html[data-theme="light"] .ct-form .field select,
html[data-theme="light"] .ct-form .field textarea{background:rgba(255,255,255,.62)}
.ct-form .field textarea{min-height:104px;line-height:1.75}
.ct-form .field input:focus,.ct-form .field select:focus,.ct-form .field textarea:focus{
  border-color:#c99c66;box-shadow:0 0 0 3px rgba(201,156,102,.15)}
.ct-submit{width:100%;margin-top:.3rem}
.ct-fine{margin-top:.75rem;text-align:center;font-size:0.78rem;line-height:1.7;color:var(--muted-2)}
.ct-card .form-ok{margin-bottom:1rem}

/* =========================================================
   V2.7 - D — ABOUT: portrait painting
   The new artwork is 4:5, so the square-ish frame cropped its head and feet.
   ========================================================= */
.about-split{align-items:center;gap:clamp(1.6rem,4vw,3.2rem)}
.about-portrait{aspect-ratio:auto;border-radius:18px;overflow:hidden;
  border:1px solid rgba(201,156,102,.3);
  box-shadow:0 26px 60px -34px rgba(0,0,0,.85)}
html[data-theme="light"] .about-portrait{border-color:rgba(140,98,52,.28);
  box-shadow:0 22px 50px -34px rgba(72,46,20,.45)}
/* The cap is deliberately above what the column resolves to at normal window
   heights, so the painting shows whole; it only crops on very short viewports. */
.about-portrait img{width:100%;height:auto;display:block;
  max-height:clamp(420px,72vh,620px);object-fit:cover;object-position:center top}
/* the portrait is the taller column, so give it a little less width */
@media (min-width:821px){
  .about-split{grid-template-columns:1.15fr .85fr}
}

/* =========================================================
   V2.8 — MOBILE: the desktop experience, rebuilt for the hand
   The V2.5 density pass shrank the phone layout to fit more per screen:
   root 15px plus rem sizes tuned down to .6-.76 left real copy rendering at
   9-11px. This pass trades a little density back for legibility, gives every
   control a thumb-sized target, and re-fits each block to a 375px frame.
   Ordered: floors first, then per-page layout, then touch + input rules last
   so nothing later in this file can undercut them.
   ========================================================= */

/* ---- A. type floors --------------------------------------------------
   Back to a 16px root (V2.5 set 15px), then explicit floors on everything
   the audit found under ~12px. Nothing on a phone renders below 11px now. */
@media (max-width:720px){
  html{font-size:16px}

  .lead{font-size:0.88rem;line-height:1.85}
  .eyebrow{font-size:0.78rem;letter-spacing:.22em;margin-bottom:.8rem}
  .breadcrumb,.breadcrumb a,.breadcrumb span{font-size:.82rem}
  .footer .footer-col h5{font-size:0.82rem}
  .footer .footer-col a{font-size:0.82rem}
  .footer .footer-bottom{font-size:0.78rem;line-height:1.9}

  /* hero */
  .fh-tagline{font-size:1.3rem;line-height:1.55}
  .fh-lead{font-size:.88rem;line-height:1.85}
  .fh-stats b{font-size:1.15rem}
  .fh-stats span{font-size:0.78rem}
  .fh-loader-txt{font-size:0.82rem}

  /* categories */
  .cat-card h3{font-size:1rem}
  .cat-card p{font-size:.82rem;line-height:1.65}
  .cat-card .go{font-size:.82rem}
  .cat-num{font-size:0.78rem}

  /* features + advantages */
  .feature-note{font-size:0.82rem;line-height:1.8}
  .adv-item h4{font-size:.88rem}

  /* map */
  .map-hint{font-size:0.78rem}
  .origin-list .name{font-size:0.82rem}
  .d-note{font-size:0.82rem}
  .d-tip{font-size:.78rem}

  /* product cards — the smallest text on the whole site lived here */
  .product-card h3,.product-card a.h3l{font-size:0.95rem;line-height:1.45}
  .product-card .meta{font-size:0.78rem;line-height:1.6}
  .product-card .price{font-size:1rem}
  .product-card .price small,.product-card .p-unit{font-size:0.78rem}
  .product-card .tag{font-size:0.78rem}
  .product-card .wv b{font-size:1.02rem}
  .product-card .wv i.u{font-size:0.72rem}
  .add-btn{font-size:0.82rem}

  /* journal + knowledge cards */
  .post h3,.kn-body h3{font-size:.95rem;line-height:1.5}
  .post p,.kn-body p{font-size:0.82rem;line-height:1.7}
  .post .cat,.kn-tag{font-size:0.78rem}
  .pmeta{font-size:.78rem}
  .kn-more{font-size:0.82rem}
  .chip{font-size:0.82rem}

  /* forms */
  .field label{font-size:0.82rem}
  .field .err,.field-err{font-size:0.82rem}
  .ct-lead{font-size:0.88rem}
  .ct-fine{font-size:0.82rem}
  .ct-fact-txt b{font-size:0.78rem}
  .ct-fact-txt a,.ct-fact-txt span{font-size:0.88rem}
  .form-note,.form-ok{font-size:0.88rem}
}

/* ---- B. hero on a phone ----------------------------------------------
   V2.3 already solved this properly: the 16:9 film is letterboxed under the
   header and the copy rises as a bottom band with a brass edge. Nothing here
   touches that composition — only the controls inside it, which were sized
   for reading rather than for thumbs. */
@media (max-width:720px){
  .fh-lead{max-width:38ch}
  .fhero .hero-actions{gap:.6rem}
  .fhero .hero-actions .btn{flex:1 1 auto;justify-content:center;min-height:46px}
  .fh-stats div{flex:1;min-width:0;align-items:center;text-align:center}
  /* the cue sits at the bottom of the hero, not of the band — the band needs
     to end above it or the stats row runs underneath the label */
  .fh-panel{padding-bottom:clamp(4rem,9vh,5.2rem)}
}

/* ---- C. categories: bigger medallions, honest two-up ---- */
@media (max-width:720px){
  .cat-head{margin-bottom:1.3rem}
  .cat-grid{grid-template-columns:1fr 1fr;gap:.8rem}
  .cat-card{padding:1.1rem .8rem 1.2rem;border-radius:18px}
  .cat-ring{width:min(132px,80%)}
  .cat-card .go{margin-top:.7rem}
}

/* ---- D. statue features: the figure leads, the copy follows ---- */
@media (max-width:900px){
  .feature{gap:1.2rem}
  .feature-body{max-width:none}
  .feature-body .btn{margin-top:1.1rem}
  .statue-fig{min-height:0}
  .statue-fig img{width:min(300px,72vw);height:auto;max-height:42vh;object-fit:contain}
}

/* ---- E. origins on a phone --------------------------------------------
   One column: the map keeps its 4:3 box (so the pins stay on their
   countries) and the list becomes the primary way in. */
@media (max-width:900px){
  #origins{padding-block:clamp(44px,6vh,72px)}
  .map-stage{grid-template-columns:1fr;gap:1.2rem}
  .map-frame{width:100%;margin-inline:0}
  .map-panel{gap:.7rem}
  .origin-list{grid-template-columns:1fr 1fr;gap:.5rem}
  .origin-list li{min-height:44px;padding:.5rem .7rem}
}

/* ---- F. shop + product grid ------------------------------------------
   Two per row is right for 14 products on a 375 screen — one-up would be a
   very long scroll. The cards just needed room: a tighter page gutter gives
   each tile ~10px more, and the frame/photo scale with it. */
@media (max-width:560px){
  :root{--gut:16px}
  .product-grid{gap:.7rem}
  .product-grid>.product-card{flex-basis:calc(50% - .35rem)}
  .product-card .body{padding:.75rem .5rem .8rem;gap:.35rem}
  .product-card .price-row{padding-top:.6rem;gap:.4rem;flex-wrap:wrap}
  .product-card .weights{gap:.28rem;margin-top:.55rem}
  .product-card .wv{min-height:44px;padding:.3em .1em}
  .shop-section .sec-head{margin-bottom:1rem}
}

/* product detail: the gallery and the buy box both get full width */
@media (max-width:720px){
  .pd-thumbs{gap:.5rem}
  .pd-thumb{width:60px;height:60px}
  .pd-weights .weights{gap:.5rem}
  .pd-weights .wv{min-height:48px;font-size:0.95rem}
  .pd-info .price{font-size:1.5rem}
}

/* ---- G. journal + knowledge on a phone ----
   This block used to force these grids back to two columns, undoing the
   single-column rule above it and squeezing every article photo to ~156px.
   The card shapes are set once, higher up; only the featured article needs
   anything here. */
@media (max-width:560px){
  .kn-ph{aspect-ratio:16/10}
}

/* ---- H. contact card on a phone -------------------------------------
   The four-across facts strip was still four-across at 375, which pushed the
   first plaque off the edge. Two-up, and the card loses its inner rule so the
   content is not fighting two borders inside a 343px frame. */
@media (max-width:720px){
  body[data-page="contact"] .ct-section{
    padding-block:calc(var(--nav-h) + 20px) clamp(32px,5vh,56px)}
  .ct-card{padding:1.35rem 1.1rem 1.5rem;border-radius:18px}
  .ct-card::before{inset:7px;border-radius:12px}
  .ct-medal{width:72px;margin-bottom:.75rem}
  .ct-title{font-size:1.3rem}
  .ct-facts{grid-template-columns:1fr 1fr;gap:.55rem}
  .ct-fact{padding:.7rem .6rem;gap:.5rem;min-height:44px}
  .ct-form .form-row{grid-template-columns:1fr;gap:0}
  .ct-form .field textarea{min-height:118px}
}
@media (max-width:380px){
  .ct-facts{grid-template-columns:1fr}
}

/* ---- I. about: the painting sits above the copy, uncropped ---- */
@media (max-width:820px){
  .about-split{grid-template-columns:1fr;gap:1.4rem}
  .about-portrait{order:-1;max-width:min(420px,86vw);margin-inline:auto}
  .about-portrait img{max-height:none}
}

/* ---- J. cart / auth / faq ---- */
@media (max-width:720px){
  .cart-steps .step{font-size:0.82rem}
  .auth-card{padding:1.4rem 1.15rem}
  .auth-card input[type="checkbox"]{width:20px;height:20px}
  .acc-q{min-height:52px;font-size:.95rem}
  .acc-a{font-size:.88rem;line-height:1.85}
}

/* ---- K. touch targets — last word, 44px class -----------------------
   Kept at the end of the file on purpose: several component rules earlier
   set smaller heights, and this is the floor that must win. */
@media (max-width:820px){
  .nav .icon-btn,.burger{width:44px;height:44px}
  .nav .brand{min-height:44px;display:inline-flex;align-items:center}
  .btn,.add-btn,.chip,.opt{min-height:44px}
  .add-btn{padding-inline:.9em;display:inline-flex;align-items:center;justify-content:center}
  .qty-control button{width:40px;height:40px}
  .mc-q button{min-width:40px;min-height:40px}
  .mc-rm{width:42px;height:42px}
  .auth-input .eye{width:44px;height:44px}
  .pagination a,.pagination span{min-width:44px;min-height:44px;
    display:inline-flex;align-items:center;justify-content:center}
  .kn-more,.post .go,.cat-card .go{padding-block:.4em;display:inline-flex}

  /* link-shaped controls: real hit area without changing how they read.

     `flex`, not `inline-flex`: these links are a stacked list in a plain <div>,
     so making them inline-level ran all three onto one line with nothing
     between them — «پودریجاتسیروپ و لیوانهمه‌ی محصولات». Block-level flex keeps
     the 44px target and the list. */
  .footer .footer-col a{display:flex;align-items:center;min-height:44px;padding-block:.35rem}
  .breadcrumb a,.breadcrumb span{display:inline-flex;align-items:center;min-height:40px}
  .auth-top a.back,.auth-tabs button{min-height:44px;display:inline-flex;
    align-items:center;justify-content:center}
  .am-close,.pd-close,.modal-close{width:44px;height:44px}
  /* the card title is the main way into a product — give it a thumb's worth */
  .product-card h3,.product-card a.h3l{display:block;padding-block:.35em}
  /* the plaque owns the tap; its mailto/tel line should too */
  .ct-fact-txt a{display:inline-flex;align-items:center;min-height:32px}
}

/* ---- L. iOS zoom guard — must outrank every component input rule ----
   .ct-form sets .9rem on its inputs further up; on a phone that would put
   the field under 16px and make Safari zoom the page on focus. */
@media (max-width:820px){
  input,select,textarea,
  .field input,.field select,.field textarea,
  .ct-form .field input,.ct-form .field select,.ct-form .field textarea,
  .auth-card input,.calc-row select,.calc-stepper input{
    font-size:16px}
  .field input,.field select,.ct-form .field input,.ct-form .field select{min-height:48px}
  .field textarea,.ct-form .field textarea{min-height:120px}
}

/* =========================================================
   V2.9 — the 721-900 tablet band
   The mobile pass stops at 720 and the desktop split starts at 901, so a
   768px tablet was inheriting desktop chrome at phone dimensions: the hero
   panel resolved to a 330px sidebar on a 753px stage, and the figures kept
   phone-sized caps. This band carries the phone treatment up and lets the
   pieces breathe at the extra width.
   ========================================================= */

@media (min-width:721px) and (max-width:900px){
  /* The V2.3 band hero already spans the width here; it just needs its copy
     to stop running the full 753px, and a scale between phone and desktop. */
  .fh-panel-inner{max-width:640px;margin-inline:auto}
  .fh-tagline{font-size:1.7rem}
  .fh-lead{font-size:1rem;max-width:52ch}
  .fh-logo{width:250px}
  .fh-stats{gap:2rem;margin-top:1.5rem}

  /* categories: 2x2 with medallions that use the extra room */
  .cat-grid{grid-template-columns:1fr 1fr;gap:1rem}
  .cat-card{padding:1.3rem 1.1rem 1.4rem}
  .cat-ring{width:min(190px,58%)}
  .cat-card h3{font-size:1.15rem}
  .cat-card p{font-size:0.88rem}

  /* the figures are the page's artwork — let them scale with the viewport */
  .statue-fig img{width:min(400px,48vw);max-height:46vh}

  /* advantages: 5 tiles across is too thin here, 3 reads better */
  .adv-grid{grid-template-columns:repeat(3,1fr)}

  /* origins: one column, map at a comfortable size, list 3-up */
  .origin-list{grid-template-columns:repeat(3,1fr)}
  .map-frame{width:min(100%,620px);margin-inline:auto}

  /* shop: three products per row at this width. The basis has to be cut by
     more than the gap it sits next to, or the third card wraps. */
  .product-grid{gap:.9rem}
  .product-grid>.product-card{flex-basis:calc(33.333% - .8rem);max-width:none}

  /* editorial grids */
  .journal-grid,.kn-grid{grid-template-columns:repeat(3,1fr);gap:1rem}

  /* contact card keeps the 4-up plaque strip, it fits again here */
  .ct-facts{grid-template-columns:repeat(4,1fr)}
  .ct-form .form-row{grid-template-columns:1fr 1fr;gap:.9rem}
  .about-portrait{max-width:min(480px,64vw)}
}

/* =========================================================
   V2.10 — narrow-phone product card
   Under ~400px the price and the add button no longer fit on one line, so the
   row wrapped on its own and left a ragged 50px of slack. Stacking it on
   purpose is tidier and hands the button the full card width as a tap target.
   ========================================================= */
@media (max-width:400px){
  .product-card .price-row{flex-direction:column;align-items:stretch;
    gap:.5rem;row-gap:.5rem;flex-wrap:nowrap}
  .product-card .price-row .price{text-align:center;line-height:1.35}
  .product-card .add-btn{width:100%;justify-content:center}
  .product-card .qty-control{width:100%;justify-content:space-between}
}

/* =========================================================
   V2.11 — CONTACT: two columns, and the call-us figure
   The single stacked card ran 887px plus section padding, so the send button
   sat below the fold on a 800px desktop. Splitting it puts the head and the
   form in one column and the new bronze figure plus the contact plaques in
   the other, which roughly halves the height and gives the page its statue.
   ========================================================= */
@media (min-width:821px){
  .ct-card{max-width:1060px;
    display:grid;
    grid-template-columns:1.24fr .76fr;
    grid-template-rows:auto auto 1fr auto;
    /* the plaques run along the foot of the card rather than stacking under
       the figure — that hands the whole column height to the bronze, which is
       a 3:4 portrait and was otherwise letterboxed down to a third of it */
    grid-template-areas:
      "head  aside"
      "okmsg aside"
      "form  aside"
      "facts facts";
    column-gap:clamp(1.4rem,3vw,2.4rem);
    align-items:start}
  .ct-head{grid-area:head;text-align:start}
  .ct-card .form-ok{grid-area:okmsg}
  .ct-form{grid-area:form}
  /* The aside stretches to the height the form column asks for, and the figure
     absorbs whatever the plaques leave. That way the card is never taller than
     the form needs — the figure adapts instead of driving the layout. */
  .ct-aside{grid-area:aside;align-self:stretch;min-height:0;
    display:flex;flex-direction:column}
  /* The image is taken out of flow so it cannot contribute intrinsic height:
     left in flow it sizes from its own aspect ratio and pushes the card past
     the fold again. Absolutely positioned, the figure's height comes purely
     from the flex fill, i.e. from whatever the form column leaves. */
  .ct-figure{position:relative;flex:1 1 0;min-height:190px}
  .ct-figure img{position:absolute;inset:0;width:100%;height:100%}

  /* the head is no longer a centred banner — it heads its own column */
  .ct-head .ct-medal{margin-inline:0 auto;margin-inline-start:0;width:clamp(58px,5vw,68px)}
  .ct-lead{margin-inline:0;max-width:40ch}
  .ct-head .ct-rule{margin-block:clamp(.9rem,1.8vw,1.3rem)}

  .ct-facts{grid-area:facts;grid-template-columns:repeat(4,1fr);gap:.6rem;
    margin-top:clamp(.9rem,1.8vw,1.3rem);
    padding-top:clamp(.9rem,1.8vw,1.3rem);
    border-top:1px solid rgba(201,156,102,.2)}
  html[data-theme="light"] .ct-facts{border-top-color:rgba(140,98,52,.2)}
  .ct-fact{padding:.6rem .7rem}
}

/* The figure is a true alpha cutout, like every other statue on the site, so
   it needs no frame at all — it stands on the card the way the carver and the
   goddess stand on the home page. The plinth fade is baked into the asset. */
.ct-figure{position:relative;margin:0;
  display:flex;align-items:flex-end;justify-content:center}
.ct-figure img{display:block;width:100%;height:100%;
  object-fit:contain;object-position:center bottom;
  filter:drop-shadow(0 18px 30px rgba(0,0,0,.5))}
html[data-theme="light"] .ct-figure img{
  filter:drop-shadow(0 16px 26px rgba(72,46,20,.32))}

/* ---- phone / small tablet: one column, the figure sits above the form ---- */
@media (max-width:820px){
  .ct-aside{display:flex;flex-direction:column;gap:.8rem;margin-block:1rem}
  .ct-figure{display:block}
  .ct-figure img{width:auto;height:auto;max-height:38vh;max-width:min(330px,78vw);
    margin-inline:auto}
}

/* =========================================================
   V2.12 — contact: the last 70px
   Two columns got the card from 887 to 728, but the send button still landed
   just past an 800px fold. This trims the rhythm rather than the content, and
   gives the reclaimed height to the figure so it crops less.
   ========================================================= */
@media (min-width:821px){
  .ct-card{padding:clamp(1.2rem,2.2vw,1.8rem) clamp(1.2rem,2.4vw,2rem) clamp(1.1rem,2vw,1.5rem)}
  .ct-title{font-size:clamp(1.3rem,2.4vw,1.8rem)}
  .ct-lead{font-size:0.95rem;line-height:1.75;margin-top:.45rem}
  .ct-medal{margin-bottom:.6rem}
  .ct-head .ct-rule{margin-block:.85rem}

  .ct-form .field{margin-bottom:.6rem}
  .ct-form .field label{margin-bottom:.28rem}
  .ct-form .field input,.ct-form .field select{padding:.6rem .8rem}
  .ct-form .field textarea{min-height:84px;padding:.6rem .8rem}
  .ct-submit{margin-top:.15rem}
  .ct-fine{margin-top:.5rem;font-size:0.78rem;line-height:1.6}

  /* height comes from the flex fill above, not a clamp */
  .ct-facts{gap:.42rem}
  .ct-fact{padding:.55rem .65rem}
  .ct-fact-txt b{font-size:0.78rem}
  .ct-fact-txt a,.ct-fact-txt span{font-size:0.82rem}
}

/* =========================================================
   V2.13 — the hero-to-page seam on small screens
   The hero paints a solid #0b0703 to its very last pixel, and the section
   underneath is transparent over the textured page background. The result was
   a hard horizontal line at the fold — the "sudden cut" out of the hero.
   Two parts: carry the hero's black a little way into the next section so the
   tone resolves instead of stepping, and let the hero copy leave under scroll
   rather than being chopped off at the edge.
   ========================================================= */
@media (max-width:900px){
  /* .section is position:relative with z-index:1, so it owns a stacking
     context — a z-index:-1 child sits behind the section's own content but
     still in front of the page background. */
  #categories{position:relative;isolation:isolate}
  #categories::before{
    content:"";position:absolute;inset-inline:0;inset-block-start:0;
    height:clamp(90px,16vh,150px);z-index:-1;pointer-events:none;
    background:linear-gradient(180deg,
      #0b0703 0%,
      rgba(11,7,3,.82) 34%,
      rgba(11,7,3,.42) 66%,
      transparent 100%)}
  html[data-theme="light"] #categories::before{
    background:linear-gradient(180deg,
      #0b0703 0%,
      rgba(11,7,3,.55) 30%,
      rgba(11,7,3,.18) 62%,
      transparent 100%)}
}

/* ---- the copy leaves with the scroll instead of being cut at the fold ----
   Progressive enhancement: browsers with scroll-driven animations get the
   dissolve, everything else keeps the blend above and behaves exactly as
   before. Motion is opt-out via prefers-reduced-motion. */
/* .fhero is overflow:hidden, which makes it a scroll container — so a plain
   animation-timeline:view() on anything inside it measures against the hero
   itself, which never scrolls, and the animation simply never runs. The
   timeline has to be named on .fhero (whose own scrollport IS the page) and
   published to its descendants with timeline-scope. */
@supports (animation-timeline: view()) and (timeline-scope: --heroView){
  @media (max-width:900px) and (prefers-reduced-motion: no-preference){
    body{timeline-scope:--heroView}
    .fhero{view-timeline:--heroView block}
    .fh-panel-inner{
      animation:heroExit linear both;
      animation-timeline:--heroView;
      /* hold the copy solid for the first stretch of the exit, then dissolve —
         fading from the very first pixel of scroll reads as the text running
         away from you */
      animation-range:exit 18% exit 88%}
    /* the film behind it drifts a touch slower — a shallow parallax so the two
       planes do not slide away as one flat sheet */
    .fhero.done .fh-video{
      animation:heroFilmDrift linear both;
      animation-timeline:--heroView;
      animation-range:exit 0% exit 100%}
  }
}
@keyframes heroExit{
  to{opacity:0;transform:translateY(-30px)}}
@keyframes heroFilmDrift{
  to{transform:translate3d(0,26px,0) scale(1.02)}}

/* =========================================================
   V2.14 — --muted-2 was below AA in both themes
   A theme sweep found the same handful of strings failing contrast on almost
   every page: the breadcrumb's current segment, the footer column headings,
   the terms date, the cart reassurance line, the roastery note, and the new
   contact fine print. All of them are var(--muted-2), which sat at 2.89:1 on
   the cream background and 4.09:1 on the dark one — both under the 4.5:1 that
   small text needs. Fixing the token fixes every one of them at once.
   ========================================================= */
html[data-theme="light"]{--muted-2:#6b5a49}   /* was #96806a — 2.89:1 */
html[data-theme="dark"] {--muted-2:#a08c74}   /* was #8d7a63 — 4.09:1 */

/* The footer headings are var(--muted-2) in light and accent-soft in dark;
   at 0.78rem uppercase with wide tracking they want a touch more weight than
   the token alone gives. */
html[data-theme="light"] .footer .footer-col h5{color:#5f4f40}

/* =========================================================
   V2.15 — contact: reclaim the height the plaque strip took
   Moving the plaques to their own row gave the bronze the full column (it now
   draws at ~364x489 instead of 227x305) but added ~100px to the card. The
   figure is tied to the form column's height, so trimming the head and the
   field rhythm shrinks the card AND keeps the statue proportional.
   ========================================================= */
@media (min-width:821px){
  body[data-page="contact"] .ct-section{padding-block:calc(var(--nav-h) + 8px) clamp(28px,4vh,48px)}
  .ct-crumb{margin-bottom:.4rem}

  .ct-medal{width:clamp(50px,4.4vw,58px);margin-bottom:.5rem}
  .ct-title{font-size:clamp(1.25rem,2.2vw,1.65rem)}
  .ct-lead{font-size:0.88rem;line-height:1.65;margin-top:.4rem;max-width:44ch}
  .ct-head .ct-rule{margin-block:.7rem}

  .ct-form .field{margin-bottom:.5rem}
  .ct-form .field label{font-size:0.78rem;margin-bottom:.24rem}
  .ct-form .field input,.ct-form .field select{padding:.55rem .78rem}
  .ct-form .field textarea{min-height:74px;padding:.55rem .78rem}
  .ct-submit{margin-top:.1rem;padding-block:.72em}
  .ct-fine{margin-top:.42rem;font-size:0.78rem;line-height:1.5}

  .ct-facts{margin-top:.85rem;padding-top:.85rem;gap:.55rem}
  .ct-fact{padding:.52rem .6rem;gap:.5rem}
  .ct-fact-ic{width:17px;height:17px}
  .ct-fact-txt b{font-size:0.78rem}
  .ct-fact-txt a,.ct-fact-txt span{font-size:0.78rem;line-height:1.45}
}

/* ---------- newsletter band ---------- */
.noir-nl-hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.noir-nl-msg {
  margin-top: .9rem;
  font-size: 0.88rem;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.noir-nl-msg.show { opacity: 1 }
.noir-nl-msg.is-error { color: #e9a49b }
.noir-nl-msg.is-ok { color: var(--accent-soft) }

/* ---------- product card: one shape, whatever the data ----------
   A card carries optional parts — a two-word summary or a four-line one, a
   weight chooser or none — and the ragged result was the summary pushing the
   price down by up to 70px between neighbours. The title and the summary are
   given a fixed number of lines so every card reserves the same room, and the
   price row is pinned to the bottom (pages.css), so the buy buttons sit on one
   line across the row. The full description is on the product page; a card is
   a signpost, not the text. */
.product-card h3,
.product-card a.h3l {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card h3 { min-height: calc(2 * 1.35em) }

.product-card .meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.75em);
}

/* =========================================================
   Value + unit
   A unit is a caption of the figure beside it, never its equal. Wherever the
   two sit together the unit drops a full step of the scale, loses weight and
   loses ink, so the eye lands on the number first. Before this, "۲۵۰ گرم" and
   "۳۲۰٬۰۰۰ تومان" were printed at one size and read as two words rather than
   as a measurement.
   ========================================================= */

/* Everything WooCommerce prints through wc_price() — cart, checkout, order
   review, the account's order list, the invoice. Sized in `em` so it tracks
   whatever amount it is attached to instead of needing a rule per context.
   It lives here rather than in woo.css because the invoice loads this sheet
   and not that one, and was printing «تومان» at the full size of the total.
   WooCommerce separates the two with a non-breaking space that IRANYekanX
   draws 0.8px wide, so the gap is set explicitly rather than trusted. */
.woocommerce-Price-currencySymbol {
  margin-inline-start: .35em;
  /* A floor, not a plain fraction: a quarter off a large total is the right
     step, but the same quarter off an already-small caption would land the
     word at 9px, where the pair stops being a figure with its currency and
     becomes two things that are both hard to read. */
  font-size: max(.72em, .66rem);
  font-weight: 400;
  color: var(--muted);
}

/* Brew-lab readouts: «۲۸۸ گرم», «۹۳°C». js/brew-lab.js rebuilds the same two
   elements on every recalculation. */
.lo b i.u,
.dose-num b i.u {
  font-style: normal;
  font-size: .68em;
  font-weight: 600;
  opacity: .62;
  letter-spacing: .02em;
  margin-inline-start: .22em;
}

/* =========================================================
   V2.8 — vertical rhythm inside text stacks
   Every section head is the same four things in the same order: a label, a
   heading, a sentence, something to click. They were not spaced by one rule,
   so the label touched the heading and the button touched the sentence.
   ========================================================= */

/* An inline-level box's bottom margin does not open a gap under it the way a
   block's does — the heading's box could start *above* where the eyebrow's box
   ended (measured at −12px, i.e. overlapping). A block-level flex box sized to
   its own content keeps the rule-and-label shape and makes the margin real. */
.eyebrow{display:flex;width:fit-content;margin-bottom:.85rem}
.cat-head .eyebrow,.map-head .eyebrow,.lab-head .eyebrow,
.hero-new .eyebrow,.fh-below .eyebrow{margin-inline:auto}

/* One step from heading to sentence, a bigger one before anything clickable. */
.feature-body>.h-lg,.feature-body>h2,.feature-body>h3,
.cat-head h2,.map-head h2,.lab-head h2{margin-bottom:.95rem}

/* The rule below used to name only `.btn`. The design's own call to action in
   these blocks is a <button class="magnet-btn">, which matched nothing — so it
   sat flush against the paragraph above it at exactly 0px. */
.feature-body .btn,
.feature-body .magnet-btn,
.feature-body .hero-actions{margin-top:1.9rem}

/* =========================================================
   V2.9 — phones: centre the section heads
   The split sections stack to one column on a phone, and a text column that
   was written to sit beside a picture reads as ragged once the picture is
   above it. Centred, the label, heading, sentence and button line up on one
   axis. The hero keeps its own alignment — it was settled separately.
   ========================================================= */
@media (max-width:760px){
  .feature-body,.cat-head,.map-head,.lab-head,.sec-head{text-align:center}
  .feature-body{max-width:none;margin-inline:auto}
  .feature-body .eyebrow,
  .sec-head .eyebrow{margin-inline:auto}
  .feature-body .lead,.feature-body p{margin-inline:auto}
  .feature-body .btn,.feature-body .magnet-btn{margin-inline:auto}
  .feature-body .feature-note{text-align:center}
  /* the shop rows keep their heading and "see all" link on one line, so they
     are the one head that must not be centred into a stack */
  .shop-section .sec-head{text-align:start}
}

/* =========================================================
   V3.0 — hero panel rhythm
   The panel's four blocks each carried a margin of their own, set at different
   times: the label 1.4rem, the mark .5/1.1rem, the sentence 1.4rem. Measured on
   screen the steps came out 27 / 22 / 0 — no relationship between them. They
   are set together here, on the same two-step scale the section heads use: a
   small step inside the block of text, a bigger one before anything clickable.
   ========================================================= */
.fh-panel-inner .eyebrow{margin-bottom:.8rem}
.fh-panel-inner .fh-logo{margin-block:0 1rem}
.fh-panel-inner .fh-tagline{margin-bottom:1rem}
.fh-panel-inner .fh-lead{margin-bottom:0}
.fh-panel-inner .hero-actions{margin-top:1.8rem}
.fh-panel-inner .fh-stats{margin-top:1.8rem}
@media (max-width:720px){
  .fh-panel-inner .eyebrow{margin-bottom:.7rem}
  .fh-panel-inner .fh-logo{margin-block:0 .85rem}
  .fh-panel-inner .fh-tagline{margin-bottom:0}
  .fh-panel-inner .hero-actions{margin-top:1.5rem}
}

/* =========================================================
   V3.1 — Elementor icons take the theme's colour
   ---------------------------------------------------------
   The theme's own icons are stroke-drawn with `stroke="currentColor"`, so
   setting `color` on the slot was enough. Elementor renders its icon library as
   SVGs painted with `fill`, and `fill` does not inherit from `color` — it
   defaults to black. Measured on the About page: fill rgb(0,0,0) against the
   card, which is 19.8 contrast in the light theme (harsh, and the wrong colour)
   and 1.29 in the dark one, where the icons were simply invisible.

   Pointing fill at currentColor hands them back to whatever the slot says, so
   both themes get the brand brown and nothing has to be restyled per theme.
   ========================================================= */
   Scoped to the theme's own widgets rather than to a list of slots: the first
   pass named the slots it knew about and missed the contact card, which still
   painted four black envelopes. Anything Elementor draws inside a noir widget
   now follows the slot's colour. */
[data-widget_type^="noir-"] svg.e-font-icon-svg{fill:currentColor}
.adv-item .ico svg,
.feature-note svg,
.lo svg,
.info-card svg,
.ct-fact-ic svg,
.noir-icon svg{fill:currentColor}
/* …except the parts a line icon deliberately leaves hollow. */
[data-widget_type^="noir-"] svg [fill="none"],
.adv-item .ico svg [fill="none"],
.info-card svg [fill="none"]{fill:none}

/* =========================================================
   V3.2 — newsletter: the field and its button are one control
   ---------------------------------------------------------
   The form is a flex row whose `align-items` was left at its initial value,
   which is `stretch`: the <input> grew to whatever the row happened to be while
   the button, being an inline-flex .btn with its own padding, did not. Measured
   on the journal page the two were 72.7px and 37.5px — a 35px mismatch with the
   button floating in the middle of the field's height.

   Centring the row stops the stretch, and giving both the same control height
   makes them a matched pair whatever the font size resolves to on the device.
   ========================================================= */
.noir-nl-form{align-items:center}
.noir-nl-form input[type="email"],
.noir-nl-form .btn{min-height:48px;box-sizing:border-box}
.noir-nl-form input[type="email"]{height:48px;padding-block:0;line-height:normal}
/* `.cafe-inner .btn{margin-top:2.2rem}` spaces the call to action in the café
   band; the newsletter form sits inside that band, so its submit inherited a
   35px top margin and dropped below the field it belongs beside. */
.noir-nl-form .btn{height:48px;padding-block:0;white-space:nowrap;margin:0}
/* the honeypot is out of the flow, but it also matches `.coupon input`; make
   sure it can never take a share of the row */
.noir-nl-form .noir-nl-hp{flex:0 0 0;width:0;min-height:0;height:0}

/* =========================================================
   V3.3 — brand advantages: one axis, not three
   ---------------------------------------------------------
   The widget is documented as "the centred heading and its icon row", and the
   heading was indeed centred (385px of slack either side). Nothing else was:
   the label above it sat hard against the start edge (1052 / 64) and inside
   each card the icon and text were start-aligned too. Three different axes in
   one section is what read as "not centred".
   ========================================================= */
#advantages .eyebrow{margin-inline:auto}
#advantages .adv-item{text-align:center}
#advantages .adv-item .ico{margin-inline:auto}

/* =========================================================
   V3.4 — the article page reads as one column
   ---------------------------------------------------------
   `.prose` caps its measure at 68ch, which is right for reading, but it is a
   plain block with no auto margin: in an RTL wrap it therefore pinned itself to
   the right edge. Under a full-width heading and a 1072px lead photograph that
   left 545px of empty page down the left-hand side — the "به‌هم‌ریختگی" on the
   article page.

   Centring the column, and bringing the photograph down to the same reading
   width, makes the heading, the picture and the text one stack on one axis.
   ========================================================= */
.single .article-hero,
.single .prose,
.single .comments .wrap > *{margin-inline:auto}
.single .article-hero{max-width:min(72ch, 100%)}
.single .prose{max-width:min(68ch, 100%)}
/* the head above them follows the same centre line */
.single .page-head .page-title,
.single .page-head .lead,
.single .page-head .post-meta{max-width:min(72ch, 100%);margin-inline:auto;text-align:center}
.single .page-head .breadcrumb{justify-content:center}


/* =========================================================
   V3.6 — «محصولات» panel, as cards
   The first attempt was one photograph beside a list of names, which read as a
   dropdown with a picture stuck to it. Each category now gets the medallion the
   rest of the site uses, so the panel previews the range rather than listing it.
   Desktop only — on a phone the header collapses to the drawer, where the plain
   link is the right answer.
   ========================================================= */
.nav-mega{position:static;display:inline-flex}
.nav-mega-trigger{display:inline-flex;align-items:center;gap:.35rem}
.nav-mega-caret{width:6px;height:6px;border-inline-end:1.5px solid currentColor;
  border-block-end:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);
  opacity:.55;transition:transform .25s var(--ease),opacity .25s var(--ease)}

/* Opaque, not --panel-2.

   That token is a translucent surface (.88 in light, .90 in dark) meant for
   panels that sit ON the page and are supposed to let a hint of it through. The
   menu floats OVER the page: at .88 the section heading and its paragraph read
   straight through the cards, which is why the text looked like it was printed
   on the photographs. A backdrop-filter blurs what is behind but does not hide
   it, so it could not rescue this either — the panel needs its own ground. */
.mega-panel{position:absolute;inset-inline:0;top:calc(100% + 1px);z-index:60;
  opacity:0;visibility:hidden;transform:translateY(-10px);
  transition:opacity .3s var(--ease),transform .3s var(--ease),visibility .3s;
  background:#f6f0e5;border-block:1px solid var(--line);
  box-shadow:0 34px 70px -38px rgba(30,18,8,.75)}
html[data-theme="dark"] .mega-panel{background:#1e1710}
.mega-inner{max-width:var(--maxw);margin-inline:auto;
  padding:clamp(1.4rem,2.6vw,2.2rem) var(--gut);
  display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:clamp(.6rem,1.6vw,1.4rem)}

.mega-card{display:flex;flex-direction:column;align-items:center;text-align:center;
  gap:.5rem;padding:1rem .8rem 1.1rem;border-radius:16px;
  border:1px solid transparent;
  transition:background .22s var(--ease),border-color .22s var(--ease),transform .22s var(--ease)}
.mega-card:hover{background:var(--panel);border-color:var(--line);transform:translateY(-3px)}
/* The ring must never be squeezed by a long description above or below it:
   a shrinking flex item would pull the photograph down under the title. */
.mega-ring{flex:0 0 auto;width:96px;height:96px;border-radius:50%;
  display:grid;place-items:center;position:relative;margin-bottom:.35rem;
  background:radial-gradient(circle at 50% 35%,rgba(201,156,102,.2),transparent 68%)}
.mega-ring::after{content:"";position:absolute;inset:-5px;border-radius:50%;
  border:1px solid var(--line-strong);opacity:.75}
/* Absolutely placed, not a grid item. As a centred grid item, `height:100%`
   had no resolvable basis — the track sized itself to the image and the image
   sized itself to the track — so it fell back to the 120px height attribute
   inside a 96px ring: a 96×120 egg hanging out of its circle. And `contain`
   letterboxed the 720×900 photographs, which inside a round mask showed up as
   two straight chords down the sides. Absolute against the ring's own box
   resolves both: a real circle, filled. */
.mega-ring img{position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;border-radius:50%;
  filter:drop-shadow(0 12px 20px rgba(40,24,10,.35))}
.mega-ring-all{font-size:1.6rem;color:var(--accent-soft);
  background:radial-gradient(circle at 50% 40%,rgba(201,156,102,.14),transparent 70%)}
.mega-card b{font-size:1.05rem;font-weight:700;color:var(--text)}
/* Two lines, so one wordy category cannot make its card taller than the rest. */
.mega-desc{font-size:.82rem;color:var(--muted);line-height:1.6;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mega-count{font-style:normal;font-size:.78rem;color:var(--accent-soft);
  font-variant-numeric:tabular-nums;margin-top:auto}

@media (min-width:901px) and (hover:hover){
  .nav-mega:hover .mega-panel{opacity:1;visibility:visible;transform:none}
  .nav-mega:hover .nav-mega-caret{transform:rotate(45deg) translateY(0);opacity:1}
}
.nav-mega:focus-within .mega-panel,
.nav-mega.is-open .mega-panel{opacity:1;visibility:visible;transform:none}

@media (max-width:900px){
  .nav-mega{display:contents}
  .mega-panel{display:none}
}

/* =========================================================
   Section rhythm on a phone
   ---------------------------------------------------------
   Two earlier passes already set a tighter `padding-block` for small screens
   (§E and §D above), and both were dead: the global rule that opens the "one
   notch down" section is written later in this file, so it wins over anything
   a media query said before it. Measured on a 390×844 phone, every section was
   still padding 61px at the top and 61px at the bottom — 122px of nothing
   between one block of content and the next, before the branch divider adds
   its own.

   The other half of the problem is the unit. `vh` scales this padding with the
   height of the screen, so a tall phone got *more* air between sections than a
   laptop, which is backwards: the taller the screen, the more content should
   fit on it. Width is what is actually scarce on a phone, so this scales with
   `vw` and lands at 34px.

   Last in the file on purpose — it has to outrank the global rule above it.
   ========================================================= */
@media (max-width: 720px) {
  .section { padding-block: clamp(34px, 8vw, 48px) }
  /* The dividers between sections carry their own negative margins; with the
     sections this close they no longer need to pull as hard. */
  .branch-sep { margin-top: clamp(-90px, -14vw, -40px); margin-bottom: clamp(-70px, -11vw, -32px) }
}

/* NOIR mobile layout repair — desktop rules above remain unchanged. */
@media (max-width:767px) {
  .eyebrow,.h-lg,.h-md,.fh-tagline,.cat-card h3,.product-card h3 {letter-spacing:0!important;word-spacing:normal;font-kerning:normal}
  .h-lg {font-size:clamp(1.35rem,5.5vw,1.8rem);line-height:1.65}
  .section {padding-block:36px}
  .feature:has(.statue-fig) {display:flex;flex-direction:column;gap:18px}
  .feature:has(.statue-fig) > .statue-fig {order:0!important;width:100%;margin:0}
  .feature:has(.statue-fig) > .feature-body {order:1!important;width:100%}
  .feature .statue-fig img {width:min(320px,82vw);height:auto;max-height:380px;object-fit:contain}
  .cat-grid {grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px}
  .cat-grid .cat-card {min-width:0;padding:14px 10px;display:flex;flex-direction:column;align-items:center}
  .cat-grid .cat-card p {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.7;min-height:3.4em;max-height:3.4em;margin-block:6px}
  .cat-grid .cat-card .go {margin-top:auto;padding-top:10px}
  .fhero {height:auto;min-height:0;padding-top:var(--nav-h,62px);--fh-shift:0px}
  .fhero .fh-video,.fhero.done .fh-video {position:relative;display:block;inset:auto;top:auto;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;object-position:center;transform:none!important;animation:none!important}
  .fhero .fh-content {position:relative;inset:auto;display:block;pointer-events:auto}
  .fhero .fh-panel {width:100%;padding:16px 18px 18px;transform:none!important;opacity:1;background:#0b0703;backdrop-filter:none}
  .fhero .fh-panel::before {display:none}
  .fhero .fh-panel-inner,.fhero .fh-panel-inner>* {animation:none!important;opacity:1;transform:none!important;filter:none;transition:none}
  .fhero .fh-shade,.fhero .fh-loader,.fhero .fh-load,.fhero .fh-bar,.fhero .fh-cue {display:none}
  .fhero .fh-logo {width:160px;max-width:48vw;margin-block:0 12px}
  .fhero .fh-tagline {font-size:clamp(1.15rem,4.8vw,1.5rem);line-height:1.65;margin-bottom:0}
  .fhero .hero-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;margin-top:12px;gap:8px}
  .fhero .hero-actions .btn {flex:none;width:100%;box-sizing:border-box;height:44px;min-height:44px;max-height:44px;min-width:0;margin:0;font-size:.8rem;line-height:1.4;padding:8px 6px;justify-content:center;white-space:nowrap}
}
