/* neoproject.dev — single-screen, no-reload site. Design & build: Hossein.M
   Palette: black, white, greys, a little orange. Nothing else. */
@font-face { font-family: Unbounded; src: url(fonts/Unbounded-400.woff2) format('woff2'); font-weight: 300 400; font-display: swap; }
@font-face { font-family: Unbounded; src: url(fonts/Unbounded-500.woff2) format('woff2'); font-weight: 500 700; font-display: swap; }

:root {
  /* dark is the default; [data-theme=light] below swaps these */
  --bg: #050505;
  --bg-rgb: 5, 5, 5;
  --ink: #f1eee8;
  --ink-rgb: 241, 238, 232;
  --on-ink: #0a0a0a;            /* text on an --ink background */
  --tint: 255, 255, 255;        /* hover washes */
  --dim: rgba(241, 238, 232, .6);
  --faint: rgba(241, 238, 232, .34);
  --line: rgba(241, 238, 232, .09);
  --line-2: rgba(241, 238, 232, .17);
  --glass: rgba(10, 10, 10, .6); /* panels over the particle field */
  --surface: #080808;           /* the menu */
  --media: #111;                /* behind images */
  --media-2: #1c1c1c;
  --vignette: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .78));
  --acc: #E85002;
  --sans: 'Inter', 'Helvetica Neue', 'Segoe UI', Arial, system-ui, sans-serif;
  --lat: Unbounded, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --bar: 68px;
  --rail: 42px;
  --gut: clamp(16px, 3vw, 44px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #fafafa;
  --bg-rgb: 250, 250, 250;
  --ink: #0b0b0b;
  --ink-rgb: 11, 11, 11;
  --on-ink: #fafafa;
  --tint: 0, 0, 0;
  --dim: rgba(11, 11, 11, .64);
  --faint: rgba(11, 11, 11, .42);
  --line: rgba(11, 11, 11, .1);
  --line-2: rgba(11, 11, 11, .2);
  --glass: rgba(255, 255, 255, .78);
  --surface: #f3f3f3;
  --media: #e4e4e4;
  --media-2: #efefef;
  --vignette: radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0, 0, 0, .06));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow: hidden; overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3, p { margin: 0; }
.dim { color: var(--dim); }
.acc { color: var(--acc); }
.skip { position: fixed; top: -60px; left: 16px; z-index: 100; background: var(--acc); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 1.5px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--acc); color: #000; }

