/* ============================================================
   MAZE MIRAGE — shared styles
   Single page: index.html (landing + home in one document)
   ============================================================ */

@font-face {
  font-family: 'Shelten';
  src: url('../fonts/Shelten.ttf') format('truetype');
  font-display: swap;
}

:root {
  --void: #000000;
  --white: #ffffff;
  --hairline: rgba(255, 255, 255, 0.14);
  --ease-breathe: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-panel: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-icon: 0.28s;
  --t-hero: 0.45s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--void);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body { font-family: 'Shelten', serif; color: var(--white); }

img { display: block; user-select: none; -webkit-user-drag: none; }

/* ---------- spiral sprite cursor (8 frames, tacky-on-purpose) ---------- */
/* hide the OS arrow everywhere once our cursor is active (kills double-cursor) */
@media (pointer: fine) {
  body.cursor-active, body.cursor-active * { cursor: none !important; }
}
.spiral-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 56px; height: 56px;
  pointer-events: none;
  z-index: 10000;
  /* tip alignment: the arrow tip sits ~16% in from top-left of the art */
  margin-left: -9px;
  margin-top: -7px;
  opacity: 0;
  transition: opacity 0.2s, width 0.15s ease, height 0.15s ease;
  will-change: transform;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.spiral-cursor.visible { opacity: 1; }
.spiral-cursor.pressed  { width: 48px; height: 48px; }
@media (pointer: coarse) { .spiral-cursor { display: none; } }

