/* Mairon Mods store. Black, bone white and blood red; torn edges and brush-stroke buttons.
   Display: Bebas Neue. UI: Barlow Condensed. Text: Barlow. */
:root {
  --black: #0a0909;
  --ink: #121010;
  --bone: #efe6d6;
  --bone-dim: #b9b0a2;
  --muted: #8d857b;
  --red: #b8170f;
  --red-hi: #d8281c;
  --ember: #e8743b;
  --line: rgba(239, 230, 214, .1);
  --display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --ui: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --w: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --torn: url("/assets/torn-mask.svg");
}
/* Night: deep blacks, dimmer bone, hotter red; a small UV torch follows the cursor */
:root[data-time="night"] {
  --black: #030202;
  --ink: #080606;
  --bone: #ddd3c2;
  --bone-dim: #968e82;
  --muted: #6f675e;
  --red-hi: #ff3324;
  --line: rgba(239, 230, 214, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
html.modal-open { overflow: hidden; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--bone);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
main { flex: 1; width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 90px; position: relative; z-index: 2; }
::selection { background: var(--red); color: #fff; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--bone); letter-spacing: .02em; line-height: 1; margin: 0; }
.kicker { display: inline-block; color: var(--red-hi); font: 700 14px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.lead { color: var(--bone-dim); font-size: 17px; max-width: 640px; }

/* ---------- brush-stroke buttons (red / bone) ---------- */
.brush {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 15px 30px 17px;
  border: 0;
  background: url("/assets/brush-red.svg") center / 100% 100% no-repeat;
  color: var(--bone);
  font: 700 21px/1 var(--ui);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), filter .25s;
}
.brush.bone { background-image: url("/assets/brush-bone.svg"); color: var(--black); }
.brush:hover { transform: translateY(-2px) rotate(-.6deg); filter: brightness(1.12); }
.brush.wide { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: 600 15px var(--ui); text-transform: uppercase; cursor: pointer; }
button.link:hover { color: var(--red-hi); }

/* ---------- backdrop: blurred art of the active category, behind the store ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--black); }
.bg-art { position: absolute; inset: -8%; width: 116%; height: 116%; max-width: none; object-fit: cover; filter: blur(46px) saturate(.7) brightness(.35); opacity: 0; transition: opacity 1.1s ease; }
.bg-art.on { opacity: 1; }
.bg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 9, 9, .5), rgba(10, 9, 9, .3) 40%, rgba(10, 9, 9, .92)); }

/* blackout between categories and music changes */
.blackout { position: fixed; inset: 0; z-index: 80; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.blackout.on { opacity: 1; }
/* night only: the dark falls off softly around the torch; the torch is a small violet glow with a hot
   core and no hard edge, screened onto the page */
.night-light, .uv-light { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.night-light { background: radial-gradient(circle farthest-corner at var(--lx, 50%) var(--ly, 45%), transparent 0, rgba(2, 1, 3, .18) 120px, rgba(2, 1, 3, .46) 340px, rgba(2, 1, 3, .62) 760px); }
.uv-light { mix-blend-mode: screen; background: radial-gradient(circle 170px at var(--lx, 50%) var(--ly, 45%), rgba(180, 125, 255, .42), rgba(135, 65, 240, .24) 30%, rgba(100, 42, 210, .09) 62%, transparent 100%); }
:root[data-time="night"] .night-light { opacity: 1; }
:root[data-time="night"] .uv-light.on { opacity: var(--uv-a, .95); transition: opacity .25s ease; }
:root[data-time="night"] .bg-shade { background: linear-gradient(180deg, rgba(3, 2, 2, .76), rgba(3, 2, 2, .6) 40%, rgba(3, 2, 2, .97)); }
:root[data-time="night"] .hero-video video { filter: brightness(.78) saturate(.8); }
:root[data-time="night"] .hero h1, :root[data-time="night"] .section-title, :root[data-time="night"] .panel-head h2 { text-shadow: 0 0 22px rgba(255, 51, 36, .38), 0 4px 30px rgba(0, 0, 0, .7); }
@media (hover: none), (pointer: coarse) { .night-light { background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(2, 1, 3, .6) 100%); } }
/* page slide: out towards one side, in from the other */
.slide-out-next main, .slide-out-next .foot { animation: slide-out-next .3s cubic-bezier(.5, 0, .75, 0) forwards; }
.slide-out-prev main, .slide-out-prev .foot { animation: slide-out-prev .3s cubic-bezier(.5, 0, .75, 0) forwards; }
.slide-in-next main, .slide-in-next .foot { animation: slide-in-next .5s var(--ease) both; }
.slide-in-prev main, .slide-in-prev .foot { animation: slide-in-prev .5s var(--ease) both; }
@keyframes slide-out-next { to { transform: translateX(-30vw); opacity: 0; } }
@keyframes slide-out-prev { to { transform: translateX(30vw); opacity: 0; } }
@keyframes slide-in-next { from { transform: translateX(30vw); opacity: 0; } }
@keyframes slide-in-prev { from { transform: translateX(-30vw); opacity: 0; } }

/* ---------- embers ---------- */
.field { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; }

/* ---------- scroll rails ---------- */
.rail { position: fixed; top: 100px; bottom: 32px; z-index: 15; width: 2px; pointer-events: none; background: rgba(239, 230, 214, .06); }
.rail-l { left: clamp(6px, 1.2vw, 14px); }
.rail-r { right: clamp(6px, 1.2vw, 14px); }
.rail .fill { position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p, 0)); background: linear-gradient(180deg, rgba(184, 23, 15, .15), var(--red) 70%, var(--ember)); }
.rail .tip { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle, #fff1dc 0, var(--ember) 30%, rgba(184, 23, 15, 0) 70%); transform: scale(calc(.8 + var(--heat, 0) * .8)); opacity: calc(min(1, var(--p, 0) * 30)); }

/* ---------- opening: gates split from the middle (home page) ---------- */
.intro { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; animation: intro-out 0s linear 2.9s forwards; }
.gate { position: absolute; top: 0; bottom: 0; width: 50.5%; background: #0b0a0a; box-shadow: inset 0 0 160px #000; }
.gate-l { z-index: 2; left: 0; animation: shudder .3s steps(2) 1.62s, gate-l .9s cubic-bezier(.7, 0, .2, 1) 1.95s forwards; }
.gate-r { right: 0; animation: shudder .3s steps(2) 1.62s, gate-r .9s cubic-bezier(.7, 0, .2, 1) 1.95s forwards; }
.seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; z-index: 3; transform: translateX(-50%) scaleY(0); transform-origin: top; background: linear-gradient(180deg, transparent, var(--red-hi) 15%, #fff 50%, var(--red-hi) 85%, transparent); box-shadow: 0 0 22px 5px rgba(216, 40, 28, .55), 0 0 80px 20px rgba(184, 23, 15, .3); animation: seam 1.9s ease-in-out .8s forwards; }
.flash { position: absolute; inset: 0; z-index: 6; background: radial-gradient(circle at 50% 50%, rgba(255, 236, 214, .85), rgba(216, 40, 28, .35) 22%, transparent 60%); opacity: 0; animation: flash .85s ease-out 1.95s forwards; }
.intro-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; }
@keyframes seam { 0% { transform: translateX(-50%) scaleY(0); } 38% { transform: translateX(-50%) scaleY(1); width: 2px; } 55% { width: 5px; } 100% { transform: translateX(-50%) scaleY(1); width: 70vw; opacity: 0; } }
@keyframes shudder { 0%, 100% { translate: 0 0; } 50% { translate: 3px -2px; } }
@keyframes gate-l { to { transform: translateX(-104%); } }
@keyframes gate-r { to { transform: translateX(104%); } }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: .85; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes intro-out { to { visibility: hidden; } }
/* waiting for Enter: everything holds at its first frame, the mark and button stand in the closed gates */
.intro.wait { pointer-events: auto; }
.intro .flash, .intro .seam, .intro-fx { pointer-events: none; }
.intro.wait, .intro.wait *, .waiting main, .waiting .top { animation-play-state: paused !important; }
.waiting { overflow: hidden; }
.intro-enter { min-width: 230px; margin-top: 6px; font-size: 24px; cursor: pointer; border: 0; }
/* who we are, written across the closed gates: statement on the left of the seam, three points on the right */
.intro-about { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: clamp(70px, 9vw, 170px); align-items: center; padding: clamp(80px, 12vh, 140px) clamp(28px, 6vw, 120px) clamp(40px, 8vh, 90px); animation: about-out .55s ease-in .05s forwards; }
@keyframes about-out { from { opacity: 1; } to { opacity: 0; transform: translateY(10px); } }
.about-lead { justify-self: end; max-width: 560px; text-align: right; }
.about-kicker { display: inline-block; margin-bottom: 18px; color: var(--red-hi); font: 700 clamp(13px, 1vw, 16px)/1 var(--ui); letter-spacing: .28em; text-transform: uppercase; }
.about-title { margin: 0; color: var(--bone); font: 400 clamp(46px, 5.6vw, 104px)/.92 var(--display); letter-spacing: .015em; text-transform: uppercase; text-shadow: 0 4px 30px rgba(0, 0, 0, .7); }
.about-title em { font-style: normal; color: var(--bone-dim); }
.about-text { margin: 22px 0 0 auto; max-width: 440px; color: #cfc5b6; font: 400 clamp(15px, 1.1vw, 18px)/1.6 var(--text); }
.about-points { justify-self: start; display: grid; gap: clamp(18px, 3vh, 30px); max-width: 460px; margin: 0; padding: 0; list-style: none; }
.about-points li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding-left: 18px; border-left: 2px solid rgba(216, 40, 28, .55); }
.about-points b { color: var(--red-hi); font: 400 clamp(30px, 2.4vw, 42px)/.9 var(--display); }
.about-points span { color: var(--bone-dim); font: 400 clamp(14px, 1vw, 16px)/1.5 var(--text); }
.about-points strong { display: block; margin-bottom: 4px; color: var(--bone); font: 700 clamp(18px, 1.4vw, 23px)/1.1 var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.about-act { grid-column: 1 / -1; justify-self: center; }
@media (max-width: 860px) {
  .intro-about { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 30px; align-content: center; padding: 70px 24px 40px; }
  .about-lead { justify-self: start; text-align: left; }
  .about-text { margin-left: 0; }
}
@media (max-width: 860px) and (max-height: 760px) { .about-points { display: none; } }
/* the gates: a darkened still of the first hero clip, split along the red seam */
.intro { --art-w: max(100vw, 177.78vh); }
.gate { overflow: hidden; background-color: #0a0909; background-image: radial-gradient(ellipse at 50% 50%, rgba(10, 9, 9, .55), rgba(10, 9, 9, .94) 75%), var(--gate-art, none); background-size: 100vw 100vh, var(--art-w) auto; background-repeat: no-repeat; filter: saturate(.55); }
.gate-l { background-position: 0 0, calc(50vw - var(--art-w) / 2) center; }
.gate-r { background-position: calc(-49.5vw) 0, calc(.5vw - var(--art-w) / 2) center; }
.intro-enter:focus-visible { outline: 2px solid var(--bone); outline-offset: 6px; }
.intro.go .intro-enter { pointer-events: none; }
.has-intro main, .has-intro .top { animation: reveal .65s var(--ease) 2s both; }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }

/* ---------- header: dark bar with a torn bottom edge ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 12px clamp(16px, 4vw, 48px) 10px;
  background: var(--black);
}
.top::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; background: url("/assets/torn-edge.svg") top / 100% 100% no-repeat; pointer-events: none; }
.brand img { width: clamp(124px, 13vw, 160px); height: auto; }
.menu { display: flex; gap: clamp(8px, 1.8vw, 26px); margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.menu a { padding: 6px 0; color: var(--bone); text-decoration: none; font: 700 19px/1 var(--ui); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; opacity: .82; border-bottom: 2px solid transparent; transition: opacity .2s, border-color .2s, color .2s; }
.menu a:hover { opacity: 1; }
.menu a.on { opacity: 1; color: #fff; border-color: var(--red-hi); }
.tools { display: flex; align-items: center; gap: 8px; }
.tool { position: relative; display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border: 0; background: rgba(239, 230, 214, .07); color: var(--bone); font: 700 16px/1 var(--ui); text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s; }
.tool:hover { background: rgba(239, 230, 214, .14); }
.tool[hidden] { display: none; }
.daynight .moon, .daynight[aria-pressed="true"] .sun { display: none; }
.daynight[aria-pressed="true"] .moon { display: inline; }
.daynight[aria-pressed="true"] { color: var(--red-hi); }
.sound .wave { display: none; }
.sound[aria-pressed="true"] .wave { display: inline; }
.sound[aria-pressed="true"] .mute { display: none; }
.sound.waiting { animation: sound-wait 1.6s ease-in-out infinite; }
@keyframes sound-wait { 50% { background: rgba(184, 23, 15, .55); } }
@media (prefers-reduced-motion: reduce) { .sound.waiting { animation: none; background: rgba(184, 23, 15, .45); } }
.cart b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--red); color: #fff; font: 700 11px/18px var(--text); text-align: center; }

/* ---------- hero: full-screen footage, centred title ---------- */
.hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); min-height: calc(100vh - 60px); display: grid; place-items: center; overflow: hidden; }
.hero-video { position: absolute; inset: 0; background: #000; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.hero-video video.out { opacity: 0; }
.hero-shade { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 45%, rgba(10, 9, 9, .15), rgba(10, 9, 9, .75)), linear-gradient(180deg, rgba(10, 9, 9, .25), rgba(10, 9, 9, .2) 55%, var(--black) 100%); }
/* scrolling down blacks the footage out (app.js sets --fade) */
.hero-video::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--fade, 0); }
.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 20px; }
.hero-mark { position: relative; transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); }
.hero-mark img { position: relative; width: clamp(90px, 10vw, 130px); height: auto; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .8)); }
.hero h1 { margin-top: 18px; font-size: clamp(56px, 9vw, 120px); text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero-tag { margin: 6px 0 30px; font: 700 clamp(18px, 2vw, 26px)/1.2 var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--bone); text-shadow: 0 2px 16px rgba(0, 0, 0, .7); }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- store ---------- */
.store { padding-top: clamp(50px, 7vw, 80px); scroll-margin-top: 70px; }
/* Products tabs: labels on one rail, the open one underlined in red */
.tabs { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: clamp(28px, 4vw, 44px); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { color: var(--bone-dim); font: 700 17px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding-bottom: 8px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.tabs a:hover { color: var(--bone); }
.tabs a.on { color: var(--bone); border-color: var(--red); }
.panel.on { animation: panel-in .55s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.panel-head h2 { font-size: clamp(40px, 5.5vw, 68px); }
.panel-head span { color: var(--muted); font: 700 16px/1 var(--ui); text-transform: uppercase; letter-spacing: .06em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(18px, 2.4vw, 30px); }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* cover card with torn edges; hover reveals the info panel */
.card { position: relative; display: block; text-decoration: none; transition: transform .4s var(--ease); }
.card:hover { transform: translateY(-6px); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ink); -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; }
.card:hover .card-media img { transform: scale(1.05); filter: brightness(.35) saturate(.8); }
.card-info {
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 26px;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .5s var(--ease);
  pointer-events: none;
}
.card:hover .card-info, .card:focus-visible .card-info { opacity: 1; transform: none; }
.card-name { font: 400 clamp(28px, 2.6vw, 36px)/1 var(--display); color: var(--bone); }
.card-text { color: var(--bone); font: 500 15px/1.5 var(--text); max-width: 300px; }
.card-info .brush { min-width: 140px; font-size: 18px; padding: 12px 24px 14px; }
.card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 4px 0; }
.card-title { font: 700 19px/1.1 var(--ui); text-transform: uppercase; color: var(--bone); }
.noimg { display: block; width: 100%; height: 100%; min-height: 120px; background: var(--ink); }

.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; white-space: nowrap; }
.price b { color: var(--bone); font: 700 20px/1 var(--ui); }
.price .was { color: var(--muted); font: 600 15px/1 var(--ui); }
.sale { align-self: center; padding: 3px 7px; background: var(--red); color: #fff; font: 700 13px/1 var(--ui); }

.soon { padding: 60px 24px; text-align: center; background: rgba(18, 16, 16, .7); -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat; }
.soon h3 { font-size: 40px; margin-bottom: 8px; }
.soon p { color: var(--bone-dim); margin: 0 0 6px; }

/* ---------- sections ---------- */
.section { margin-top: clamp(60px, 9vw, 100px); }
.section-title { font-size: clamp(34px, 4vw, 52px); margin-bottom: 22px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(26px, 4vw, 40px); background: rgba(18, 16, 16, .85); -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat; }
.cta .section-title { margin-bottom: 6px; }
.cta p { margin: 0; color: var(--bone-dim); }

.recent-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.recent-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; background: rgba(18, 16, 16, .8); border-left: 3px solid var(--red); }
.recent-list .who { font: 700 18px/1.1 var(--ui); text-transform: uppercase; }
.recent-list time { color: var(--muted); font-size: 13px; }
.recent-list .what { grid-column: 1 / -1; color: var(--bone-dim); font-size: 15px; }

