/* =========================================================
   NOIR — VINTAGE re-skin (loads after style.css + pages.css)
   Parchment sky · classical statues · ornate frames
   Light (default) = aged paper · Dark = deep roasted brown
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root,
html[data-theme="light"]{
  --bg:#e9e1d2;
  --bg-2:#efe8da;
  --panel:rgba(252,248,240,.80);
  --panel-2:rgba(246,240,229,.88);
  --green-deep:#e6d7bf;           /* soft tan tint (hover/banner) */
  --green:#7d5433;
  --accent:#7d5433;               /* CTA brown */
  --accent-soft:#8a5a2f;          /* links / eyebrows */
  --sage:#7c6249;
  --text:#3f2d1d;
  --muted:#6f5540;
  --muted-2:#96806a;
  --line:rgba(84,58,36,.16);
  --line-strong:rgba(84,58,36,.30);
}
html[data-theme="dark"]{
  --bg:#171009;
  --bg-2:#1e1710;
  --panel:rgba(40,30,20,.82);
  --panel-2:rgba(48,36,24,.90);
  --green-deep:#2e2013;
  --green:#8a5f38;
  --accent:#a5793f;
  --accent-soft:#d3a670;
  --sage:#b49877;
  --text:#f0e6d6;
  --muted:#c5b096;
  --muted-2:#8d7a63;
  --line:rgba(240,225,200,.14);
  --line-strong:rgba(240,225,200,.28);
}