/* ---------- video ---------- */
.reel {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- legibility scrims (permanent) ---------- */
.scrim {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  opacity: 1;
  z-index: 2;
}
.scrim-top    { top: 0;    height: 22vh; background: linear-gradient(to bottom, rgba(0,0,0,0.68), rgba(0,0,0,0)); }
.scrim-bottom { bottom: 0; height: 24vh; background: linear-gradient(to top,    rgba(0,0,0,0.68), rgba(0,0,0,0)); }

/* ---------- dev control chip (Pat's live toggles) ---------- */
.controls {
  position: fixed;
  right: 14px; bottom: 12px;
  z-index: 9000;
  display: flex;
  gap: 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.controls button {
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--hairline);
  color: rgba(255,255,255,0.7);
  padding: 6px 10px;
  font: inherit;
  letter-spacing: inherit;
  transition: color 0.2s, border-color 0.2s;
}
.controls button:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* the stage holds the reel — framed in void mode, edge-to-edge in full mode */
.stage {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  transform-origin: center center;
  transition: width 0.7s var(--ease-panel), height 0.7s var(--ease-panel);
  transform-style: preserve-3d;
  will-change: transform;
}
body.mode-void .stage {
  width: min(72vw, calc(76vh * (16 / 9)));
  aspect-ratio: 16 / 9;
  outline: 1px solid var(--hairline);
  outline-offset: -1px;
}
body.mode-full .stage {
  width: 100vw;
  height: 100vh;
}

/* the reel fills the screen, one element for the whole experience */
.reel-wrap {
  position: fixed; inset: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* the reel scales up uniformly from center — fills top/bottom/sides at once,
   cover-cropped so there are never letterbox bars. slow + even. */
.reel-wrap .reel {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 1.2s cubic-bezier(0.6, 0, 0.2, 1),
              outline-color 0.6s ease;
}
/* landing void = the reel sits scaled DOWN into a framed window */
body.state-landing.mode-void .reel {
  transform: scale(0.62);
  outline: 1px solid var(--hairline);
  outline-offset: -1px;
}
/* full-bleed: scale to 1 = fills the whole screen, all sides together */
body.state-landing.mode-full .reel,
body.state-home .reel {
  transform: scale(1);
  outline: 1px solid transparent;
}

/* ESCAPE THE VOID — the one way in (landing only) */
.escape {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  z-index: 5;
  background: none; border: none;
  display: block;
  transition: opacity 0.35s ease, transform 0.5s var(--ease-panel);
}
.escape img {
  height: clamp(30px, 5vh, 54px);
  width: auto;
  transform: scale(1);
  transition: transform var(--t-hero) var(--ease-breathe);
}
.escape::after {                /* draw-in line */
  content: '';
  position: absolute;
  left: 0; bottom: -12px;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: center center;
  transition: transform 0.5s var(--ease-panel);
}
.escape:hover img,
.escape:focus-visible img { transform: scale(1.05); }
.escape:hover::after,
.escape:focus-visible::after { transform: scaleX(1); }
.escape:focus-visible { outline: 1px solid var(--hairline); outline-offset: 8px; }
/* escape clears instantly + drops away as we commit to home */
body.state-home .escape {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

/* ============================================================
   HOME UI — assembles into place after the reel commits
   each piece staggers in: wordmark, then corners, then logo/burger
   ============================================================ */
.home-ui { pointer-events: none; }
body.state-home .home-ui { pointer-events: auto; }

/* every chrome piece starts slightly displaced + invisible */
.wordmark, .corner-left, .corner-right, .burger {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.wordmark    { transform: translateX(-50%) translateY(-14px); }
.corner-right{ transform: translateY(-14px); }
.corner-left { transform: translateY(-14px); }
.burger      { transform: translateY(-10px); }

/* assemble — staggered so it reads as composed, not a single fade */
body.state-home .wordmark {
  opacity: 1; transform: translateX(-50%) translateY(0);
  transition-delay: 0.45s;
}
body.state-home .corner-right { opacity: 1; transform: translateY(0); transition-delay: 0.62s; }
body.state-home .corner-left  { opacity: 1; transform: translateY(0); transition-delay: 0.74s; }
body.state-home .burger       { opacity: 1; transform: translateY(0); transition-delay: 0.86s; }

/* --- top chrome --- */
.chrome { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.chrome > * { pointer-events: auto; }

.corner-left {
  position: absolute;
  top: 28px; left: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.brand-logo {
  transition: opacity 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}
body.menu-open .brand-logo { opacity: 0; }

.brand-logo img {
  width: clamp(54px, 5.4vw, 84px);
  height: auto;
  /* invert(1) shows the black art as WHITE; subtle dark shadow makes it pop like the scrim does */
  filter: invert(1) drop-shadow(0 2px 6px rgba(0,0,0,0.55));
  transform: translateY(0) scale(1);
  transition: transform 0.3s var(--ease-breathe), filter 0.3s ease;
}
.brand-logo:hover img,
.brand-logo:focus-visible img {
  /* hover: true BLACK art, raise + grow, SOLID white drop shadow (no blur) offset behind the lines */
  filter: invert(0) drop-shadow(0.25px 0.25px 0 rgba(255,255,255,0.95));
  transform: translateY(-4px) scale(1.12);
}

/* burger built from bars (matches the 3-dash icon) so it can morph to X.
   Fixed + high z so the X stays clickable above the open panel. */
.burger {
  background: none; border: none;
  width: 44px; height: 32px;
  position: fixed;
  top: calc(28px + clamp(54px, 5.4vw, 84px) + 18px);
  /* CLOSED burger (☰) centers under the HOME PAGE logo door */
  left: calc(30px + clamp(54px, 5.4vw, 84px) * 0.497 - 22px);
  z-index: 130;
  display: block;
}
.burger span {
  position: absolute;
  left: 50%;
  width: 36px; height: 5px;
  margin-left: 0;
  border-radius: 3px;
  background: var(--white);
  transform: translateX(-50%);
  transform-origin: center center;
  transition: transform 0.4s var(--ease-panel), opacity 0.25s, width 0.3s,
              background 0.25s ease;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
.burger span:nth-child(1) { top: 5px; }
.burger span:nth-child(2) { top: 14px; }
.burger span:nth-child(3) { top: 23px; }
/* hover-only devices: touch taps "stick" the hover state on iOS, leaving the
   burger black after closing the menu — so gate hover effects behind real hover */
@media (hover: hover) and (pointer: fine) {
  .burger:not(.open):hover span { width: 40px; background: #000; }
}
/* X state: keep centered with translateX(-50%), add the rotation + vertical shift */
.burger.open span:nth-child(1) { transform: translateX(-50%) translateY(9px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateX(-50%) translateY(-9px) rotate(-45deg); }
.burger.open:hover span { width: 36px; }   /* X stays centered + white on hover */
/* lift the whole X on hover to signal "close" (override home-state transform) */
body.state-home .burger.open { transition: transform 0.3s var(--ease-breathe); }
@media (hover: hover) and (pointer: fine) {
  body.state-home .burger.open:hover { transform: scale(1.18); }
}
/* OPEN X aligns to the MENU panel logo (different size/position than home logo).
   menu logo door sits ~3.5px right of home logo door; the X crossing reads ~12px
   left of its box center, so net shift right to land on the menu door. */
.burger.open { margin-left: -32px; }

.wordmark {
  position: absolute;
  top: 30px; left: 50%;
  transform: translateX(-50%);
}
.wordmark img {
  height: clamp(44px, 7vh, 84px);
  width: auto;
  filter: drop-shadow(0 1px 8px rgba(0,0,0,0.35));
}

/* --- utility icons: outline -> solid, slight grow --- */
.corner-right {
  position: absolute;
  top: 34px; right: 36px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.uicon {
  background: none; border: none;
  position: relative;
  height: clamp(22px, 2.6vh, 30px);
  display: block;
  transform: scale(1);
  transition: transform var(--t-icon) var(--ease-breathe);
}
.uicon img {
  height: 100%; width: auto;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.35));
}
.uicon .fill {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--t-icon) var(--ease-breathe);
}
.uicon:hover, .uicon:focus-visible { transform: scale(1.1); }
.uicon:hover .fill, .uicon:focus-visible .fill { opacity: 1; }
.uicon:focus-visible { outline: 1px solid var(--hairline); outline-offset: 6px; }

/* ============================================================
   LEFT MENU PANEL
   ============================================================ */

.panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: clamp(225px, 13.5vw, 280px);
  z-index: 100;
  transform: translateX(-101%);
  transition: transform 0.55s var(--ease-panel);
  background:
    linear-gradient(to right, rgba(0,0,0,0.92), rgba(0,0,0,0.88)),
    url('../img/ink-texture-1.jpg');
  background-size: cover, cover;
  background-position: center, center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  padding: calc(28px + clamp(54px, 5.4vw, 84px) + 18px + 70px) 24px 36px;
}
.panel.open { transform: translateX(0); }
/* texture 2 variant (toggled) */
body.ink-2 .panel {
  background:
    linear-gradient(to right, rgba(0,0,0,0.92), rgba(0,0,0,0.88)),
    url('../img/ink-texture-2.jpg');
  background-size: cover, cover;
  background-position: center, center;
}

.panel-logo {
  width: clamp(88px, 7vw, 110px);
  margin-bottom: 7vh;
  opacity: 0.95;
  filter: invert(1);   /* black art → white inside the dark menu panel */
}

.panel nav { display: flex; flex-direction: column; gap: 3.4vh; }

.menu-item {
  background: none; border: none;
  text-align: left;
  font-family: 'Shelten', serif;
  font-size: clamp(21px, 2.8vh, 30px);
  letter-spacing: 0.14em;
  color: var(--white);
  position: relative;
  padding-left: 0;
  transform: translateX(0);
  /* hover transforms: always instant, no delay */
  transition: transform 0.35s var(--ease-breathe) 0s,
              padding-left 0.35s var(--ease-breathe) 0s;
  opacity: 0;
  translate: -18px 0;
}
.menu-item::before {            /* draw-in line, same language as ESCAPE */
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 20px; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-panel) 0s;
}
.menu-item:hover, .menu-item:focus-visible { padding-left: 30px; }
.menu-item:hover::before, .menu-item:focus-visible::before { transform: scaleX(1); }
.menu-item:focus-visible { outline: none; }

/* stagger-in when panel opens — delay applies ONLY to opacity + translate */
.panel.open .menu-item {
  opacity: 1;
  translate: 0 0;
  transition: transform 0.35s var(--ease-breathe) 0s,
              padding-left 0.35s var(--ease-breathe) 0s,
              opacity 0.45s ease var(--in-delay, 0s),
              translate 0.5s var(--ease-panel) var(--in-delay, 0s);
}
.panel.open .menu-item:nth-child(1) { --in-delay: 0.12s; }
.panel.open .menu-item:nth-child(2) { --in-delay: 0.19s; }
.panel.open .menu-item:nth-child(3) { --in-delay: 0.26s; }
.panel.open .menu-item:nth-child(4) { --in-delay: 0.33s; }

/* click-outside catcher */
.veil {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.veil.on { opacity: 1; pointer-events: auto; }

/* ============================================================
   FUNCTIONAL SHELLS — search / account / bag (no backend, full feel)
   ============================================================ */

.shell {
  position: fixed;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--hairline);
}

/* search: centered overlay */
.shell-search {
  top: 0; left: 0; right: 0;
  border-left: none; border-right: none; border-top: none;
  padding: 9vh 8vw 7vh;
  transform: translateY(-101%);
  transition: transform 0.5s var(--ease-panel);
}
.shell-search.open { transform: translateY(0); }
.shell-search input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  font-family: 'Shelten', serif;
  font-size: clamp(24px, 4vh, 44px);
  letter-spacing: 0.1em;
  color: var(--white);
  padding: 10px 4px;
  outline: none;
}
.shell-search input::placeholder { color: rgba(255,255,255,0.32); }
.shell-note {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.45);
  min-height: 18px;
}

/* account + bag: right drawers */
.shell-drawer {
  top: 0; right: 0; bottom: 0;
  width: min(380px, 86vw);
  border-top: none; border-right: none; border-bottom: none;
  transform: translateX(101%);
  transition: transform 0.5s var(--ease-panel);
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.shell-drawer.open { transform: translateX(0); }
.shell-drawer h2 {
  font-family: 'Shelten', serif;
  font-weight: normal;
  font-size: 26px;
  letter-spacing: 0.18em;
}
.shell-drawer p {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: rgba(255,255,255,0.5);
}
.shell-drawer input,
.shell-drawer textarea {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.25s;
}
.shell-drawer input:focus,
.shell-drawer textarea:focus { border-color: rgba(255,255,255,0.6); }
.shell-drawer textarea { resize: vertical; min-height: 110px; }
.shell-drawer .cta {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  padding: 14px;
  transition: background 0.25s, color 0.25s;
}
.shell-drawer .cta:hover { background: var(--white); color: var(--void); }

.shell-close {
  position: absolute;
  top: 26px; right: 26px;
  width: 30px; height: 30px;
  background: none; border: none;
}
.shell-close::before, .shell-close::after {
  content: '';
  position: absolute;
  top: 50%; left: 3px;
  width: 24px; height: 1.5px;
  background: var(--white);
}
.shell-close::before { transform: rotate(45deg); }
.shell-close::after  { transform: rotate(-45deg); }

/* ============================================================
   SHOP VIEW — full screen, gallery-first product grid
   ============================================================ */

/* ---- shop ink texture layer (opacity dialed by --shop-texture) ---- */
:root { --shop-texture: 0.5; --shop-veil: 0.5; }


/* dev-only texture toggle — remove before launch */
#texToggle {
  position: fixed; bottom: 14px; right: 14px; z-index: 999;
  display: flex; gap: 6px;
}
#texToggle button {
  background: rgba(0,0,0,0.75); color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  font-family: ui-monospace, monospace; font-size: 11px;
  padding: 7px 9px; cursor: pointer;
}
#texToggle button.on { background: #fff; color: #000; }


/* ---- full-screen COMING SOON / CONTACT panels (slide up like the shop) ---- */
.soon {
  position: fixed; inset: 0;
  z-index: 200;
  /* texture is part of the panel's own background so nothing can overlay the
     products; background-attachment:fixed locks it to the viewport so it does
     not scroll or tile with the content */
  background-color: #080808;
  background-image: linear-gradient(rgba(8,8,8,var(--shop-veil)), rgba(8,8,8,var(--shop-veil))),
                    url('../img/ink-texture-2.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
  background-repeat: no-repeat, no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(100%);
  transition: transform 0.6s var(--ease-panel);
  overflow-y: auto;
  padding: clamp(60px, 8vh, 110px) clamp(30px, 6vw, 100px) 60px;
}
.soon.open { transform: translateY(0); }

/* desktop: shop/soon content fits the screen — kill the empty scroll into the
   void that exposed the fixed-texture seam. mobile keeps auto-scroll. */
@media (min-width: 721px) {
  .shop, .soon { overflow-y: hidden; }
  .shop.detail-open { overflow-y: auto; }   /* only if a long detail needs it */
}

.soon-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
}
.soon-text {
  font-family: ui-monospace, monospace;
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.8);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(560px, 100%);
}
.contact-form input,
.contact-form textarea {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.25s;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus,
.contact-form textarea:focus { border-color: rgba(255,255,255,0.6); }
.contact-form .cta {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  padding: 15px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.contact-form .cta:hover { background: var(--white); color: #000; }

.shop {
  position: fixed; inset: 0;
  z-index: 200;
  /* texture is part of the panel's own background so nothing can overlay the
     products; background-attachment:fixed locks it to the viewport so it does
     not scroll or tile with the content */
  background-color: #080808;
  background-image: linear-gradient(rgba(8,8,8,var(--shop-veil)), rgba(8,8,8,var(--shop-veil))),
                    url('../img/ink-texture-2.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
  background-repeat: no-repeat, no-repeat;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(100%);
  transition: transform 0.6s var(--ease-panel);
  overflow-y: auto;
  padding: clamp(60px, 8vh, 110px) clamp(30px, 6vw, 100px) 60px;
}
.shop.open { transform: translateY(0); }
/* alternate open direction: slide in from the left */
.shop.from-left { transform: translateX(-100%); }
.shop.from-left.open { transform: translateX(0); }

.shop-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: clamp(32px, 5vh, 64px);
}
.shop-title {
  font-family: 'Shelten', serif;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: 0.2em;
  color: var(--white);
}
.shop-close {
  position: relative;
  width: 32px; height: 32px;
  margin-left: -4px;
  background: none; border: none;
  transition: transform 0.3s var(--ease-breathe);
}
.shop-close:hover { transform: scale(1.18); }
.shop-close::before, .shop-close::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 26px; height: 1.5px;
  margin-left: -13px;
  margin-top: -0.75px;
  background: var(--white);
  transition: background 0.25s;
}
.shop-close::before { transform: rotate(45deg); }
.shop-close::after  { transform: rotate(-45deg); }
.shop-close:hover::before, .shop-close:hover::after { background: rgba(255,255,255,0.6); }

/* product grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: clamp(24px, 3vw, 48px);
  transition: opacity 0.3s ease;
}
.shop.detail-open .shop-grid { display: none; }

.product {
  background: none; border: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: inherit;
}
/* product floats on the background — no border/tile, just a soft spotlight glow
   so dark pieces separate from the void */
.product-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}
.product-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 48%,
              rgba(255,255,255,0.10), rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}
.product:hover .product-img::before { opacity: 1; }
.pimg {
  position: absolute;
  width: 100%; height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.6,0,0.2,1);
}
.pimg-front { transform: rotateY(0deg); }
.pimg-back  { transform: rotateY(180deg); }
.product:hover .pimg-front { transform: rotateY(-180deg); }   /* flip to the side */
.product:hover .pimg-back  { transform: rotateY(0deg); }

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.85);
}
.product-price { color: rgba(255,255,255,0.55); }
.product.soon { opacity: 0.4; }