/* ---------- product (window and full page) ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 26px 34px; align-items: start; }
.product-buy { padding: 26px; background: var(--ink); }
.product-buy h1 { font-size: clamp(38px, 4vw, 54px); margin: 10px 0 14px; }
.product-buy .price { margin-bottom: 22px; }
.product-buy .price b { font-size: 30px; }
.assure { list-style: none; margin: 18px 0 0; padding: 0; color: var(--bone-dim); font: 600 16px/1.4 var(--ui); text-transform: uppercase; letter-spacing: .02em; }
.assure li { padding: 5px 0 5px 20px; position: relative; }
.assure li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 8px; height: 3px; background: var(--red-hi); }
.product-desc { grid-column: 1 / -1; }
.product-page { padding-top: 40px; }

.gallery { display: flex; flex-direction: column; gap: 10px; outline: none; }
.stage { position: relative; background: #000; overflow: hidden; }
.slide { display: none; }
.slide.active { display: block; }
.slide.video { aspect-ratio: 16 / 9; }
.slide.video iframe { display: block; width: 100%; height: 100%; border: 0; }
.slide.image.active { display: grid; place-items: center; }
.slide.image img { width: auto; max-width: 100%; max-height: min(70vh, 760px); object-fit: contain; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.thumb { position: relative; flex: 0 0 auto; width: 96px; height: 62px; padding: 0; border: 2px solid transparent; background: #000; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover, .thumb[aria-current="true"] { opacity: 1; border-color: var(--red-hi); }
.thumb.is-video::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 0 4px #000); }

.prose { max-width: 780px; margin: 6px auto 0; padding-top: 26px; border-top: 1px solid var(--line); font: 400 16.5px/1.75 var(--text); color: #d6cdbf; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .5em; font: 400 28px/1.05 var(--display); color: var(--bone); letter-spacing: .02em; }
.prose strong, .prose b { color: var(--bone); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose ul li::marker { color: var(--red-hi); }
.prose a { color: var(--red-hi); text-underline-offset: 3px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 1.8em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--red); color: var(--bone-dim); }
.prose code { font-size: .9em; padding: 1px 5px; background: rgba(239, 230, 214, .08); }

/* ---------- windows (product, trailer) ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: clamp(8px, 3vw, 36px); animation: fade-in .25s ease both; }
.modal.closing { animation: fade-out .2s ease both; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .86); }
.modal-panel { position: relative; width: min(1160px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: clamp(18px, 3vw, 34px); background: #100e0e; box-shadow: 0 40px 120px rgba(0, 0, 0, .8); outline: none; animation: pop-in .3s var(--ease) both; }
.modal-panel.trailer { padding: 0; width: min(1280px, 100%); background: #000; }
.modal-panel.trailer iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.modal-close { position: sticky; top: 0; z-index: 5; display: block; width: 40px; height: 40px; margin: -6px -6px 10px auto; border: 0; background: var(--red); color: #fff; font: 400 26px/1 var(--text); cursor: pointer; }
.trailer .modal-close { position: absolute; top: 8px; right: 8px; margin: 0; }
.modal-loading { display: grid; place-items: center; min-height: 40vh; }
.modal-loading span { width: 32px; height: 32px; border: 3px solid rgba(239, 230, 214, .15); border-top-color: var(--red-hi); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(20px); } }

/* ---------- pages ---------- */
.page-head { padding: clamp(50px, 8vw, 90px) 0 30px; }
.page-head h1 { font-size: clamp(56px, 8vw, 100px); margin: 10px 0 8px; }
/* Night mode easter egg: a word on the About page that only the UV torch shows (a violet glow at the
   torch, clipped to the letters; app.js keeps --sx/--sy on it); touch screens see it faintly. Day mode: not there. */
