/* Home: "What we fix" carousel — the first section. Partner of js/pages/home-hero.js.
   v4 (Sir, Nov 1): Glassy carousel based on @code.xr (Instagram reel Dc780oszZqM).
   Their reel shows only the first 10 lines of Carousel.jsx (useState + an image list); the rest (cards, slots, glass, spring,
   player bar, modal) is rebuilt from the video frame by frame. Notes + measurements: ../reference-codexr-carousel.md
   Slots (W = card width): centre 1 · ±1 at .60W, scale .84, turned 12° · ±2 at .96W, scale .63, faded · ±3 gone.
   The JS moves every card each frame with one spring (stiffness 260, damping 30), so drag and glide are one motion.
   v4b (Sir, Nov 1): bigger cards; the question / answer / line moved UNDER the cards into a graphite glass caption box;
   hero background Deep Black #0B0B0B. Graphite glass = between deep black and shoji (#1E1E1C–#262624, frosted, thin light rim).
   v4c (Sir, Nov 1): the question / answer / line now sit INSIDE each card's caption (where the reel has title + meta);
   the separate box is gone. Each card shows its own slide's words.
   v4d (Sir, Nov 1, latest): page back to Shoji White #F5F4EE; the CARDS are deep black glass (#0B0B0B) with shoji text.
   Palette: Shoji White #F5F4EE, Deep Black #0B0B0B, Marvans magenta #DF1078. No burgundy, no blobs.
   Every rule is scoped to #fix so it beats the older site-wide hero rules in css/liquid.css, css/dialed.css, css/pop.css. */
#fix{--shoji:#F5F4EE;--deep:#0B0B0B;--mag:#DF1078;--spring:cubic-bezier(.32,.72,0,1);
  --W:clamp(200px,min(32vw,(100svh - 262px) * .72),460px);--H:calc(var(--W) * 1.46);  /* (Sir, Nov 1: "make the box bigger") taller card for a taller photo box */
  position:relative;overflow:hidden;background:var(--shoji);color:var(--deep);text-align:center;
  display:flex;flex-direction:column;min-height:calc(100svh - var(--gnav,48px));padding:clamp(16px,2vw,28px) var(--gut,22px) 16px}

/* ---- v4d (Sir, Nov 1): shoji white hero again, deep black glass cards ----
   deep black glass: the details modal + Book a Repair · shoji glass: the control bar + Ask Imis */
#fix :is(.mfx-card,.mfx-buy .pill:not(.pill-line)){
  background:linear-gradient(180deg,rgba(38,38,37,.94) 0%,rgba(11,11,11,.92) 58%,rgba(22,22,21,.94) 100%);
  -webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);
  border:1px solid rgba(245,244,238,.16);outline:0;
  box-shadow:inset 0 1px 0 rgba(245,244,238,.2),inset 0 -1px 0 rgba(0,0,0,.5),0 2px 6px rgba(11,11,11,.16),0 22px 44px -20px rgba(11,11,11,.55)}
#fix :is(.mfx-nav,.mfx-buy .pill.pill-line){
  background:linear-gradient(180deg,rgba(255,255,255,.86) 0%,rgba(245,244,238,.62) 55%,rgba(245,244,238,.74) 100%);
  -webkit-backdrop-filter:blur(18px) saturate(170%);backdrop-filter:blur(18px) saturate(170%);
  border:1px solid rgba(255,255,255,.95);outline:0;
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 rgba(11,11,11,.06),0 0 0 .5px rgba(11,11,11,.16),0 2px 6px rgba(11,11,11,.06),0 16px 34px -16px rgba(11,11,11,.34)}

/* ---- stage: the glass cards ---- */
#fix .mfx-stage{position:relative;flex:1;min-height:calc(var(--H) + 28px);margin:0 calc(-1 * var(--gut,22px));outline:none;touch-action:pan-y;cursor:grab;
  -webkit-user-select:none;user-select:none}
#fix .mfx-stage.grab{cursor:grabbing}
#fix .mfx-stage:focus-visible{outline:2px solid var(--deep);outline-offset:-6px;border-radius:18px}
#fix .mfx-list{list-style:none;margin:0;padding:0;position:absolute;inset:0;perspective:1400px;perspective-origin:50% 50%}
/* each card sits in the middle; js/pages/home-hero.js sets its transform / opacity / z-index every frame */
#fix .mfx-item{position:absolute;left:50%;top:50%;width:var(--W);height:var(--H);margin:calc(var(--H) / -2) 0 0 calc(var(--W) / -2);
  cursor:pointer;backface-visibility:hidden}