/* ---- atmosphere --------------------------------------------------------- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .065; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.6s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); } 67% { transform: translate(8%, 2%); } 83% { transform: translate(-7%, -4%); } 100% { transform: translate(0, 0); }
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(50% 55% at 74% 46%, rgba(232, 80, 2, .06), transparent 70%),
    var(--vignette);
}

/* ---- bar + rail ---------------------------------------------------------- */
.bar, .rail { position: fixed; inset-inline: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gut); }
.bar { top: 0; height: var(--bar); }
.rail { bottom: 0; height: var(--rail); font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 500 14px var(--lat); letter-spacing: -.01em; }
.brand .mark { width: auto; height: 26px; color: var(--ink); transition: color .3s; }
.brand:hover .mark { color: var(--acc); }
.bar-route { position: absolute; inset-inline: 0; margin-inline: auto; width: max-content; display: inline-flex; align-items: center; gap: 10px; font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); animation: pulse 2.2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 80, 2, .55); } 70% { box-shadow: 0 0 0 9px rgba(232, 80, 2, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 80, 2, 0); } }
.bar-end { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px 0 16px; border-radius: 99px; border: 1px solid var(--line-2); font: 12px var(--lat); transition: background .3s, border-color .3s, color .3s; position: relative; z-index: 2; }
.menu-btn:hover { border-color: var(--ink); }
.menu-lines { display: grid; gap: 5px; width: 18px; }
.menu-lines i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease), width .5s var(--ease); }
.menu-lines i:last-child { width: 60%; margin-inline-start: auto; }
body.menu-open .menu-btn { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
body.menu-open .menu-lines i:first-child { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .menu-lines i:last-child { width: 100%; transform: translateY(-3.25px) rotate(-45deg); }
.rail-mid { display: inline-flex; align-items: center; gap: 9px; letter-spacing: .12em; font: 10.5px var(--mono); }
.rail-mid .pulse { width: 5px; height: 5px; }
.sep { opacity: .4; margin-inline: 4px; }
.sig { color: var(--dim); }
.rail-soc { display: flex; gap: 14px; font-size: 16px; }
.rail-soc a { color: var(--faint); transition: color .25s; }
.rail-soc a:hover { color: var(--ink); }

/* ---- buttons, chips, tiers ---------------------------------------------- */
.btn {
  --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 22px;
  border-radius: 99px; font-size: 14px; font-weight: 500; white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn svg { font-size: 18px; transition: transform .4s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 13px; }
.btn-acc { background: var(--ink); color: var(--on-ink); }
.btn-acc::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--acc); transform: translateY(101%); transition: transform .5s var(--ease); border-radius: inherit; }
.btn-acc:hover::before { transform: none; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(var(--tint), .04); }
.btn-dark { background: #0a0a0a; color: #fff; width: 100%; }
.btn-dark:hover { background: var(--acc); color: #000; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

.chip { height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; color: var(--dim); display: inline-flex; align-items: center; gap: 7px; transition: color .2s, background-color .2s, border-color .2s; }
.chip span { font: 10px var(--mono); opacity: .6; }
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tier { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.tier-free { color: var(--ink); }
.tier-freemium { color: var(--acc); border-color: rgba(232, 80, 2, .45); }
.tier-paid { color: var(--on-ink); background: var(--ink); border-color: var(--ink); }
.tier-soon { color: var(--faint); border-style: dashed; }

.kicker { font: 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.display { font-family: var(--lat); font-weight: 400; font-size: clamp(32px, 4.4vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.display .ln { display: block; }
.display em { font-style: normal; color: var(--faint); }
.lead { font-size: clamp(14.5px, 1.1vw, 16.5px); color: var(--dim); max-width: 48ch; line-height: 1.7; }
.plogo { border-radius: 26%; object-fit: cover; flex: none; background: var(--media); filter: grayscale(1) contrast(1.08); }
.plogo-text { display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, var(--media-2), var(--media)); border: 1px solid var(--line-2); color: var(--ink); font: 500 40% var(--lat); }

/* ---- view / reveal -------------------------------------------------------- */
.view { position: fixed; z-index: 5; inset: var(--bar) 0 var(--rail); padding: 10px var(--gut) 22px; outline: none; }
.reveal { opacity: 0; transform: translateY(18px); animation: rv .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 70ms + 80ms); }
@keyframes rv { to { opacity: 1; transform: none; } }
.view.leaving { animation: leave .38s var(--ease-io) forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-14px); } }

.wipe { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
.wipe i { position: absolute; inset-inline: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--acc) 30%, var(--ink) 50%, var(--acc) 70%, transparent); box-shadow: 0 0 22px 2px rgba(232, 80, 2, .5); opacity: 0; }
.wipe.go i { animation: scan .75s var(--ease-io); }
@keyframes scan { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(100vh); } }

/* ---- menu ----------------------------------------------------------------- */
.menu {
  position: fixed; inset: 0; z-index: 30; background: var(--surface); display: grid; grid-template-rows: 1fr auto;
  padding: calc(var(--bar) + 20px) var(--gut) 0; visibility: hidden;
  clip-path: circle(0 at var(--mx, 92%) var(--my, 4%)); transition: clip-path .55s var(--ease-io), visibility 0s .55s;
}
body.menu-open .menu { visibility: visible; clip-path: circle(150% at var(--mx, 92%) var(--my, 4%)); transition: clip-path .55s var(--ease-io), visibility 0s; }
body.menu-instant .menu, body.menu-instant .menu * { transition-duration: 0s !important; transition-delay: 0s !important; }
.menu-noise { position: absolute; inset: 0; opacity: .5; pointer-events: none; background: radial-gradient(40% 50% at 82% 80%, rgba(232, 80, 2, .16), transparent 70%), radial-gradient(30% 40% at 15% 20%, rgba(255, 255, 255, .05), transparent 70%); }
.menu-in { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 5vw; align-items: center; min-height: 0; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li { border-top: 1px solid var(--line); opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.menu-list li:last-child { border-bottom: 1px solid var(--line); }
body.menu-open .menu-list li { opacity: 1; transform: none; transition-delay: calc(.12s + var(--d) * 45ms); }
.menu-list a { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 18px; padding: clamp(6px, 1.3vh, 14px) 0; position: relative; }
.mi-n { font: 11px var(--mono); color: var(--faint); }
.mi-t { font-family: var(--lat); font-size: clamp(30px, 5.2vw, 74px); line-height: 1.1; font-weight: 400; letter-spacing: -.05em; transition: transform .6s var(--ease), color .3s; }
.mi-note { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); display: inline-flex; gap: 6px; align-items: center; }
.menu-list a::after { content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.menu-list a.on::after { transform: scaleX(1); }
.menu-list a.on .mi-n { color: var(--acc); }
.menu-side { display: grid; gap: 30px; align-content: center; opacity: 0; transition: opacity .35s var(--ease); }
body.menu-open .menu-side { opacity: 1; transition-delay: .3s; }
.menu-feat { display: grid; gap: 8px; margin-top: 12px; }
.mf { display: grid; grid-template-columns: 92px 1fr 20px; align-items: center; gap: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; transition: border-color .2s, background-color .2s; }
.mf-img { aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: var(--media); }
.mf-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) brightness(.8); transition: filter .3s; }
.mf-txt { min-width: 0; }
.mf-txt b { display: block; font: 400 14px var(--lat); letter-spacing: -.03em; }
.mf-txt small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-go { color: var(--faint); font-size: 18px; transition: color .2s, transform .25s var(--ease); }
.menu-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--dim); transition: color .2s; }
.menu-all svg { transition: transform .25s var(--ease); }
.menu-soc { display: grid; gap: 2px; margin-top: 12px; }
.menu-soc a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; transition: color .2s; }
.menu-soc a .dim { font: 11px var(--mono); }
.menu-soc a:hover { color: var(--acc); }
.menu-foot { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); position: relative; flex-wrap: wrap; }
body.menu-open .bar-route, body.menu-open .bar-donate { opacity: 0; pointer-events: none; }
.bar-route, .bar-donate { transition: opacity .3s; }