/* ---------- 2. Site background (painted sky) ---------- */
body,
html[data-theme="light"] body,
html[data-theme="dark"] body{
  background:var(--bg) url("../assets/bg-sky.webp") center / cover no-repeat;
  color:var(--text);
}
@media (hover:hover) and (min-width:900px){
  body,html[data-theme="light"] body,html[data-theme="dark"] body{background-attachment:fixed}
}
/* wash overlay so text stays readable over the painting */
body::before,
html[data-theme="light"] body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(120% 90% at 50% 0%,rgba(240,231,214,.10),transparent 60%),
    linear-gradient(180deg,rgba(238,229,212,.34),rgba(236,226,208,.22));
}
html[data-theme="dark"] body::before{
  background:linear-gradient(180deg,rgba(18,12,7,.86),rgba(14,9,5,.90));
}
::selection{background:var(--accent);color:#f7edda}
.grain{opacity:.14;mix-blend-mode:multiply}
html[data-theme="dark"] .grain{opacity:.22;mix-blend-mode:overlay}

/* ---------- 3. Nav ---------- */
.nav.scrolled{background:rgba(246,240,228,.82);border-bottom-color:var(--line)}
html[data-theme="dark"] .nav.scrolled{background:rgba(23,16,9,.82)}
.mobile-menu{background:rgba(240,232,217,.97)}
html[data-theme="dark"] .mobile-menu{background:rgba(20,14,8,.97)}
.brand-logo{height:26px;width:auto;display:block}
/* logo swap per theme (light default) */
.only-dark{display:none}.only-light{display:block}
html[data-theme="dark"] .only-dark{display:block}
html[data-theme="dark"] .only-light{display:none}

/* ---------- 4. Buttons ---------- */
.btn-primary{background:var(--accent);color:#f7edda;
  box-shadow:0 14px 30px -14px rgba(90,58,30,.55)}
.btn-primary:hover{background:#8f6340;color:#fff}
/* In dark mode a filled button is a bright shape carrying a dark label, and
   `--accent` was not bright enough for the job: #1d1207 on #a5793f measures
   4.74:1, which passes the letter of AA and fails on a phone — «همکاری با نوآر»
   at 15px was there and unreadable. `--accent-soft` is the same gold one step
   up, and is already this button's own hover colour, so nothing new enters the
   palette. Measured after: 8.3:1. */
html[data-theme="dark"] .btn-primary{background:var(--accent-soft);color:#1b1105;font-weight:700}
html[data-theme="dark"] .btn-primary:hover{background:#e5c093;color:#1b1105}
/* Same pairing on the product cards' add button, which had cream on the darker
   gold — 3.35:1, the worst of the set. */
html[data-theme="dark"] .add-btn{color:#1b1105;font-weight:700}
.btn-ghost{border-color:var(--line-strong);color:var(--text);background:rgba(255,252,244,.35)}
.btn-ghost:hover{border-color:var(--accent);color:var(--accent-soft);background:rgba(255,252,244,.6)}
html[data-theme="dark"] .btn-ghost{background:rgba(40,30,20,.4)}
.add-btn{background:var(--accent);color:#f7edda}
.add-btn:hover{background:#8f6340}
html[data-theme="dark"] .add-btn{color:#1d1207}
.cart-count{background:var(--accent);color:#f7edda}
html[data-theme="dark"] .cart-count{color:#1d1207}
.qty-control{background:var(--green-deep);border-color:var(--accent)}
.qty-control button{background:var(--accent);color:#f7edda}
.qty-control button:hover{background:#8f6340}
html[data-theme="dark"] .qty-control button{color:#1d1207}
.toast-view{background:var(--accent);color:#f7edda}
html[data-theme="dark"] .toast-view{color:#1d1207}
.mc-q button:hover{background:var(--accent);color:#f7edda}

/* magnet bean button — vintage brown w/ glow + grain */
.magnet-btn{background:#5c3d22;color:#f5e9d4;border:1px solid rgba(122,84,48,.55)}
.magnet-btn::after{background:radial-gradient(circle at 50% 120%,rgba(190,140,84,.55),transparent 60%)}
.magnet-btn:hover{border-color:#c99c66;color:#fff;
  box-shadow:0 0 34px -6px rgba(150,102,54,.65)}

/* ---------- 5. Cards & overlays ---------- */
.cat-card,.adv-item,.origin-detail,.feature-note,
.product-card,.acct-panel,.info-card,.post,.post-featured,
.article-card,.mini-cart{box-shadow:0 22px 45px -28px rgba(70,45,22,.35)}
.cat-card,.adv-item{background:var(--panel);border-color:var(--line)}
.cat-card::before{background:radial-gradient(120% 80% at 80% 0%,rgba(150,105,60,.12),transparent 60%)}
.adv-grid{background:transparent;border:0;gap:1rem;border-radius:0;overflow:visible}
.adv-item{border:1px solid var(--line);border-radius:16px}
.map-hint{background:rgba(252,248,238,.85);color:var(--muted);border-color:var(--line)}
html[data-theme="dark"] .map-hint{background:rgba(30,22,14,.85)}
.map-tip{background:rgba(252,248,238,.95);color:var(--text);border-color:var(--line-strong)}
html[data-theme="dark"] .map-tip{background:rgba(30,22,14,.95)}
.map-tip b{color:var(--accent-soft)}
.product-card .tag{background:rgba(250,244,232,.88);color:var(--accent-soft);border-color:var(--line)}
html[data-theme="dark"] .product-card .tag{background:rgba(30,22,14,.85)}
.am-close{background:rgba(250,244,232,.8);color:var(--text)}
html[data-theme="dark"] .am-close{background:rgba(30,22,14,.8)}
.article-card .am-hero::after{background:linear-gradient(180deg,transparent,rgba(236,226,208,.55))}
html[data-theme="dark"] .article-card .am-hero::after{background:linear-gradient(180deg,transparent,rgba(20,14,8,.8))}
.auth-tabs{background:rgba(84,58,36,.08);border-color:var(--line)}
html[data-theme="dark"] .auth-tabs{background:rgba(0,0,0,.3)}
.cafe{background:transparent;border-block:0}
.origin-banner{background:var(--green-deep);border-color:var(--accent)}
.origin-banner b,.origin-banner a,.origin-banner .ob-all{color:var(--accent-soft)}

/* ---------- 6. Branch separator (true full divider) ---------- */
.branch-sep{position:relative;z-index:2;pointer-events:none;
  margin:clamp(-130px,-9vw,-70px) auto;display:flex;justify-content:center;align-items:center}
.branch-sep img{width:min(1460px,100vw);max-width:100%;height:auto;
  filter:drop-shadow(0 26px 38px rgba(60,38,18,.34))}
/* hairlines flowing out of the branch, selling the "divider" read */
.branch-sep::before,.branch-sep::after{content:"";position:absolute;top:50%;height:1px;
  width:clamp(30px,12vw,220px);
  background:linear-gradient(90deg,transparent,var(--line-strong));opacity:.9}
.branch-sep::before{inset-inline-start:0;transform:scaleX(-1)}
.branch-sep::after{inset-inline-end:0}
html[data-theme="dark"] .branch-sep img{filter:drop-shadow(0 26px 38px rgba(0,0,0,.55)) brightness(.92)}

/* ---------- 7. Vintage HERO ---------- */
.hero-vin{position:relative;min-height:100svh;display:flex;align-items:center;
  overflow:hidden;padding-block:calc(var(--nav-h) + 30px) 40px}
.hero-vin .wrap{display:grid;grid-template-columns:.92fr 1.08fr;
  gap:clamp(1.5rem,4vw,3.4rem);align-items:center;width:100%}
.hero-logo{width:min(360px,64%);height:auto;margin-block:.4rem 1.2rem}
.hero-statue{position:relative;display:flex;justify-content:center;align-items:flex-end}
.hero-statue img{width:min(430px,88%);height:auto;
  filter:drop-shadow(0 40px 50px rgba(55,34,16,.38));
  animation:statueFloat 7s ease-in-out infinite;
  transition:transform .6s var(--ease)}
.hero-statue:hover img{transform:scale(1.025) rotate(.4deg)}
@keyframes statueFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.hero-statue::after{content:"";position:absolute;inset-inline:18%;bottom:-6px;height:26px;
  background:radial-gradient(50% 100% at 50% 50%,rgba(60,38,18,.30),transparent 70%);
  border-radius:50%}
html[data-theme="dark"] .hero-statue img{filter:drop-shadow(0 40px 50px rgba(0,0,0,.6))}
.hero-vin .hero-tagline{color:var(--text)}
.hero-vin .hero-stats b{color:var(--accent-soft)}
.bean-field .bean{color:#6d4a2a}

/* ---------- 8. Statue feature sections ---------- */
.statue-fig{position:relative;display:flex;justify-content:center;align-items:flex-end;min-height:340px}
.statue-fig img{width:min(400px,92%);height:auto;
  filter:drop-shadow(0 34px 44px rgba(55,34,16,.34));
  transition:transform .6s var(--ease)}
.statue-fig:hover img{transform:translateY(-8px) scale(1.02)}
.statue-fig::after{content:"";position:absolute;inset-inline:20%;bottom:-4px;height:22px;
  background:radial-gradient(50% 100% at 50% 50%,rgba(60,38,18,.28),transparent 70%);border-radius:50%}
html[data-theme="dark"] .statue-fig img{filter:drop-shadow(0 34px 44px rgba(0,0,0,.58))}

/* ---------- 9. Category cards — refined ring composition ---------- */
.cat-head{flex-direction:column;align-items:center;text-align:center;gap:.6rem}
.cat-head .eyebrow{justify-content:center}
.cat-head .lead{margin-inline:auto}
.cat-card{padding:1.2rem 1rem 1.5rem;text-align:center;border-radius:24px;
  background:transparent;border:1px solid transparent;box-shadow:none;
  transition:transform .5s var(--ease),background .5s var(--ease),
             border-color .5s var(--ease),box-shadow .5s var(--ease)}
.cat-card::before{display:none}
.cat-card:hover{transform:translateY(-8px);background:var(--panel);
  border-color:var(--line);box-shadow:0 26px 50px -30px rgba(70,45,22,.45)}
.cat-ring{position:relative;display:block;width:min(200px,78%);aspect-ratio:1;
  margin:0 auto 1.2rem}
/* double ring: solid inner + dashed outer that spins on hover */
.cat-ring::before{content:"";position:absolute;inset:-9px;border-radius:50%;
  border:1px dashed var(--line-strong);transition:transform 1s var(--ease),border-color .4s}
.cat-ring::after{content:"";position:absolute;inset:-3px;border-radius:50%;
  border:1px solid var(--line)}
.cat-card:hover .cat-ring::before{transform:rotate(40deg);border-color:var(--accent)}
.cat-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;
  box-shadow:0 20px 32px -18px rgba(60,38,18,.55);
  transition:transform .6s var(--ease)}
.cat-card:hover .cat-photo{transform:scale(1.06)}
.cat-num{position:absolute;z-index:2;inset-block-start:2px;inset-inline-start:2px;
  width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--accent);color:#f7edda;font-size:.78rem;font-weight:700;
  box-shadow:0 6px 14px -6px rgba(70,45,22,.6);border:2px solid rgba(255,250,240,.7)}
html[data-theme="dark"] .cat-num{color:#1d1207;border-color:rgba(30,22,14,.7)}
.cat-card h3{font-size:1.15rem;margin-bottom:.2rem}
.cat-card p{font-size:0.88rem;color:var(--muted);margin-top:.2rem}
.cat-card .go{justify-content:center;margin-inline:auto;color:var(--accent-soft)}

/* ---------- 9b. Hero cinema (interactive fresco video) ---------- */
.hero-cine{position:relative;display:block;perspective:1000px;cursor:pointer}
.hero-cine video{display:block;width:100%;height:auto;border-radius:26px;
  -webkit-mask-image:radial-gradient(135% 120% at 50% 45%,#000 62%,transparent 97%);
          mask-image:radial-gradient(135% 120% at 50% 45%,#000 62%,transparent 97%);
  filter:saturate(1.02);will-change:transform;
  transition:transform .5s var(--ease)}
.hero-cine:hover video{transform:scale(1.015)}
.hc-toggle{position:absolute;z-index:3;inset-block-end:16px;inset-inline-start:16px;
  width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:rgba(250,244,232,.85);color:var(--accent);border:1px solid var(--line-strong);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  opacity:0;transform:translateY(8px);
  transition:opacity .35s var(--ease),transform .35s var(--ease),background .3s;
  box-shadow:0 12px 26px -12px rgba(60,38,18,.5)}
.hc-toggle svg{width:19px;height:19px}
.hc-toggle .ic-play{display:none}
.hero-cine.paused .hc-toggle .ic-play{display:block}
.hero-cine.paused .hc-toggle .ic-pause{display:none}
.hero-cine:hover .hc-toggle,.hero-cine.paused .hc-toggle{opacity:1;transform:none}
.hc-toggle:hover{background:#fff}
html[data-theme="dark"] .hc-toggle{background:rgba(34,25,16,.85);color:var(--accent-soft)}
html[data-theme="dark"] .hc-toggle:hover{background:rgba(48,36,24,.95)}
.hc-hint{position:absolute;z-index:3;inset-block-end:26px;inset-inline-end:18px;
  font-size:0.78rem;color:var(--muted);background:var(--panel);border:1px solid var(--line);
  border-radius:999px;padding:.3em .9em;opacity:0;transform:translateY(6px);
  transition:opacity .35s var(--ease) .1s,transform .35s var(--ease) .1s;pointer-events:none}
.hero-cine:hover .hc-hint{opacity:1;transform:none}
.hero-cine.paused .hc-hint{opacity:0}

/* ---------- 10. Vintage MAP ---------- */
.map-frame.vintage{border:0;background:transparent;padding:0;overflow:visible}
.map-frame.vintage::before{display:none}
.map-img{width:100%;height:auto;display:block;
  filter:drop-shadow(0 26px 40px rgba(60,38,18,.30))}
html[data-theme="dark"] .map-img{filter:drop-shadow(0 26px 40px rgba(0,0,0,.55)) brightness(.9)}
.origins-layer{position:absolute;inset:0}
.origin{position:absolute;left:var(--x);top:var(--y);width:26px;height:26px;
  transform:translate(-50%,-50%);cursor:pointer}
.origin .dot{position:absolute;inset:50%;width:10px;height:10px;margin:-5px 0 0 -5px;
  border-radius:50%;background:#6f4426;border:2px solid #f3e6cd;
  box-shadow:0 0 0 1px rgba(90,58,30,.5),0 2px 6px rgba(60,38,18,.5);
  transition:transform .3s var(--ease),background .3s var(--ease)}
.origin .halo{position:absolute;inset:50%;width:12px;height:12px;margin:-6px 0 0 -6px;
  border-radius:50%;border:1.5px solid rgba(111,68,38,.6);
  animation:vinPulse 2.4s var(--ease) infinite}
.origin:hover .dot,.origin.active .dot{background:#a5793f;transform:scale(1.35)}
.origin.active .halo{border-color:rgba(165,121,63,.8)}
@keyframes vinPulse{0%{transform:scale(.6);opacity:.9}100%{transform:scale(2.6);opacity:0}}
html[data-theme="dark"] .origin .dot{border-color:#241a10}
/* staggered dot reveal when the map scrolls in */
.map-frame .origin{opacity:0;scale:.3;transition:opacity .5s var(--ease),scale .55s cubic-bezier(.2,1.4,.4,1)}
.map-frame.revealed .origin{opacity:1;scale:1}
.map-frame.revealed .origin:nth-child(2){transition-delay:.10s}
.map-frame.revealed .origin:nth-child(3){transition-delay:.16s}
.map-frame.revealed .origin:nth-child(4){transition-delay:.22s}
.map-frame.revealed .origin:nth-child(5){transition-delay:.28s}
.map-frame.revealed .origin:nth-child(6){transition-delay:.34s}
.map-frame.revealed .origin:nth-child(7){transition-delay:.40s}
.map-frame.revealed .origin:nth-child(8){transition-delay:.46s}
.map-frame.revealed .origin:nth-child(9){transition-delay:.52s}
.map-frame.revealed .origin:nth-child(10){transition-delay:.58s}
/* traveling selection ring — glides between countries */
.sel-ring{position:absolute;left:var(--x,50%);top:var(--y,50%);width:34px;height:34px;
  transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;opacity:0;
  border:2px solid var(--accent);
  box-shadow:0 0 0 5px rgba(125,84,51,.14),0 8px 18px -8px rgba(60,38,18,.6);
  transition:left .7s cubic-bezier(.3,1.25,.4,1),top .7s cubic-bezier(.3,1.25,.4,1),opacity .4s}
.sel-ring.show{opacity:1}
.sel-ring::after{content:"";position:absolute;inset:-9px;border-radius:50%;
  border:1px dashed rgba(125,84,51,.5);animation:selSpin 9s linear infinite}
@keyframes selSpin{to{transform:rotate(360deg)}}
/* detail card crossfade on change */
.origin-detail>*{animation:odIn .45s var(--ease) both}
@keyframes odIn{from{opacity:0;transform:translateY(7px);filter:blur(4px)}to{opacity:1;transform:none;filter:blur(0)}}
/* origin list micro-interactions */
.origin-list li{transition:transform .35s var(--ease),background .35s var(--ease),border-color .35s var(--ease)}
.origin-list li:active{transform:scale(.97)}
.origin-list li{background:var(--panel);border-color:var(--line);border-radius:12px}
.origin-list li:hover,.origin-list li.active{background:var(--panel-2);border-color:var(--accent)}
.origin-list .pin{background:var(--accent);box-shadow:0 0 0 3px rgba(125,84,51,.18)}
.origin-detail{background:var(--panel);border-color:var(--line)}

/* ---------- 11. Ornate frame products ---------- */
.product-card{background:transparent;border:0;box-shadow:none;overflow:visible;text-align:center}
.product-card:hover{transform:translateY(-8px)}
.product-card .ph{background:transparent;border-radius:0;aspect-ratio:1/1;overflow:visible}
.product-card .ph img{position:absolute;inset:13.5%;width:73%;height:73%;
  border-radius:50%;object-fit:cover;filter:none;
  box-shadow:0 18px 34px -14px rgba(50,32,15,.5)}
.product-card:hover .ph img{transform:scale(1.045);filter:none}
.product-card .ph::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:url("../assets/frame-ornate.webp") center/contain no-repeat;
  filter:drop-shadow(0 16px 24px rgba(55,34,16,.35));
  transition:transform .45s var(--ease)}
.product-card:hover .ph::after{transform:rotate(1.2deg)}
html[data-theme="dark"] .product-card .ph::after{filter:drop-shadow(0 16px 24px rgba(0,0,0,.55))}
.product-card .tag{inset-inline-end:6%;inset-block-start:6%;z-index:3}
.product-card .body{align-items:center;padding-top:.4rem}
.product-card .price-row{width:100%;justify-content:center;gap:1rem}
/* product page gallery */
.pd-main{border:0;background:transparent;position:relative;overflow:visible}
.pd-main::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:url("../assets/frame-ornate.webp") center/contain no-repeat;
  filter:drop-shadow(0 20px 30px rgba(55,34,16,.35))}
.pd-main img{position:absolute;inset:13.5%;width:73%;height:73%;border-radius:50%;object-fit:cover}
.pd-thumb{border-radius:50%}

/* ---------- 12. Footer (painted plants, fades out of the sky bg) ---------- */
.footer{position:relative;border-top:0;margin-top:clamp(40px,6vh,80px);
  padding-block:clamp(140px,18vh,220px) 34px;background:none}
.footer::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url("../assets/bg-footer.webp") center bottom / cover no-repeat;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.45) 16%,#000 38%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.45) 16%,#000 38%)}
.footer::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(236,226,208,0),rgba(233,222,201,.4));
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 34%);
          mask-image:linear-gradient(180deg,transparent 0,#000 34%)}
html[data-theme="dark"] .footer::after{background:linear-gradient(180deg,rgba(18,12,7,0),rgba(14,9,5,.85));
  -webkit-mask-image:none;mask-image:none;
  background:linear-gradient(180deg,rgba(18,12,7,.2) 0,rgba(16,10,6,.82) 40%,rgba(14,9,5,.86))}
.footer .wrap{position:relative;z-index:2}
.footer-top{background:var(--panel);border:1px solid var(--line);border-radius:20px;
  padding:2rem;box-shadow:0 24px 50px -30px rgba(60,38,18,.4)}
.footer-bottom{color:var(--text);margin-top:1.2rem}
.footer-bottom span{background:var(--panel);border:1px solid var(--line);
  padding:.45em 1em;border-radius:999px;font-size:0.82rem}

/* Trust seals, in the brand column under the blurb. The issuer's own artwork is
   a fixed-size raster on a light ground, so it is given a white card to sit on
   and a cap on how large it may draw — its colours and proportions are not ours
   to restyle.

   [hidden] is set by main.js when the image fails to load. اینماد only serves
   the badge to requests coming from the registered domain, so on a staging or
   local copy it answers 400 and an unguarded card would be a blank white box. */
.footer-seals{display:flex;flex-wrap:wrap;align-items:center;gap:.8rem;margin-top:1.3rem}
.footer-seals[hidden]{display:none}
.footer-seals a{display:inline-flex;padding:.5rem;border-radius:12px;
  background:#fff;border:1px solid var(--line);line-height:0;
  transition:transform .25s var(--ease),box-shadow .25s var(--ease)}
.footer-seals a:hover{transform:translateY(-2px);
  box-shadow:0 14px 26px -16px rgba(0,0,0,.55)}
.footer-seals img{display:block;width:auto;height:auto;max-width:96px;max-height:96px}
@media (max-width:760px){
  .footer-seals{justify-content:center}
}

/* ---------- 12b. Animated theme switch ---------- */
/* circular reveal via View Transitions API (Chromium) */
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
::view-transition-new(root){
  animation:themeReveal .6s cubic-bezier(.3,.7,.3,1) both;
}
@keyframes themeReveal{
  from{clip-path:circle(0px at var(--theme-x,90%) var(--theme-y,36px))}
  to{clip-path:circle(150vmax at var(--theme-x,90%) var(--theme-y,36px))}
}
/* graceful fallback: brief global color transition */
html.theme-anim body,
html.theme-anim body::before,
html.theme-anim .nav,
html.theme-anim .footer::after,
html.theme-anim *{transition:background-color .5s var(--ease),color .5s var(--ease),
  border-color .5s var(--ease),fill .5s var(--ease),opacity .5s var(--ease) !important}

/* ---------- 13. misc fixes for re-skin ---------- */
.hero-mark{background:none;-webkit-text-fill-color:currentColor;color:var(--text)}
.eyebrow{color:var(--accent-soft)}
.eyebrow::before{background:var(--accent)}
.steps .step.active .n{background:var(--accent);color:#f7edda;border-color:var(--accent)}
html[data-theme="dark"] .steps .step.active .n{color:#1d1207}
.mc-checkout{color:#f7edda}
html[data-theme="dark"] .mc-checkout{color:#1d1207}
.acct-avatar{background:linear-gradient(150deg,#a5793f,#6f4426);color:#f7edda}
.hero-badge b{color:var(--accent-soft)}
.scroll-cue .line{background:linear-gradient(var(--accent),transparent)}
.scroll-cue .line::after{background:var(--accent-soft)}

/* ---------- 13b. Auth / login (vintage glass) ---------- */
.auth-bg{background:url("../assets/bg-footer.webp") center/cover;
  filter:blur(6px) brightness(1.02) saturate(.9);transform:scale(1.1)}
html[data-theme="dark"] .auth-bg{filter:blur(6px) brightness(.5) saturate(.8)}
.auth-overlay{background:radial-gradient(110% 90% at 50% 18%,rgba(236,226,208,.30),rgba(233,222,201,.72))}
html[data-theme="dark"] .auth-overlay{background:radial-gradient(110% 90% at 50% 18%,rgba(40,28,16,.4),rgba(14,9,5,.9))}
.auth-card{background:linear-gradient(160deg,rgba(255,251,242,.68),rgba(252,246,234,.5));
  border:1px solid rgba(120,86,52,.28);
  box-shadow:0 40px 90px -35px rgba(70,45,22,.5),inset 0 1px 0 rgba(255,255,255,.5)}
html[data-theme="dark"] .auth-card{background:linear-gradient(160deg,rgba(52,38,25,.7),rgba(34,25,16,.6));
  border-color:rgba(240,225,200,.16);
  box-shadow:0 40px 90px -35px rgba(0,0,0,.85),inset 0 1px 0 rgba(255,255,255,.08)}
.auth-top a.back{color:var(--muted)}

/* ---------- 14. Responsive ---------- */
@media (max-width:900px){
  .hero-vin .wrap{grid-template-columns:1fr;gap:1.6rem;text-align:center}
  .hero-vin .hero-actions{justify-content:center}
  .hero-vin .hero-stats{justify-content:center}
  .hero-vin .eyebrow{justify-content:center}
  .hero-logo{margin-inline:auto}
  .hero-statue{order:-1;margin-top:.5rem}
  .hero-statue img{width:min(300px,72%)}
  .statue-fig{min-height:0}
  .statue-fig img{width:min(300px,80%)}
  .branch-sep{margin:clamp(-44px,-5vw,-26px) auto}
}
@media (max-width:560px){
  .hero-logo{width:min(240px,70%)}
  .footer{padding-top:110px}
  .product-card .ph img{inset:14%;width:72%;height:72%}
}
@media (prefers-reduced-motion:reduce){
  .hero-statue img{animation:none}
}

/* =========================================================
   SHARED FIXES — shop readability · dark footer · a11y
   ========================================================= */

/* ---- shop: product text readability (both themes) ---- */
.product-card .body{
  background:rgba(252,247,238,.78);border:1px solid var(--line);border-radius:16px;
  padding:1rem 1.1rem 1.15rem;margin-top:.55rem;gap:.4rem;width:100%;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  box-shadow:0 14px 30px -22px rgba(70,45,22,.5)}
html[data-theme="dark"] .product-card .body{
  background:rgba(28,21,14,.82);border-color:rgba(240,228,208,.14);
  box-shadow:0 14px 30px -20px rgba(0,0,0,.6)}
.product-card h3{font-size:1.15rem;font-weight:800;letter-spacing:0;line-height:1.5}
.product-card .meta{font-size:0.82rem;line-height:1.75;color:var(--muted)}
html[data-theme="dark"] .product-card .meta{color:#c4b29a}
/* margin-top stays `auto` (set in pages.css): it is what pins the price and
   the buy button to the bottom of the card, so every card in a row lines
   them up whatever the description above happens to be. This rule used to
   set .35rem here and quietly cancelled that. */
.product-card .price-row{padding-top:.85rem;border-top:1px dashed var(--line)}
.price{font-size:1.15rem;font-weight:800}
.price small{font-size:0.78rem;margin-top:.1rem}
html[data-theme="dark"] .price{color:#f2e7d5}
.shop-section .sec-head h2{letter-spacing:0}
.shop-section .sec-head span{font-weight:600}
.add-btn{padding:.68em 1.2em;font-size:.88rem}
.qty-control{padding:.32rem .4rem}

/* ---- footer: dark-mode hierarchy & contrast ---- */
html[data-theme="dark"] .footer::after{
  background:linear-gradient(180deg,rgba(16,11,7,.35) 0,rgba(15,10,6,.9) 42%,rgba(13,9,5,.94))}
html[data-theme="dark"] .footer-top{
  background:rgba(30,22,15,.92);border-color:rgba(240,228,208,.16);
  box-shadow:0 30px 60px -35px rgba(0,0,0,.8)}
html[data-theme="dark"] .footer .footer-col h5{color:var(--accent-soft)}
html[data-theme="dark"] .footer .footer-col a{color:#cfc0aa}
html[data-theme="dark"] .footer .footer-col a:hover{color:var(--accent-soft)}
html[data-theme="dark"] .footer .lead{color:#b6a68f}
html[data-theme="dark"] .footer-bottom span{
  background:rgba(30,22,15,.9);border-color:rgba(240,228,208,.15);color:#cfc0aa}
.footer .footer-col h5{font-size:0.82rem;letter-spacing:.18em;margin-bottom:1.3rem}
.footer .footer-col a{padding-block:.42rem;font-size:0.95rem;
  transition:color .3s var(--ease),padding-inline-start .3s var(--ease)}
.footer-top{gap:2.8rem;row-gap:2rem}
.footer-bottom{gap:.8rem}

/* ---- global focus-visible (a11y, keyboard) ---- */
a:focus-visible,button:focus-visible,input:focus-visible,
[tabindex]:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.btn:focus-visible,.add-btn:focus-visible{outline-offset:3px}

/* ---- perf: contain heavy repaint areas ---- */
.product-card,.post,.cat-card{contain:layout paint}
.hero-cine video{transform:translateZ(0)}

/* =========================================================
   FIX — seamless body→footer fade in dark mode
   (image darkened + late mask; overlay transparent at top so
   the real body shows through with zero seam)
   ========================================================= */
html[data-theme="dark"] .footer::before{
  filter:brightness(.45) saturate(.8);
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.35) 30%,#000 60%);
          mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.35) 30%,#000 60%)}
html[data-theme="dark"] .footer::after{
  -webkit-mask-image:none;mask-image:none;
  background:linear-gradient(180deg,transparent 0,rgba(15,10,6,.42) 45%,rgba(13,9,5,.58) 100%)}


/* NOIR origins: pins stay visible without a reveal observer. */
#origins .origins-layer{z-index:2;pointer-events:none}
#origins .origin{pointer-events:auto;padding:0;border:0;background:transparent;opacity:1;scale:1;z-index:1}
#origins .origin.active{z-index:3}
#origins .origin .dot{width:20px;height:26px;margin:-26px 0 0 -10px;background:transparent;border:0;border-radius:0;box-shadow:none;transform:none;line-height:0}
#origins .origin-pin{display:block;width:20px;height:26px;overflow:visible;fill:#79502d;stroke:#fff0ce;stroke-width:1.6;filter:drop-shadow(0 2px 2px rgba(0,0,0,.45))}
#origins .origin-pin circle{fill:#fff0ce;stroke:none}
#origins .origin:hover .origin-pin,#origins .origin.active .origin-pin{fill:#3e2718;stroke:#fff7e7;stroke-width:2}
#origins .origin:focus-visible{outline:2px solid var(--accent-soft);outline-offset:3px;border-radius:50%}
#origins .origin-list li:focus-visible{outline:2px solid var(--accent-soft);outline-offset:2px}
@media(prefers-reduced-motion:reduce){#origins .origin .halo,#origins .sel-ring::after{animation:none}#origins .origin,#origins .sel-ring{transition:none}}