#fix .mfx-item.is-mid{cursor:inherit}
/* the card: the reel's glass on dark — faint white frost, thin light rim, deep shadow */
#fix .mfx-glass{position:absolute;inset:0;display:flex;flex-direction:column;padding:calc(var(--W) * .052);border-radius:calc(var(--W) * .076);
  /* solid deep black glass (no backdrop blur: on 3D-turned cards it drew a bright band, and the card behind bled through) */
  background:linear-gradient(165deg,#2a2a29 0%,#161615 42%,#0B0B0B 100%);
  border:1px solid rgba(245,244,238,.2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(0,0,0,.5),0 4px 12px rgba(11,11,11,.16),0 34px 60px -28px rgba(11,11,11,.55);
  transition:transform .45s var(--spring),box-shadow .45s ease}
/* hover the centre card: it lifts a little (as in the reel) */
@media (hover:hover) and (pointer:fine){
  #fix .mfx-item.is-mid:hover .mfx-glass{transform:translateY(-6px);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.24),inset 0 -1px 0 rgba(0,0,0,.25),0 6px 16px rgba(11,11,11,.2),0 44px 72px -30px rgba(11,11,11,.6)}
}
/* side cards: faded toward the shoji page by a veil (js sets --dim per frame), so only the centre card's words are fully lit */
#fix .mfx-glass::after{content:"";position:absolute;inset:-1px;border-radius:inherit;background:#F5F4EE;opacity:var(--dim,0);pointer-events:none;z-index:4}
#fix .mfx-pic{position:relative;isolation:isolate;flex:none;aspect-ratio:189/182;border-radius:calc(var(--W) * .057);overflow:hidden;
  background:#fff;box-shadow:inset 0 0 0 .5px rgba(11,11,11,.08)}
#fix .mfx-pic img{position:absolute;inset:9%;width:82%;height:82%;object-fit:contain;pointer-events:none;-webkit-user-drag:none}  /* (no multiply: Chrome dropped blended photos on the turned side cards; the photos have white backgrounds, so the panel is white) */
/* round frosted button in the middle of the picture (the reel's play button) = open the details */
#fix .mfx-plus{position:absolute;left:50%;top:46%;width:calc(var(--W) * .16);height:calc(var(--W) * .16);margin:calc(var(--W) * -.08) 0 0 calc(var(--W) * -.08);
  display:grid;place-items:center;border-radius:50%;color:#fff;
  background:rgba(11,11,11,.34);-webkit-backdrop-filter:blur(10px) saturate(150%);backdrop-filter:blur(10px) saturate(150%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 0 0 1px rgba(255,255,255,.28);opacity:var(--ui,0);transition:background-color .25s ease,scale .35s var(--spring)}
#fix .mfx-plus svg{width:44%;height:44%;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
@media (hover:hover) and (pointer:fine){#fix .mfx-item.is-mid .mfx-pic:hover .mfx-plus{background:rgba(223,16,120,.8);scale:1.06}}
/* dark glass pill near the bottom of the picture (the reel's "Watch Trailer") */
#fix .mfx-go{position:absolute;left:50%;bottom:calc(var(--W) * .045);translate:-50% 0;display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  height:calc(var(--W) * .085);min-height:26px;padding:0 calc(var(--W) * .045);border-radius:999px;font-size:clamp(12px,calc(var(--W) * .038),14px);font-weight:600;letter-spacing:-.005em;
  color:#fff;background:rgba(11,11,11,.64);-webkit-backdrop-filter:blur(10px) saturate(150%);backdrop-filter:blur(10px) saturate(150%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 0 0 .5px rgba(255,255,255,.2),0 6px 14px -6px rgba(11,11,11,.5);opacity:var(--ui,0);transition:background-color .25s ease}
#fix .mfx-go svg{width:.8em;height:.8em;fill:currentColor}
#fix .mfx-go:hover{background:var(--deep);text-decoration:none}
#fix .mfx-go:focus-visible{outline:2px solid var(--mag);outline-offset:2px}
#fix .mfx-item:not(.is-mid) :is(.mfx-go,.mfx-plus){pointer-events:none}
/* the card's caption = the slide's words: question (magenta) · answer (shoji, big) · line (soft shoji) */
#fix .mfx-words{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0;padding:calc(var(--W) * .02) calc(var(--W) * .015) 0;text-align:center}
#fix .mfx-cq{font-size:calc(var(--W) * .048);line-height:1.2;font-weight:600;letter-spacing:-.012em;color:var(--mag);white-space:nowrap}
#fix .mfx-ca{margin-top:calc(var(--W) * .006);font-size:var(--fa,calc(var(--W) * .098));line-height:1.08;font-weight:700;letter-spacing:-.03em;color:var(--shoji);white-space:nowrap}
#fix .mfx-cl{margin-top:calc(var(--W) * .02);font-size:max(12px,calc(var(--W) * .036));line-height:1.36;letter-spacing:-.005em;color:rgba(245,244,238,.66);text-wrap:balance;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---- details: the centre card grows into a graphite glass modal; the side cards slide in behind it ---- */
#fix .mfx-card{position:absolute;z-index:60;left:50%;top:50%;width:min(580px,calc(100vw - 32px));padding:14px;text-align:left;cursor:auto;border-radius:24px;
  translate:-50% -50%;opacity:0;scale:var(--from,.6);transform-origin:50% 50%;
  transition:opacity .22s ease,scale .55s cubic-bezier(.2,.9,.25,1.02);-webkit-user-select:text;user-select:text}
#fix .mfx-card[hidden]{display:block;visibility:hidden;pointer-events:none}
#fix .mfx-card.on{opacity:1;scale:1}
#fix .mfx-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 12px 6px}
#fix .mfx-card-k{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--shoji)}
#fix .mfx-card-k i{width:7px;height:7px;border-radius:50%;background:var(--mag);box-shadow:0 0 0 3px rgba(223,16,120,.22)}
#fix .mfx-card-x{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 13px;border:0;border-radius:999px;cursor:pointer;
  font-size:13px;font-weight:600;color:var(--shoji);background:rgba(245,244,238,.1);box-shadow:inset 0 1px 0 rgba(245,244,238,.12),0 0 0 .5px rgba(245,244,238,.22)}