/* placeholder for soon items (no image) */
.product-img.ph::after {
  content: 'MAZE MIRAGE';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.2);
}

/* product detail */
.product-detail {
  display: none;
}
.shop.detail-open .product-detail { display: block; }
.detail-back {
  background: none; border: none;
  font-family: ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 36px;
  transition: color 0.25s;
}
.detail-back:hover { color: var(--white); }
.detail-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.detail-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}
.detail-img::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 62% 56% at 50% 48%,
              rgba(255,255,255,0.10), rgba(255,255,255,0) 70%);
  z-index: 0;
}
/* desktop: both slots stack on top of each other so the tee can flip */
.detail-img-slot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-img .pimg { object-fit: contain; width: 100%; height: 100%; }
.img-label { display: none; }   /* labels only show on mobile (stacked view) */
.detail-img:hover .pimg-front { transform: rotateY(-180deg); }
.detail-img:hover .pimg-back  { transform: rotateY(0deg); }
.detail-img.ph::after {
  content: 'MAZE MIRAGE';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.2);
}
.detail-info h3 {
  font-family: 'Shelten', serif;
  font-weight: normal;
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.detail-price {
  font-family: ui-monospace, monospace;
  font-size: 16px; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
}
.detail-desc {
  font-family: ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em;
  line-height: 2;
  color: rgba(255,255,255,0.5);
  margin: 28px 0;
}
.size-row { display: flex; gap: 10px; margin-bottom: 28px; }
.size {
  width: 46px; height: 46px;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  transition: all 0.2s;
}
.size:hover { border-color: rgba(255,255,255,0.7); }
.size.selected { background: var(--white); color: var(--void); border-color: var(--white); }
.add-bag {
  width: 100%;
  background: var(--white);
  color: var(--void);
  border: 1px solid var(--white);
  font-family: ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.22em;
  padding: 16px;
  transition: background 0.25s, color 0.25s;
}
.add-bag:hover { background: transparent; color: var(--white); }
.detail-note {
  font-family: ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5);
  margin-top: 16px; min-height: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .corner-left { top: 18px; left: 16px; gap: 12px; }
  /* burger: centered under the logo */
  .burger {
    top: calc(18px + 54px + 12px);
    left: calc(16px + 27px - 22px);
    transform: none;
  }
  .burger.open {
    left: calc(16px + 27px - 22px);
    transform: none;
    margin-left: 0;
  }
  .corner-right { top: 24px; right: 10px; gap: 10px; }
  .uicon { width: 22px; height: 22px; }
  .uicon img { width: 22px; height: 22px; }
  /* wordmark bigger on mobile — slightly narrower so it clears the icons */
  .wordmark { top: 26px; left: 50%; transform: translateX(-50%); }
  .wordmark img { height: 31px; }
  .escape { bottom: 9vh; }
  body.state-landing.mode-void .reel { transform: scale(0.82); }
  .controls { right: 8px; bottom: 8px; }
  .detail-body { grid-template-columns: 1fr; }

  /* video: cover fills screen, mobile file is vertical so no bars */
  .reel-wrap .reel { object-fit: cover; }

  /* ---- MENU → full-screen overlay ---- */
  .panel {
    width: 100vw;
    max-width: 100vw;
    padding: 18vh 30px 30px;
    align-items: center;
    text-align: center;
    /* solid black at 75% — reads almost opaque but the reel still
       shows through faintly and keeps playing behind the menu */
    background: rgba(0,0,0,0.75);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.ink-2 .panel {
    background: rgba(0,0,0,0.75);
  }
  .panel::before { content: none; }
  .panel-logo { width: 110px; margin-bottom: 6vh; }
  .panel nav { gap: 4.2vh; align-items: center; }
  .menu-item { font-size: 30px; }

  /* ---- bigger touch targets for the icons ---- */
  .uicon .fill { /* keep fill behavior */ }

  /* ---- drawers: account full screen, bag 50% ---- */
  .shell-drawer {
    top: 0; right: 0; bottom: 0;
    left: auto;
    width: 50vw;
    border-top: none; border-right: none; border-bottom: none;
    transform: translateX(101%);
  }
  #shellAccount {
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    border: none;
  }

  /* ---- remove product card spin on mobile tap — just show front image ----
     scoped to the grid card only, so the detail view still stacks front + back */
  .product-img { perspective: none; }
  .product-img .pimg-back { display: none; }
  .product:hover .pimg-front { transform: none; }
  .product:hover .pimg-back  { transform: rotateY(180deg); }

  /* ---- SHOP: single column, comfortable spacing, vertical scroll only ---- */
  .shop { padding: 70px 22px 50px; overflow-x: hidden; touch-action: pan-y; }
  .shop-grid { grid-template-columns: 1fr; gap: 40px; }
  .shop-title { font-size: 34px; }
  .product-img { aspect-ratio: 4 / 5; }

  /* ---- PRODUCT DETAIL: stack front + back images with labels (no hover on touch) ---- */
  .product-detail .detail-body { gap: 24px; }
  .detail-img {
    aspect-ratio: auto;
    flex-direction: column;
    gap: 22px;
    perspective: none;
  }
  .detail-img::before { display: none; }   /* drop the overlap glow when stacked */
  /* stacked view holds two images, so drop the single-image aspect box —
     otherwise the second image overflows and sits on bare black */
  .detail-img {
    aspect-ratio: auto;
    height: auto;
    display: block;
    perspective: none;
  }
  .detail-img-slot {
    position: relative;       /* stack normally instead of overlapping */
    inset: auto;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .detail-img .pimg {
    position: relative;
    width: 100%; height: auto;
    transform: none !important;   /* no flip on mobile — both shown */
    opacity: 1 !important;
  }
  .img-label {
    display: block;               /* show FRONT / BACK labels */
    font-family: ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: rgba(255,255,255,0.55);
    text-align: center;
  }

  .size { width: 52px; height: 52px; }   /* bigger size buttons */
  .add-bag { padding: 18px; }
  .shop-close { width: 38px; height: 38px; }
  .shop-close::before, .shop-close::after { width: 30px; }
}

/* ============================================================
   ACCESS GATE — vibe lock over the whole site
   ============================================================ */
.gate {
  position: fixed; inset: 0;
  z-index: 9998;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
body:not(.locked) .gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
}
.gate-line {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.55);
  animation: gate-flicker 4s infinite;
}
@keyframes gate-flicker {
  0%,97%,100% { opacity: 0.55; }
  98% { opacity: 0.15; }
  99% { opacity: 0.7; }
}
.gate input {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 16px;
  letter-spacing: 0.35em;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 6px;
  width: min(280px, 80vw);
  outline: none;
  transition: border-color 0.3s;
}
.gate input:focus { border-color: rgba(255,255,255,0.8); }
.gate-note {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255,80,80,0.8);
  min-height: 12px;
}
/* while locked, freeze the rest of the site from scrolling underneath */
body.locked { overflow: hidden; }


