/* =========================================================
   m1Ram: site styles (same design system as SRAM4u)
   ========================================================= */

:root {
  --bg: #0b0d33;
  --bg-2: #111444;          /* original brand navy */
  --surface: #161a52;
  --surface-2: #1d2263;
  --line: rgba(255, 255, 255, .1);
  --text: #f4f3fb;
  --muted: #b5b4d3;
  --faint: #8786ad;

  --amber: #fbbe5e;
  --red: #e6332a;
  --pink: #e14287;
  --rose: #e2a5ca;
  --purple: #7b4995;
  --grad: linear-gradient(120deg, var(--amber) 0%, var(--red) 45%, var(--pink) 75%, var(--rose) 100%);

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: #ffd38d; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--amber); color: #1a1030; padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber); margin-bottom: .9rem;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: .75rem 1.5rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none;
  color: #1b0f2e; background: var(--b); background-size: 160% 100%; background-position: 0 0;
  box-shadow: 0 10px 30px -10px rgba(230, 51, 42, .6);
  transition: background-position .4s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:hover { color: #1b0f2e; background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(225, 66, 135, .7); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3);
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.btn-sm { min-height: 40px; padding: .5rem 1.1rem; font-size: .9rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(11, 13, 51, .72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(11, 13, 51, .88); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand em, .brand-small em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { height: 42px; width: auto; }

.site-nav { display: flex; align-items: center; gap: .4rem; }
.site-nav a:not(.btn) {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem .85rem; border-radius: 999px; transition: color .15s, background-color .15s;
}
.site-nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.site-nav .btn { margin-left: .5rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .06); color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .25rem;
    padding: .75rem 1.25rem 1.25rem;
    background: rgba(11, 13, 51, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a:not(.btn) { padding: .8rem 1rem; font-size: 1.05rem; }
  .site-nav .btn { margin: .5rem 0 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem); isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; right: -120px; top: -80px; background: radial-gradient(circle, var(--pink), transparent 65%); }
.hero::after { width: 360px; height: 360px; right: 30%; top: 28%; background: radial-gradient(circle, var(--amber), transparent 65%); opacity: .28; }

.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 800; margin-bottom: 1.25rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 34em; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; color: var(--muted); font-size: .92rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.4 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hero-visual { position: relative; aspect-ratio: 1 / 1; max-width: 480px; justify-self: center; width: 100%; }
.fan {
  position: absolute; width: 64%; border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .5);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.fan-1 { left: 2%;  top: 6%;  transform: rotate(-9deg); }
.fan-2 { left: 34%; top: 20%; transform: rotate(6deg); z-index: 2; }
.hero-visual:hover .fan-1 { transform: rotate(-13deg) translate(-12px, -4px); }
.hero-visual:hover .fan-2 { transform: rotate(9deg) translate(10px, 6px); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: min(340px, 82%); order: -1; }
}

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
.section-sub { color: var(--muted); margin: 1rem 0 0; }
.glow-line {
  width: 120px; height: 4px; margin: 1.4rem auto 0; border-radius: 4px;
  background: var(--grad); background-size: 300% 100%;
  box-shadow: 0 0 24px rgba(225, 66, 135, .6);
  animation: glow 8s linear infinite;
}
@keyframes glow { to { background-position: 300% 0; } }

/* ---------- products ---------- */
.product {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}
.product + .product { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.product-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.product-flip .product-media { order: 2; }

/* the card photos are nearly square: show them whole, never cropped */
.product-media {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #e9e9e9;
  width: 100%; max-width: 480px; justify-self: center; align-self: start;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.product-media img { width: 100%; height: auto; transition: transform .6s ease; }
.product-media:hover img { transform: scale(1.04); }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.tag {
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--muted); border: 1px solid var(--line);
}
.tag-hot { color: #1b0f2e; background: var(--grad); border-color: transparent; }

.product h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: .8rem; }
.product-lead { color: var(--muted); font-size: 1.07rem; }
.product-lead strong { color: var(--text); }

.specs {
  list-style: none; padding: 0; margin: 1.5rem 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem;
}
.specs li {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .18); border: 1px solid var(--line);
  font-weight: 600; font-size: .95rem;
}
.specs li span { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.compat { font-size: .92rem; color: var(--muted); padding-left: .9rem; border-left: 3px solid var(--purple); }

/* ---- buy area ---- */
.buy-box {
  margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: grid; gap: 1rem;
}
.buy-box .buy-row { margin-top: 0; padding-top: 0; border-top: 0; }

.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.choice legend, .swatches legend {
  float: left; width: 5.5rem; margin-right: .25rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: .92rem;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18); color: var(--muted);
  transition: border-color .15s, background-color .15s, color .15s;
}
.opt:hover span { color: var(--text); }
.opt input:checked + span { border-color: var(--amber); background: rgba(251, 190, 94, .1); color: var(--text); }
.opt input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.flag { width: 19px; height: 10px; border-radius: 2px; }

.buy-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.price { margin: 0; display: flex; align-items: baseline; gap: .4rem; }
.price strong { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.price span { color: var(--faint); font-size: .95rem; }
.btn-buy { margin-left: auto; }
.btn-buy .pp { font-weight: 600; opacity: .75; }

.swatch[hidden] { display: none; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex-basis: 100%; }
.swatch {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .45rem .9rem .45rem .5rem; border-radius: 999px; font-weight: 600; font-size: .92rem;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .18);
  transition: border-color .15s, background-color .15s;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.swatch .dot-sparkle {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9) 0 1px, transparent 1.5px),
    radial-gradient(circle at 65% 55%, rgba(255, 255, 255, .8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 40% 75%, rgba(255, 255, 255, .7) 0 .8px, transparent 1.3px),
    var(--c);
}
.swatch:has(input:checked) { border-color: var(--amber); background: rgba(251, 190, 94, .1); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---- ROM library (MC-02) ---- */
.roms {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem;
  padding-top: clamp(1.25rem, 3vw, 2rem); border-top: 1px solid var(--line);
}
.roms-head { grid-column: 1 / -1; max-width: 720px; }
.roms h4 { font-size: 1.25rem; font-weight: 800; margin: 0 0 .5rem; letter-spacing: -.01em; }
.roms-head p { color: var(--muted); margin: 0; }
.rom-group h5 {
  margin: 0 0 .8rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
}
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li {
  font-size: .84rem; font-weight: 600; color: var(--muted);
  padding: .3rem .7rem; border-radius: 8px;
  background: rgba(0, 0, 0, .18); border: 1px solid var(--line);
}

.zoom {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: zoom-in; background: #e9e9e9;
}
.zoom img { width: 100%; height: auto; transition: transform .4s ease, opacity .2s; }
.zoom:hover img { transform: scale(1.03); opacity: .92; }

@media (max-width: 860px) {
  .product, .product-flip { grid-template-columns: 1fr; }
  .product-flip .product-media { order: 0; }
  .product-media { max-width: 380px; }
  .roms { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .specs { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .specs li { padding: .65rem .8rem; font-size: .9rem; }
  .choice legend, .swatches legend { float: none; width: 100%; margin-bottom: .1rem; }
  .btn-buy { width: 100%; margin-left: 0; }
}

/* ---------- downloads ---------- */
.howto {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.howto-media .zoom { box-shadow: var(--shadow); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.5rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #1b0f2e; background: var(--grad);
}
.steps h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .35rem; }
.steps p { color: var(--muted); margin: 0; font-size: .97rem; }

.downloads {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.download {
  display: flex; align-items: center; gap: 1rem; margin: 0;
  padding: 1.25rem 1.5rem; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--line);
}
.download img { width: 48px; height: 48px; flex: none; }
.download div { flex: 1; min-width: 0; }
.download h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .15rem; }
.download p { margin: 0; color: var(--faint); font-size: .85rem; overflow-wrap: anywhere; }
.download .btn { flex: none; }
.download .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.download-note { margin: 0; font-size: .9rem; color: var(--muted); grid-column: 1 / -1; text-align: center; }

@media (max-width: 860px) {
  .howto { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .download { flex-wrap: wrap; }
  .download .btn { width: 100%; }
}

/* ---------- ordering ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.feature {
  padding: 1.75rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
}
.feature svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px; margin-bottom: 1.1rem;
  fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(251, 190, 94, .1);
}
.feature h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: .6rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

.policies { max-width: 820px; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; display: grid; gap: .6rem; }
.policies details {
  border-radius: var(--radius-sm); background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  transition: background-color .2s;
}
.policies details[open] { background: rgba(255, 255, 255, .055); }
.policies summary {
  list-style: none; cursor: pointer; padding: 1rem 1.25rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.policies summary::-webkit-details-marker { display: none; }
.policies summary::after {
  content: ""; width: 10px; height: 10px; flex: none; margin-right: 4px;
  border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.policies details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.policies details p { padding: 0 1.25rem; color: var(--muted); font-size: .95rem; }
.policies details p:last-child { padding-bottom: .4rem; }

@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { max-width: 760px; }
.contact-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 700; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .14);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(251, 190, 94, .2); }
.field.invalid input, .field.invalid textarea { border-color: #ff6b6b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; font-weight: 600; font-size: .95rem; }
.form-status.ok { color: #7ee2a8; }
.form-status.err { color: #ff8a8a; }

@media (max-width: 560px) {
  .contact-form { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); color: var(--faint); font-size: .85rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; align-items: center; }
.footer-inner p { margin: 0; }
.brand-small { font-weight: 800; color: var(--muted); }
.legal { max-width: 560px; }

/* ---------- lightbox ---------- */
.lightbox {
  padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(5, 6, 25, .85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { max-height: 88vh; width: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox-close {
  position: absolute; top: -18px; right: -18px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--text); color: var(--bg); display: grid; place-items: center;
}
.lightbox-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 560px) { .lightbox-close { top: -52px; right: 0; } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