#fix .mfx-card-x svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
#fix .mfx-card-x:hover{background:rgba(245,244,238,.18)}
#fix .mfx-card-x:focus-visible{outline:2px solid var(--mag);outline-offset:2px}
#fix .mfx-card-pic{position:relative;isolation:isolate;height:clamp(150px,30svh,260px);border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#F3F2EC,#E7E4DB)}
#fix .mfx-card-pic img{position:absolute;inset:6%;width:88%;height:88%;object-fit:contain;mix-blend-mode:multiply}
#fix .mfx-card-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 6px 0}
#fix .mfx-card-t{font-size:21px;line-height:1.2;font-weight:700;letter-spacing:-.02em;color:var(--shoji)}
#fix .mfx-card-a{flex:none;display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 13px;border-radius:999px;font-size:13px;font-weight:600;color:var(--deep);
  background:var(--shoji);box-shadow:inset 0 1px 0 #fff,0 6px 14px -6px rgba(0,0,0,.6)}
#fix .mfx-card-a::after{content:"\203A";font-size:17px;line-height:1;margin-top:-2px;color:var(--mag)}
#fix .mfx-card-a:hover{text-decoration:none;background:#fff;color:var(--deep)}
#fix .mfx-card-a:focus-visible{outline:2px solid var(--mag);outline-offset:2px}
#fix .mfx-card-l{margin:8px 6px 4px;padding:0;list-style:none}
#fix .mfx-card-l li{position:relative;padding-left:15px;margin-top:5px;font-size:14px;line-height:1.43;letter-spacing:-.01em;color:rgba(245,244,238,.72)}
#fix .mfx-card-l li::before{content:"";position:absolute;left:1px;top:.55em;width:6px;height:6px;border-radius:50%;background:var(--mag)}

/* ---- foot: hours · glass player bar · buttons ---- */
#fix .mfx-foot{position:relative;z-index:3;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;width:100%;max-width:1240px;margin:14px auto 0}
#fix .mfx-hours{justify-self:start;text-align:left;font-size:14px;line-height:1.43;letter-spacing:-.01em;color:var(--deep)}
#fix .mfx-hours b{font-weight:600;color:var(--deep);margin-right:4px}
#fix .mfx-br{display:none}
#fix .mfx-buy{justify-self:end;display:flex;gap:12px}