/* ============================================================
   PANEL BACKDROP
   Lives at <body> level, NOT inside .shop/.soon — those use
   transform: translateY() to slide up, and a transformed ancestor
   turns position:fixed into position:absolute. That was making the
   background scroll away with the content and leave black below.
   At body level it is genuinely viewport-fixed: content scrolls,
   backdrop stays on its own plane.
   ============================================================ */
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;                 /* above the reel, below the panels (200) */
  background: #080808;          /* solid base so the reel never shows through */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
body.panel-open .panel-backdrop {
  opacity: 1;
  visibility: visible;
}
.panel-backdrop-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--shop-texture);
  transition: opacity 0.4s ease;
}

/* Panels themselves are now transparent — the backdrop provides the surface.
   This is what lets the shirts scroll while the video holds still. */
.shop, .soon {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.shop > *, .soon > * { position: relative; z-index: 2; }

/* ---- DESKTOP: static texture instead of the portrait video (it blurs and
   reads too fast when stretched across a wide screen), and no scrolling
   into empty space below the content. ---- */
@media (min-width: 721px) {
  .panel-backdrop-vid { display: none; }
  .panel-backdrop {
    background-color: #080808;
    background-image: linear-gradient(rgba(8,8,8,var(--shop-veil)), rgba(8,8,8,var(--shop-veil))),
                      url('../img/ink-texture-2.jpg');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
  }
  .shop, .soon { overflow-y: hidden; }
  .shop.detail-open { overflow-y: auto; }
}

/* CONTACT + COMING SOON: solid black, no gradient backdrop.
   Only the shop gets the moving texture. */
body.plain-bg .panel-backdrop { background: #080808; }
body.plain-bg .panel-backdrop-vid { opacity: 0; }

/* ============================================================
   GALLERY — plain white room, pieces float, titles only.
   ============================================================ */
.gallery-view {
  background: #ffffff !important;
  /* must override the desktop rule that locks .shop/.soon scrolling */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
.gallery-view .shop-title { color: #111; }
.gallery-view .shop-close::before,
.gallery-view .shop-close::after { background: #111; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 5vw, 80px);
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 10px;
}
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item figcaption {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: #333;
  margin-top: 14px;
  text-align: center;
}
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 46px; }
}

/* gallery hover grow — desktop only, scoped to gallery images only */
@media (hover: hover) and (pointer: fine) {
  .gallery-item img { transition: transform 0.4s ease; }
  .gallery-item:hover img { transform: scale(1.04); }
}

/* product detail: readable over the moving gradient */
.detail-info h3,
.detail-price,
.detail-desc,
.detail-note,
.img-label,
.detail-back {
  text-shadow: 0 2px 12px rgba(0,0,0,0.95), 0 0 4px rgba(0,0,0,0.85);
}
.detail-info .size {
  background: rgba(0,0,0,0.5);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.add-bag { box-shadow: 0 8px 34px rgba(0,0,0,0.6); }

/* product detail legibility over the moving gradient:
   the desc/note were 50% white — brighten them, and lay a soft dark
   scrim behind the info column like the one under the home wordmark. */
.detail-info { position: relative; }
.detail-info::before {
  content: '';
  position: absolute;
  inset: -30px -34px;
  background: radial-gradient(ellipse at 50% 50%,
              rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0) 100%);
  z-index: -1;
  pointer-events: none;
}
.detail-desc { color: rgba(255,255,255,0.86) !important; }
.detail-note { color: rgba(255,255,255,0.8)  !important; }
.detail-back { color: rgba(255,255,255,0.85) !important; }
.img-label   { color: rgba(255,255,255,0.8)  !important; }

/* restore the white selected state — the readability rule above was
   overriding it because .detail-info .size is more specific than .size.selected */
.detail-info .size.selected {
  background: var(--white);
  color: var(--void);
  border-color: var(--white);
  text-shadow: none;
}

/* shipping note next to price so the checkout total is never a surprise */
.ship-note {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.95);
}

/* sold out state */
.add-bag.sold-out {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.35);
  cursor: default;
  box-shadow: none;
}

/* square-ish pieces read smaller in an equal-width grid than the tall ones —
   let them bleed slightly into the gap so they match visually */
@media (min-width: 721px) {
  .gallery-item.wide img {
    width: 122%;
    margin-left: -11%;
  }
}

/* per-piece size tuning (desktop grid only — mobile is single column) */
@media (min-width: 721px) {
  .gallery-item img[src*="weve-seen-worse"] {
    width: 125%;
    margin-left: -12.5%;
  }
  .gallery-item img[src*="untitled"] {
    width: 80%;
    margin-left: 10%;
  }
}