/* ---- frames --------------------------------------------------------------- */
.frame { position: relative; display: block; overflow: hidden; border-radius: 22px; background: var(--media); border: 1px solid var(--line); aspect-ratio: 16 / 10; isolation: isolate; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.06) brightness(.9); transition: transform 1.2s var(--ease), opacity .35s, filter .5s; }
.frame-noise { position: absolute; inset: 0; pointer-events: none; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.frame-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px); opacity: .5; }
.frame-scan::after { content: ''; position: absolute; inset-inline: 0; height: 30%; top: -30%; background: linear-gradient(transparent, rgba(255, 255, 255, .06), transparent); animation: sweep 5s linear infinite; }
@keyframes sweep { to { top: 100%; } }
.frame-tag { position: absolute; bottom: 12px; left: 14px; font: 9.5px var(--mono); letter-spacing: .18em; color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .55); padding: 4px 9px; border-radius: 99px; }
.frame-tag::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--acc); margin-right: 7px; vertical-align: 1px; }
.frame-logo { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 50%, var(--media-2), var(--media)); }
.frame-logo .plogo { width: 30%; height: auto; aspect-ratio: 1; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.frame.swap img, .frame.swap .frame-logo { opacity: 0; filter: grayscale(1) contrast(2) brightness(1.6); }
.frame-logo[hidden] { display: none; }

/* ---- rings ---------------------------------------------------------------- */
.ring { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring line { stroke: rgba(var(--ink-rgb), .16); stroke-width: .7; stroke-linecap: round; }
.ring line.on, .ring .dot { opacity: 0; animation: tick .4s forwards; animation-delay: calc(var(--i) * 14ms + 300ms); }
.ring line.on { stroke: var(--ink); stroke-width: .9; }
.ring .dot { fill: var(--ink); }
.ring .dot.head { fill: var(--acc); }
@keyframes tick { to { opacity: 1; } }
.ring-n { position: relative; font: 400 calc(var(--s) * .17) var(--lat); letter-spacing: -.04em; display: flex; align-items: baseline; gap: 2px; }
.ring-n small { font-size: 45%; color: var(--dim); }

/* ==== HOME ================================================================= */
.home { height: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0 4vw; }
.home-copy { grid-column: 1; align-self: center; display: grid; gap: clamp(14px, 2.4vh, 26px); padding-top: 2vh; }
.nums { display: flex; gap: clamp(24px, 3vw, 48px); margin: 4px 0 0; padding-top: clamp(12px, 2vh, 20px); border-top: 1px solid var(--line); max-width: 520px; }
.nums div { display: grid; gap: 2px; }
.nums dt { font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); order: 2; }
.nums dd { margin: 0; font: 400 clamp(22px, 2.4vw, 34px) var(--lat); letter-spacing: -.04em; }
.home-fig { grid-column: 2; grid-row: 1; position: relative; font: 10px var(--mono); letter-spacing: .16em; color: var(--faint); pointer-events: none; }
.fig-tl { position: absolute; top: 8%; left: 6%; }
.fig-br { position: absolute; bottom: 8%; right: 6%; }
.home-fig::before, .home-fig::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1px solid var(--line-2); }
.home-fig::before { top: 5%; left: 3%; border-width: 1px 0 0 1px; }
.home-fig::after { bottom: 5%; right: 3%; border-width: 0 1px 1px 0; }
.home-strip { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; }
.strip-now, .strip-feat { border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; gap: 10px; transition: border-color .3s; }
.strip-now:hover { border-color: var(--line-2); }
.strip-h { display: flex; justify-content: space-between; align-items: center; }
.strip-h .go { font-size: 12px; color: var(--dim); display: inline-flex; gap: 6px; align-items: center; }
.strip-rings, .strip-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.strip-rings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini > span:last-child, .strip-list a > span { min-width: 0; }
.mini b, .strip-list b { display: block; font: 400 12px var(--lat); letter-spacing: -.02em; white-space: nowrap; }
.mini small, .strip-list small { display: block; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-list a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px; border-radius: 12px; transition: background .25s; }
.strip-list a:hover { background: rgba(var(--tint), .04); }