/* the bar: one long graphite glass pill (as in the reel): prev / play / next · now-showing chip · dots */
#fix .mfx-nav{position:relative;isolation:isolate;display:flex;align-items:center;gap:2px;padding:5px 8px 5px 6px;border-radius:999px}
#fix .mfx-nav::before,#fix .mfx-nav::after{content:none!important}
#fix .mfx-pad{position:relative;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:50%;padding:0;cursor:pointer;flex:none;
  background:transparent;color:var(--deep);box-shadow:none;transition:transform .4s var(--spring),background-color .25s ease,box-shadow .25s ease}
#fix .mfx-pad[hidden]{display:none}
#fix .mfx-pad svg{display:block;width:18px;height:18px;fill:currentColor;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#fix .mfx-play{margin:0 2px;color:var(--shoji);background:var(--deep);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 2px 8px rgba(11,11,11,.3)}
#fix .mfx-play svg{position:absolute;inset:0;margin:auto}
#fix .mfx-i-pause{fill:none!important;stroke-width:2.6!important}
#fix .mfx-i-play{opacity:0}
#fix .mfx-play[aria-pressed="true"] .mfx-i-play{opacity:1}
#fix .mfx-play[aria-pressed="true"] .mfx-i-pause{opacity:0}
#fix .mfx-pad:active{transform:scale(.88);transition-duration:.12s}
#fix .mfx-pad:focus-visible{outline:2px solid var(--deep);outline-offset:1px}
@media (hover:hover) and (pointer:fine){
  #fix .mfx-pad:not(.mfx-play):hover{background:rgba(255,255,255,.95);box-shadow:inset 0 1px 0 #fff,0 0 0 .5px rgba(11,11,11,.14),0 4px 10px -4px rgba(11,11,11,.25)}
  #fix .mfx-play:hover{background:#262625}
  #fix .mfx-dot:hover i{background:rgba(11,11,11,.6)}
}
/* now-showing chip (the reel's dark "now playing" chip) */
#fix .mfx-now{position:relative;display:flex;align-items:center;gap:9px;width:240px;height:40px;margin:0 8px;padding:4px 12px 4px 4px;border-radius:12px;overflow:hidden;text-align:left;
  background:rgba(11,11,11,.9);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 0 0 .5px rgba(245,244,238,.1)}
#fix .mfx-now img{flex:none;width:32px;height:32px;border-radius:8px;object-fit:contain;background:#EEECE5;padding:2px}
#fix .mfx-now-tx{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
#fix .mfx-now-tx b{font-size:12px;font-weight:600;color:var(--shoji);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#fix .mfx-now-tx span{font-size:11px;color:rgba(245,244,238,.55);white-space:nowrap}
#fix .mfx-eq{flex:none;display:flex;align-items:center;gap:2px;height:14px}
#fix .mfx-eq i{width:2px;height:4px;border-radius:1px;background:var(--mag);transform-origin:50% 50%}
#fix.is-auto:not(.is-held) .mfx-eq i{animation:mfx-eq .9s ease-in-out infinite alternate}
#fix .mfx-eq i:nth-child(2){animation-delay:-.3s!important}#fix .mfx-eq i:nth-child(3){animation-delay:-.6s!important}
#fix .mfx-eq i:nth-child(4){animation-delay:-.15s!important}#fix .mfx-eq i:nth-child(5){animation-delay:-.45s!important}
@keyframes mfx-eq{from{transform:scaleY(1)}to{transform:scaleY(3.2)}}
/* thin progress line = the slide timer */
#fix .mfx-bar{position:absolute;left:45px;right:12px;bottom:4px;height:2px;border-radius:2px;background:rgba(245,244,238,.16);overflow:hidden}
#fix .mfx-bar b{position:absolute;inset:0;background:var(--mag);transform-origin:left;transform:scaleX(0)}
#fix.is-auto .mfx-bar b{animation:mfx-timer var(--mfx-t,3000ms) linear both}
#fix.is-held .mfx-bar b{animation-play-state:paused}
@keyframes mfx-timer{from{transform:scaleX(0)}to{transform:scaleX(1)}}
/* dots on the right of the bar (the reel has AirPlay / shuffle / volume there) */
#fix .mfx-dots{display:flex;align-items:center;height:24px;padding:0 2px}
#fix .mfx-dot{display:flex;align-items:center;justify-content:center;height:24px;min-width:15px;padding:8px 4px;border:0;background:none;cursor:pointer}
#fix .mfx-dot i{display:block;width:6px;height:6px;border-radius:999px;background:rgba(11,11,11,.26);transition:width .5s var(--spring),background-color .2s linear}
#fix .mfx-dot[aria-current="true"] i{width:18px;background:var(--mag)}
#fix .mfx-dot:focus-visible{outline:2px solid var(--deep);outline-offset:0;border-radius:999px}