.about-head { position: relative; }
.uv-secret { display: none; }
:root[data-time="night"] .uv-secret {
  display: block; position: absolute; right: 3%; top: 50%; z-index: 26; translate: 0 -40%; rotate: -5deg;
  padding: 0 .1em; border: 0; cursor: pointer; color: transparent; text-transform: uppercase; letter-spacing: .08em;
  font: 400 clamp(70px, 11vw, 160px)/1 var(--display);
  background: radial-gradient(circle 150px at var(--sx, -999px) var(--sy, -999px), rgba(214, 176, 255, .95), rgba(160, 92, 255, .6) 42%, transparent 74%);
  -webkit-background-clip: text; background-clip: text;
}
:root[data-time="night"] .uv-secret:focus-visible { outline: 1px dashed rgba(180, 125, 255, .6); }
@media (hover: none), (pointer: coarse) { :root[data-time="night"] .uv-secret { background: none; color: rgba(170, 110, 255, .22); } }
@media (max-width: 760px) { :root[data-time="night"] .uv-secret { position: static; translate: none; margin-top: 12px; font-size: 64px; } }
/* whispers: a short line that rises under the header and fades away */
.whisper { position: fixed; left: 50%; top: 96px; z-index: 60; translate: -50% 0; pointer-events: none; color: #e6dcff; font: 400 clamp(26px, 3vw, 40px)/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 18px rgba(160, 92, 255, .8), 0 2px 14px rgba(0, 0, 0, .8); white-space: nowrap; animation: whisper 5.2s ease both; }
@keyframes whisper { 0% { opacity: 0; transform: translateY(10px); filter: blur(4px); } 15%, 75% { opacity: 1; transform: none; filter: none; } 100% { opacity: 0; transform: translateY(-6px); filter: blur(3px); } }
.night-code { text-align: center; padding: clamp(28px, 4vw, 44px); max-width: 520px; }
.night-code h2 { font-size: clamp(44px, 6vw, 64px); color: #e6dcff; text-shadow: 0 0 22px rgba(160, 92, 255, .7); }
.night-code p { color: var(--bone-dim); margin: 10px 0 22px; }
.night-code code { display: block; margin: 0 auto 20px; padding: 14px 20px; border: 1px dashed rgba(180, 125, 255, .55); color: var(--bone); font: 400 clamp(34px, 5vw, 48px)/1 var(--display); letter-spacing: .14em; user-select: all; }
.narrow { max-width: 780px; margin: 0 auto; padding-top: 56px; }
.narrow h1 { font-size: clamp(48px, 6vw, 72px); margin-bottom: 20px; }
.items { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--line); }
.items li { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.items .name { flex: 1; font: 700 20px/1.1 var(--ui); text-transform: uppercase; }
.items .qty { color: var(--muted); }
.total { text-align: right; font: 700 20px var(--ui); text-transform: uppercase; }
.total b { font-size: 28px; margin-left: 10px; }
.row-end { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }
.message { text-align: center; }
.message p { color: var(--bone-dim); }

.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.panel-card { padding: 28px; background: rgba(18, 16, 16, .85); -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat; }
.panel-card h3 { font-size: 32px; margin-bottom: 10px; }
.panel-card p { color: var(--bone-dim); margin: 0; }
/* partners: torn dark cards, logo on a lit plate, links as red-underlined labels */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px; }
.partner { display: flex; flex-direction: column; padding: 26px; background: rgba(18, 16, 16, .85); -webkit-mask: var(--torn) center / 100% 100% no-repeat; mask: var(--torn) center / 100% 100% no-repeat; transition: background .25s; }
.partner:hover { background: rgba(28, 22, 21, .92); }
.partner-logo { display: grid; place-items: center; height: 150px; margin-bottom: 20px; background: radial-gradient(ellipse at 50% 55%, rgba(239, 230, 214, .08), transparent 70%); }
.partner-logo img { max-width: 78%; max-height: 120px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .7)); transition: transform .4s var(--ease); }
.partner:hover .partner-logo img { transform: scale(1.05); }
.partner-logo span { color: var(--bone-dim); font: 400 34px/1 var(--display); text-transform: uppercase; }
.partner h3 { font-size: 30px; margin: 0 0 8px; }
.partner p { color: var(--bone-dim); margin: 0 0 18px; }
.partner-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: auto; }
.partner-links a { color: var(--bone); font: 700 16px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding-bottom: 5px; border-bottom: 2px solid var(--red); transition: color .2s, border-color .2s; }
.partner-links a:hover { color: var(--red-hi); border-color: var(--red-hi); }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.faq details { background: rgba(18, 16, 16, .85); border-left: 3px solid transparent; transition: border-color .2s; }
.faq details[open] { border-color: var(--red); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font: 700 20px/1.2 var(--ui); text-transform: uppercase; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--red-hi); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--bone-dim); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr; gap: 14px 30px; align-items: center; padding: 34px clamp(16px, 4vw, 48px); background: #000; color: var(--muted); font-size: 14px; }
.foot::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; background: url("/assets/torn-edge.svg") top / 100% 100% no-repeat; transform: scaleY(-1); filter: brightness(0); }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: flex-end; }
.foot nav a { color: var(--bone-dim); text-decoration: none; font: 700 16px/1 var(--ui); text-transform: uppercase; }
.foot nav a:hover { color: var(--bone); }
.foot p { grid-column: 1 / -1; margin: 0; }
/* the seal puzzle: faint numbered shards of a code, and a small seal in the footer that takes it */
.shard { color: var(--muted); opacity: .5; font: 600 13px/1 var(--ui); letter-spacing: .3em; text-transform: none; user-select: text; }
.hero-shard { position: absolute; left: clamp(16px, 4vw, 48px); bottom: 22px; z-index: 2; }
.page-shard { display: block; margin-top: 18px; }
.seal { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 12px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--muted); cursor: pointer; vertical-align: middle; transition: color .2s, border-color .2s; }
.seal:hover, .seal:focus-visible { color: var(--red-hi); border-color: var(--red); }
.seal-box { display: grid; gap: 14px; justify-items: center; text-align: center; padding: clamp(28px, 4vw, 44px); width: min(460px, 100%); }
.seal-box h2 { font-size: clamp(40px, 5vw, 56px); }
.seal-box p { color: var(--bone-dim); margin: 0; }
.seal-box input { width: 100%; padding: 14px 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .5); color: var(--bone); text-align: center; font: 600 28px/1 var(--ui); letter-spacing: .24em; text-transform: none; outline: none; }
.seal-box input:focus { border-color: var(--red); }
.seal-box .seal-msg { min-height: 1em; font: 700 18px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.seal-box.denied { animation: seal-shake .4s ease; }
.seal-box.denied .seal-msg { color: var(--red-hi); }
.seal-box.opened .seal-msg { color: var(--bone); }
@keyframes seal-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.foot p.credit { font-size: 12px; }
.foot p.credit a { color: var(--muted); }

/* ---------- no accidental selection on UI ---------- */
.top, .hero, .intro, .brush, .card, .panel-head, .kicker, .foot nav, .modal-close, .thumbs, .gallery, .price, .page-head h1, .product-buy h1, .tool, .menu, .section-title {
  -webkit-user-select: none;
  user-select: none;
}
.prose, .prose * { -webkit-user-select: text; user-select: text; }

/* ---------- reveal on scroll ---------- */
.forge { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s var(--ease); }
.forge.forged { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 8px 14px; }
  .menu { order: 3; width: 100%; margin: 0; }
  .menu a { font-size: 17px; }
  .tools { margin-left: auto; }
  .tools .tool:not(.sound):not(.cart):not(.daynight) { display: none; }
  .hero { min-height: 78vh; }
  .card-info { display: none; }
  .foot { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
  .rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro, .field { display: none; }
  .has-intro main, .has-intro .top { animation: none; }
  html { scroll-behavior: auto; }
}