/* ==== PROJECTS ============================================================= */
.plist { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 6vw; }
.plist-nav { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; gap: 8px; }
.plist-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drum { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 18px; min-height: 0; }
.pos-rail { position: relative; align-self: center; }
.pos-rail #rail { display: grid; gap: 0; }
.pos-rail #rail i { display: block; width: 8px; height: 12px; position: relative; }
.pos-rail #rail i::before { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 1px; background: var(--line-2); transition: width .25s var(--ease), background-color .25s; }
.pos-rail #rail i.on::before { width: 18px; background: var(--ink); }
.pos-rail #rail-dot { position: absolute; left: -10px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); }
.names-wrap { position: relative; min-height: 0; overflow: hidden; mask-image: linear-gradient(transparent, #000 26%, #000 74%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 26%, #000 74%, transparent); }
.names { list-style: none; margin: 0; padding: 0; position: absolute; inset-inline: 0; top: 50%; will-change: transform; }
.names li[hidden] { display: none; }
.names a { display: flex; align-items: center; gap: 18px; height: clamp(52px, 8.4vh, 78px); }
.names .idx { font: 10.5px var(--mono); color: var(--faint); width: 22px; flex: none; transition: color .2s; }
.names .nm { font: 300 clamp(30px, 3.9vw, 58px)/1 var(--lat); letter-spacing: -.055em; color: var(--ink); opacity: .14; display: inline-block; transform-origin: left center; white-space: nowrap; }
.names a.on .idx { color: var(--acc); }
.plist-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.count-big { font: 300 clamp(34px, 3.4vw, 52px)/1 var(--lat); letter-spacing: -.05em; }
.count-big small { font-size: 38%; color: var(--faint); letter-spacing: 0; margin-left: 4px; }
.hint { font: 10px/1.7 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); text-align: right; }
.hint b { color: var(--dim); font-weight: 400; }
.plist-prev { align-self: center; display: grid; gap: 22px; }
.layer { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); }
.layer.was { clip-path: inset(0); z-index: 1; }
.layer.on { clip-path: inset(0); z-index: 2; transition: clip-path .5s var(--ease-io); }
.layer > img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.06) brightness(.9); transition: transform 1.2s var(--ease), filter .5s; }
.frame .frame-noise, .frame .frame-scan, .frame .frame-tag { z-index: 3; }
.prev-meta { display: grid; gap: 12px; }
.prev-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prev-meta h2 { font: 400 clamp(26px, 2.6vw, 38px) var(--lat); letter-spacing: -.045em; }
.prev-meta p { color: var(--dim); min-height: 3.2em; max-width: 52ch; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs div { padding: 10px 0; }
.specs div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.specs dt { font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.specs dd { margin: 2px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==== PRODUCT ============================================================== */
.prod { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 4.5vw; align-items: center; }
.prod-info { display: grid; gap: clamp(10px, 1.8vh, 18px); min-height: 0; max-height: 100%; align-content: center; }
.crumb { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); width: max-content; }
.crumb:hover { color: var(--ink); }
.crumb .dim { font: 10px var(--mono); margin-inline-start: 6px; }
.pid { display: flex; align-items: center; gap: 16px; }
.pid h1 { font: 400 clamp(30px, 3.4vw, 52px)/1.1 var(--lat); letter-spacing: -.05em; margin-bottom: 6px; }
.prod .lead { color: var(--ink); font-size: clamp(15px, 1.2vw, 18px); }
.long { color: var(--dim); font-size: 14px; max-width: 60ch; }
.prod-road { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 8px 16px 8px 8px; width: max-content; max-width: 100%; }
.prod-road b { display: block; font-size: 13px; font-weight: 500; }
.prod-road small { color: var(--faint); font-size: 12px; }
.tabs { border-top: 1px solid var(--line); min-height: 0; min-width: 0; }
.prod-info > *, .give-col > *, .home-copy > * { min-width: 0; }
.tab-bar { display: flex; gap: 22px; position: relative; }
.tab-bar button { padding: 12px 0; font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); transition: color .25s; }
.tab-bar button.on { color: var(--ink); }
.tab-ink { position: absolute; top: -1px; left: 0; height: 1px; background: var(--acc); transition: transform .35s var(--ease), width .35s var(--ease); }
.pane { display: none; }
.pane.on { display: block; animation: rv .6s var(--ease); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.fitem { position: relative; padding-inline-start: 30px; }
.fitem .idx { position: absolute; inset-inline-start: 0; top: 3px; font: 10px var(--mono); color: var(--acc); }
.fitem h3 { font-size: 13.5px; font-weight: 500; }
.fitem p { font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.code { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: rgba(var(--tint), .035); border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; }
.code code { flex: 1; font: 12px var(--mono); color: var(--ink); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; height: 32px; padding: 0 12px; border-radius: 99px; background: rgba(var(--tint), .07); flex: none; transition: background .2s; }
.copy:hover { background: rgba(var(--tint), .14); }
.copy.done { background: var(--acc); color: #000; }
.links { display: grid; gap: 2px; }
.links a { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; transition: color .2s; }
.links a svg { font-size: 17px; color: var(--dim); }
.links a .dim { margin-inline-start: auto; font: 11px var(--mono); }
.links a:hover { color: var(--acc); }
.prod-vis { display: grid; gap: 14px; }
.frame-big { aspect-ratio: 16 / 10.5; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pager a { border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; display: grid; transition: border-color .3s, background .3s; }
.pager a:hover { border-color: var(--line-2); background: rgba(var(--tint), .03); }
.pager small { font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pager b { font: 400 14px var(--lat); letter-spacing: -.03em; }
.pg-next { text-align: right; }

/* ==== NOW ================================================================== */
.now { height: 100%; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); grid-template-rows: 1fr auto; gap: 20px 4vw; align-items: center; }
.now-head { display: grid; gap: 18px; }
.now-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 720px; justify-self: center; width: 100%; }
.ncard { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 26px 18px 22px; border-radius: 24px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .3s, transform .6s var(--ease); }
.ncard .ring { --s: clamp(130px, 12.5vw, 190px) !important; }
.ncard-t b { display: block; font: 400 16px var(--lat); letter-spacing: -.03em; }
.ncard-t small { color: var(--faint); font: 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.ncard-p { font-size: 12.5px; color: var(--dim); line-height: 1.6; }
.now-lic { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 24px; border-radius: 22px; padding: 18px 22px; background: rgba(var(--tint), .03); border: 1px solid var(--line-2); transition: border-color .3s; }
.now-lic:hover { border-color: var(--acc); }
.now-lic .kicker { grid-row: 1 / 3; color: var(--acc); }
.now-lic b { font-size: 16px; font-weight: 500; }
.now-lic small { color: var(--dim); font-size: 12.5px; grid-column: 2; }
.now-lic .btn { grid-column: 3; grid-row: 1 / 3; }

/* ==== DONATE =============================================================== */
.give { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .82fr); grid-template-rows: minmax(0, 1fr); gap: 2.8vw; }
.give-col { min-height: 0; display: flex; flex-direction: column; }
.give-intro { gap: clamp(12px, 2vh, 18px); justify-content: center; }
.give .display { font-size: clamp(28px, 3vw, 48px); }
.give .lead { font-size: 14.5px; }

/* totals: crypto in USD and card in Toman, kept apart on purpose */
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tot { background: var(--bg); padding: 14px 16px; display: grid; gap: 2px; }
.tot-k { font: 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.tot-v { font: 400 clamp(24px, 2.4vw, 34px)/1.1 var(--lat); letter-spacing: -.04em; }
.tot small { font-size: 11px; color: var(--faint); }
.tot-foot { grid-column: 1 / -1; background: var(--bg); padding: 10px 16px; font-size: 12.5px; color: var(--dim); }

/* the goal line */
.goal { border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; display: grid; gap: 8px; background: var(--glass); }
.goal-top { display: flex; justify-content: space-between; align-items: center; }
.goal-top .kicker { color: var(--acc); }
.goal-nav { display: flex; gap: 6px; }
.goal-nav button { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color .2s; }
.goal-nav button.on { background: var(--ink); }
.goal-t { font: 400 clamp(17px, 1.5vw, 21px)/1.2 var(--lat); letter-spacing: -.035em; }
.goal-b { font-size: 13px; color: var(--dim); line-height: 1.55; }
.goal-bar { display: grid; grid-template-columns: repeat(60, 1fr); gap: 2px; height: 22px; align-items: end; margin-top: 4px; }
.goal-bar i { display: block; height: 55%; border-radius: 1px; background: var(--line-2); }
.goal-bar i.on { height: 100%; background: var(--ink); opacity: 0; animation: tick .3s var(--ease) forwards; animation-delay: calc(var(--i) * 12ms + 200ms); }
.goal-bar i.head { background: var(--acc); }
.goal.reached .goal-bar i.on { background: var(--acc); }
.goal-nums { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--dim); }
.goal-nums b { color: var(--ink); font: 400 15px var(--lat); letter-spacing: -.03em; }
#d-goal-pct { font: 11px var(--mono); letter-spacing: .12em; color: var(--ink); }
.goal-meta { font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* the form card */
.give-form { justify-content: center; }
.card-light { background: #f1eee8; color: #0a0a0a; border-radius: 28px; padding: clamp(18px, 2.6vh, 28px) clamp(18px, 2vw, 28px); display: grid; gap: 14px; box-shadow: 0 40px 120px -50px rgba(232, 80, 2, .35); max-height: 100%; overflow: auto; scrollbar-width: none; }
.card-light .note { font-size: 12px; color: #66625b; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 8px; font: 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #9a958c; padding-bottom: 10px; border-bottom: 2px solid #dcd8d0; transition: color .2s, border-color .2s; }
.steps li i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-size: 10px; }
.steps li.on { color: #0a0a0a; border-color: #0a0a0a; }
.steps li.done i { background: #0a0a0a; color: #f1eee8; border-color: #0a0a0a; }
.step { display: none; gap: 12px; }
.step.on { display: grid; animation: rv .45s var(--ease); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(var(--tint), .04); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.seg button { height: 34px; border-radius: 99px; font-size: 12.5px; color: var(--dim); transition: background-color .25s var(--ease), color .25s var(--ease); }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.seg-light { background: #e2dfd8; border: 0; }
.seg-light button { color: #55524c; }
.seg-light button.on { background: #0a0a0a; color: #f1eee8; }
.pay-pane { display: none; gap: 12px; }
.pay-pane.on { display: grid; }
.coins { display: flex; gap: 8px; flex-wrap: wrap; }
.coins button { display: grid; text-align: left; gap: 0; padding: 8px 14px; border-radius: 14px; border: 1px solid #d6d2ca; min-width: 96px; transition: border-color .2s, background-color .2s; }
.coins button b { font: 500 14px var(--lat); letter-spacing: -.02em; }
.coins button small { font: 10px var(--mono); letter-spacing: .1em; color: #8a857c; }
.coins button.on { border-color: #0a0a0a; background: #fff; }
.addr { display: grid; gap: 6px; }
.addr-k { font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #7a756c; }
.card-light .code { margin: 0; background: #e2dfd8; border: 0; border-radius: 12px; padding: 6px 6px 6px 12px; }
.card-light .code code { color: #0a0a0a; font-size: 11.5px; }
.card-light .copy { background: #0a0a0a; color: #f1eee8; }
.card-light .copy.done { background: var(--acc); color: #000; }
.amt { display: grid; gap: 4px; }
.amt-in { display: flex; align-items: center; background: #e2dfd8; border-radius: 16px; padding-right: 14px; border: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.amt-in:focus-within { border-color: #0a0a0a; background: #fff; }
.amt-in input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 10px 14px; font: 400 22px var(--lat); letter-spacing: -.03em; color: #0a0a0a; }
.amt-in b { font: 11px var(--mono); letter-spacing: .12em; color: #55524c; }
.amt-usd { font: 11px var(--mono); letter-spacing: .06em; color: #7a756c; padding-left: 12px; }
.sum { font-size: 13px; color: #55524c; background: #e2dfd8; border-radius: 12px; padding: 10px 12px; }
.sum b { color: #0a0a0a; }
.step-act { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.btn-line { border: 1px solid #c9c4bb; color: #0a0a0a; }
.btn-line:hover { border-color: #0a0a0a; }
.step.done { text-align: center; justify-items: center; padding: 20px 0; }
.step.done b { font: 400 26px var(--lat); letter-spacing: -.04em; }
.step.done p { font-size: 13px; color: #55524c; max-width: 34ch; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dform { display: none; gap: 9px; }
.dform.on { display: grid; }
.dform label { display: grid; gap: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2[hidden], .dform label[hidden] { display: none; }
.lab { font-size: 11.5px; color: #55524c; padding-inline-start: 12px; }
.lab span { color: #9a958c; }
.dform input:not([type=checkbox]), .dform select, .dform textarea {
  width: 100%; font: inherit; font-size: 13px; color: #0a0a0a; background: #e2dfd8; border: 1px solid transparent; border-radius: 14px; padding: 9px 14px; outline: none; transition: border-color .2s, background-color .2s; resize: none;
}
.dform input:focus, .dform select:focus, .dform textarea:focus { border-color: #0a0a0a; background: #fff; }
.dform input[type=file] { padding: 7px 10px; font-size: 12px; }
.dform input[type=file]::file-selector-button { font: inherit; border: 0; background: #0a0a0a; color: #fff; border-radius: 99px; padding: 4px 12px; margin-inline-end: 10px; cursor: pointer; }
.check { display: flex !important; align-items: center; gap: 8px; font-size: 12.5px; color: #55524c; padding-inline-start: 6px; cursor: pointer; }
.check input { accent-color: var(--acc); width: 15px; height: 15px; }
.form-msg { font-size: 12.5px; text-align: center; }
.form-msg:empty { display: none; }
.form-msg.err { color: #c2410c; }

/* the wall */
.give-wall { gap: 12px; border-inline-start: 1px solid var(--line); padding-inline-start: 2.2vw; padding-block: 2vh; }
.wall-h { display: flex; align-items: center; justify-content: space-between; }
.wall-h h2 { font: 400 15px var(--lat); letter-spacing: -.03em; }
.top { display: grid; gap: 6px; }
.top:empty { display: none; }
.top .donor { border-color: var(--line-2); background: rgba(var(--tint), .04); }
.top .donor:first-child { border-color: rgba(232, 80, 2, .4); }
.top .donor:first-child b::before { content: '★ '; color: var(--acc); }
.wall-scroll { flex: 1; min-height: 0; overflow: hidden; position: relative; mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent); }
.recent { display: grid; gap: 6px; }
.recent.marquee { animation: marquee var(--dur, 40s) linear infinite; }
.wall-scroll:hover .recent.marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateY(-50%); } }
.donor { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; background: var(--glass); }
.donor b { display: block; font-size: 13px; font-weight: 500; }
.donor small { display: block; font-size: 12px; color: var(--dim); line-height: 1.5; margin-top: 2px; overflow-wrap: anywhere; }
.donor > span { font: 11px var(--mono); color: var(--ink); white-space: nowrap; }
@media (min-width: 961px) and (max-height: 780px) {
  .give .lead { display: none; }
  .goal-b { display: none; }
}

/* ==== 404 ================================================================= */
.lost { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; }
.lost .display { font-size: clamp(90px, 18vw, 240px); line-height: 1; position: relative; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; }
.glitch::before { color: var(--acc); clip-path: inset(0 0 60% 0); animation: gl 2.4s steps(2) infinite; mix-blend-mode: screen; }
.glitch::after { color: #777; clip-path: inset(55% 0 0 0); animation: gl 3s steps(2) infinite reverse; mix-blend-mode: screen; opacity: .6; }
@keyframes gl { 0%, 100% { transform: translate(0); } 20% { transform: translate(-4px, 1px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, 2px); } }

/* ==== responsive ============================================================ */
@media (max-height: 760px) and (min-width: 961px) {
  .display { font-size: clamp(30px, 3.8vw, 56px); }
  .fgrid { gap: 6px 22px; }
  .fitem p { display: none; }
  .home-strip small { display: none; }
}
@media (max-width: 1180px) and (min-width: 961px) {
  .give { grid-template-columns: 1fr 1.1fr; }
  .give-wall { display: none; }
}
@media (max-width: 960px) {
  :root { --bar: 60px; }
  body { overflow-x: hidden; overflow-y: auto; }
  .view { position: relative; inset: auto; min-height: 100svh; padding: calc(var(--bar) + 12px) var(--gut) calc(var(--rail) + 30px); }
  .rail { background: rgba(var(--bg-rgb), .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .rail-copy .sig, .rail-copy .sep { display: none; }
  .bar { background: linear-gradient(rgba(var(--bg-rgb), .9), rgba(var(--bg-rgb), 0)); }
  .bar-route { display: none; }
  .bar-donate span { display: none; }
  .bar-donate { width: 40px; padding: 0; }
  .home, .plist, .prod, .now, .give { height: auto; grid-template-columns: 1fr; grid-template-rows: none; gap: 28px; }
  .home-fig { display: none; }
  .home-copy { padding-top: 38vh; }
  .home-strip, .strip-rings, .strip-list { grid-template-columns: 1fr; }
  .strip-rings { gap: 8px; }
  .names-wrap { mask-image: none; -webkit-mask-image: none; overflow: visible; }
  .names { position: static; transform: none !important; }
  .names .nm { font-size: 30px; opacity: .7 !important; transform: none !important; }
  .drum { grid-template-columns: 1fr; }
  .pos-rail, .plist-foot { display: none; }
  .names a { height: auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .plist-prev, .hint { display: none; }
  .fgrid { grid-template-columns: 1fr; }
  .prod-vis { order: -1; }
  .now-grid { grid-template-columns: 1fr; }
  .now-lic { grid-template-columns: 1fr; }
  .now-lic > * { grid-column: auto !important; grid-row: auto !important; }
  .give-wall { border: 0; padding: 0; }
  .wall-scroll { max-height: 420px; }
  .menu { overflow-y: auto; grid-template-rows: auto auto; align-content: start; }
  .menu-in { grid-template-columns: 1fr; align-content: start; gap: 30px; }
  .mi-t { font-size: 38px; }
  .menu-foot span:nth-child(2) { display: none; }
}
@media (max-width: 520px) {
  .rail-mid { display: none; }
  .nums { gap: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .menu-list a { grid-template-columns: 30px 1fr; }
  .mi-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .grain { animation: none; }
}

/* menu over the rail */
.rail { transition: opacity .3s; }
body.menu-open .rail { opacity: 0; pointer-events: none; }
.mi-t { white-space: nowrap; }

/* hover motion only where hover is real (touch fires false hovers) */
@media (hover: hover) and (pointer: fine) {
  .btn:hover svg:last-child { transform: translateX(3px); }
  .menu-list a:hover .mi-t { color: var(--acc); transform: translateX(14px); }
  .menu-list a:hover::after { transform: scaleX(1); }
  .frame:hover img, .frame:hover .layer > img { transform: scale(1.025); filter: grayscale(1) contrast(1.1) brightness(1); }
  .ncard:hover { border-color: var(--line-2); transform: translateY(-4px); }
  .names a:hover .idx { color: var(--ink); }
  .mf:hover { border-color: var(--line-2); background-color: rgba(var(--tint), .03); }
  .mf:hover .mf-img img { filter: grayscale(1) brightness(1); }
  .mf:hover .mf-go { color: var(--acc); transform: translateX(3px); }
  .menu-all:hover { color: var(--ink); }
  .menu-all:hover svg { transform: translateX(3px); }
}

/* ==== GALLERY ============================================================== */
button.frame { padding: 0; width: 100%; cursor: zoom-in; text-align: left; color: inherit; font: inherit; }
.frame-hint { position: absolute; z-index: 3; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 99px; background: rgba(0, 0, 0, .6); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.frame-hint svg { font-size: 13px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: none; width: 84px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--media); transition: border-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) brightness(.75); transition: filter .2s; }
.thumb:focus-visible img { filter: grayscale(1) brightness(1); }

.lb { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: auto 1fr auto; background: rgba(var(--bg-rgb), .95); opacity: 0; transition: opacity .2s var(--ease); }
.lb[hidden] { display: none; }
.lb.open { opacity: 1; }
.lb-top { display: flex; align-items: center; gap: 16px; height: var(--bar); padding-inline: var(--gut); }
.lb-title { font: 400 14px var(--lat); letter-spacing: -.02em; }
.lb-count { font: 11px var(--mono); letter-spacing: .14em; color: var(--faint); }
.lb-x { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 18px; transition: border-color .2s, background-color .2s; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 calc(var(--gut) + 56px); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 14px; border: 1px solid var(--line); opacity: 0; transform: translate3d(var(--dx, 0), 0, 0) scale(.97); transition: opacity .24s var(--ease), transform .24s var(--ease); }
.lb-stage img.in { opacity: 1; transform: none; }
.lb-nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 20px; background: var(--glass); transition: border-color .2s, background-color .2s; }
.lb-prev { left: var(--gut); }
.lb-next { right: var(--gut); }
.lb.single .lb-nav, .lb.single .lb-strip { display: none; }
.lb-foot { display: grid; justify-items: center; gap: 10px; padding: 12px var(--gut) 18px; }
.lb-cap { font: 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.lb-strip { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button { flex: none; width: 64px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); opacity: .45; transition: opacity .2s, border-color .2s; }
.lb-strip button.on { opacity: 1; border-color: var(--ink); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
body.lb-open .bar, body.lb-open .rail { visibility: hidden; }
/* the product page now carries thumbs: keep it on one screen */
.prod-vis { gap: 10px; }
.prod-vis .frame-big { aspect-ratio: 16 / 9.6; }
@media (max-height: 760px) and (min-width: 961px) { .prod-vis .frame-big { aspect-ratio: 16 / 8.6; } .pager small { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .thumb:hover { border-color: var(--line-2); }
  .thumb:hover img { filter: grayscale(1) brightness(1); }
  .lb-x:hover, .lb-nav:hover { border-color: var(--ink); background-color: rgba(var(--tint), .06); }
  .lb-strip button:hover { opacity: .8; }
}
@media (max-width: 960px) {
  .lb-stage { padding: 0 12px; }
  .lb-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-stage img { transform: none; }
}
.lb-stage { overflow: hidden; }
.lb-stage img { width: auto; height: auto; max-height: calc(100dvh - var(--bar) - 120px); }
.lb.single .lb-stage img { max-height: calc(100dvh - var(--bar) - 70px); }

/* ==== FIT ON WIDE-BUT-SHORT SCREENS ===========================================
   The preview frames grow with column width (16:10); on a short window that pushed
   the text and buttons below the fold and stretched the grid row over the footer.
   Rows are now capped to the view, the frame shrinks first, and the column scrolls
   only as a last resort. */
@media (min-width: 961px) {
  .plist, .prod { grid-template-rows: minmax(0, 1fr); }
  .plist-nav, .plist-prev, .prod-info, .prod-vis { min-height: 0; max-height: 100%; }

  .plist-prev { display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2.4vh, 22px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .plist-prev .frame { flex: 0 1 auto; min-height: 140px; }
  .plist-prev .prev-meta { flex: none; gap: clamp(8px, 1.4vh, 12px); }
  .plist-prev .prev-meta p { min-height: 0; }

  .prod-vis { display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 1.4vh, 12px); }
  .prod-vis .frame-big { flex: 0 1 auto; min-height: 160px; }
  .prod-vis .thumbs, .prod-vis .pager { flex: none; }
  .prod-info { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; padding-right: 4px; }
}
@media (min-width: 961px) and (max-height: 820px) {
  .specs div { padding: 7px 0; }
  .plist-prev .prev-meta h2 { font-size: clamp(22px, 2vw, 30px); }
  .count-big { font-size: clamp(28px, 2.6vw, 40px); }
}

/* wallet QR: a sheet over the light card */
.card-light { position: relative; }
.card-light .code .qr-btn { background: transparent; color: #0a0a0a; border: 1px solid #c9c4bb; }
.qr-sheet { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 18px; border-radius: inherit; background: rgba(241, 238, 232, .96); animation: rv .24s var(--ease); }
.qr-box { display: grid; justify-items: center; gap: 8px; text-align: center; width: min(100%, 300px); }
.qr-code { width: min(100%, 220px); aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: 1px solid #dcd8d0; border-radius: 16px; padding: 8px; }
.qr-code svg { width: 100%; height: 100%; display: block; }
.qr-box b { font: 500 14px var(--lat); letter-spacing: -.02em; }
.qr-box code { font: 11px var(--mono); color: #0a0a0a; overflow-wrap: anywhere; background: #e2dfd8; border-radius: 10px; padding: 6px 10px; max-width: 100%; }
.qr-act { display: flex; gap: 8px; margin-top: 4px; }
.qr-act .copy { height: 40px; padding: 0 16px; }
.qr-act .btn { --h: 40px; }
@media (prefers-reduced-motion: reduce) { .qr-sheet { animation: none; } }


/* ==== LIGHT THEME ============================================================ */
/* everything above already runs on tokens; these are the few places that need a nudge */
:root[data-theme='light'] .grain {
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme='light'] .frame-noise { opacity: .18; }
:root[data-theme='light'] .frame-scan { opacity: .25; }
:root[data-theme='light'] .frame img, :root[data-theme='light'] .layer > img { filter: grayscale(1) contrast(1.02) brightness(1); }
:root[data-theme='light'] .card-light { background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .22); }
:root[data-theme='light'] .qr-sheet { background: rgba(255, 255, 255, .97); }
:root[data-theme='light'] .menu-noise { opacity: .35; }
:root[data-theme='light'] .glitch::after { color: #999; mix-blend-mode: multiply; }
:root[data-theme='light'] .glitch::before { mix-blend-mode: multiply; }
:root[data-theme='light'] .wipe i { box-shadow: 0 0 18px 1px rgba(232, 80, 2, .35); }

/* theme button (sun in dark, moon in light) */
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 17px; color: var(--ink); transition: border-color .2s, background-color .2s; }
.theme-btn .i-moon { display: none; }
:root[data-theme='light'] .theme-btn .i-sun { display: none; }
:root[data-theme='light'] .theme-btn .i-moon { display: block; }
body.menu-open .theme-btn { opacity: 0; pointer-events: none; }
.theme-btn { transition: border-color .2s, background-color .2s, opacity .3s; }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { border-color: var(--ink); background-color: rgba(var(--tint), .05); } }
/* a short color crossfade while switching, never on first paint */
html.theme-anim, html.theme-anim body, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease !important;
}

/* light mode: the donate card's paper greys become neutral greys */
:root[data-theme='light'] .card-light :is(.code, .amt-in, .sum, .qr-box code),
:root[data-theme='light'] .dform :is(input:not([type=checkbox]), select, textarea),
:root[data-theme='light'] .seg-light { background: #f0f0f0; }
:root[data-theme='light'] .coins button { border-color: #dedede; }
:root[data-theme='light'] .steps li { border-color: #e2e2e2; }