/* ---- buttons: Book a Repair = deep black glass + shoji text · Ask Imis = shoji glass + deep black text ---- */
#fix .mfx-buy .pill{position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 22px;border-radius:999px;
  font-size:15px;font-weight:600;letter-spacing:-.01em;filter:none;transition:transform .45s var(--spring),box-shadow .3s ease,background .3s ease}
#fix .mfx-buy .pill::before,#fix .mfx-buy .pill::after{content:none!important}
#fix .mfx-buy .pill:not(.pill-line){color:var(--shoji)}
#fix .mfx-buy .pill.pill-line{color:var(--deep)}
@media (hover:hover) and (pointer:fine){
  #fix .mfx-buy .pill:hover{transform:translateY(-1px) scale(1.035);filter:none}
  #fix .mfx-buy .pill:not(.pill-line):hover{color:var(--shoji);background:linear-gradient(180deg,#333332,#0B0B0B 58%,#1a1a19)}
  #fix .mfx-buy .pill.pill-line:hover{color:var(--deep);background:linear-gradient(180deg,#fff,rgba(245,244,238,.8))}
}
#fix .mfx-buy .pill:active{transform:scale(.96);transition-duration:.12s}
#fix .mfx-buy .pill:focus-visible{outline:2px solid var(--mag);outline-offset:3px}

#fix .mfx-fine{max-width:900px;margin:14px auto 0;font-size:11px;line-height:1.4;color:rgba(11,11,11,.55);letter-spacing:0}
#fix .mfx-fine a{color:var(--deep);text-decoration:underline}

/* ---- tablets and phones ---- */
@media (max-width:1068px){
  #fix .mfx-foot{grid-template-columns:1fr;justify-items:center;gap:14px}
  #fix .mfx-hours{justify-self:center;text-align:center;order:3}
  #fix .mfx-buy{justify-self:center;order:2}
  #fix .mfx-nav{order:1}
}
@media (max-width:734px){
  #fix{--W:min(80vw,(100svh - 330px) * .72,312px);min-height:0;padding:14px 16px 16px}
  #fix .mfx-stage{margin-inline:-16px;min-height:calc(var(--H) + 20px)}
  #fix .mfx-now{width:auto;flex:1;min-width:0;margin:0 0 0 6px}
  #fix .mfx-nav{width:100%;max-width:358px;padding-right:5px}
  #fix .mfx-dots{display:none}
  #fix .mfx-card{padding:12px}
  #fix .mfx-card-top{padding-bottom:10px}
  #fix .mfx-card-pic{height:110px}
  #fix .mfx-card-t{font-size:18px}
  #fix .mfx-card-l li{font-size:13px;margin-top:3px}
  #fix .mfx-buy{width:100%;max-width:358px}
  #fix .mfx-buy .pill{flex:1;padding:0 14px}
  #fix .mfx-br{display:inline}
  #fix .mfx-hours span{display:none}
}

@media (prefers-reduced-motion:reduce){
  #fix :is(.mfx-glass,.mfx-dot i,.mfx-card,.mfx-pad,.mfx-buy .pill,.mfx-plus){transition:none}
  #fix :is(.mfx-bar b,.mfx-eq i){animation:none!important}
  #fix :is(.mfx-pad,.mfx-buy .pill,.mfx-glass):is(:hover,:active){transform:none}
}
@media (prefers-reduced-transparency:reduce){
  #fix :is(.mfx-nav,.mfx-buy .pill.pill-line){background:var(--shoji);-webkit-backdrop-filter:none;backdrop-filter:none}
  #fix :is(.mfx-card,.mfx-buy .pill:not(.pill-line),.mfx-glass){background:var(--deep);-webkit-backdrop-filter:none;backdrop-filter:none}
}
/* (Sir, Nov 1) the details pop-up is gone, so the "+" hint on the photo goes too */
#fix .mfx-plus{display:none !important}
#fix .mfx-item.is-mid{cursor:grab}
/* (Sir, Nov 1) no "Book a Repair" / "See in store" button on the card photos; the page's own Book a Repair button stays */
#fix .mfx-go{display:none !important}
