/* ==========================================================
   Product sites — shared structure.
   Each product page sets its own theme with the variables below
   (in a <style> block in its own index.html).
   ========================================================== */
:root {
  --bg: #0d0d12;  --bg2: #15151d;
  --panel: #1d1c28; --panel2: #15141e; --line: #3a3850;
  --text: #f2f0f8; --muted: #b0aac4;
  --a1: #4cd137; --a1d: #2a8a1c;      /* primary button   */
  --a2: #13b5a0; --a2d: #0a7366;      /* secondary button */
  --a3: #ff2d8f; --a3d: #a3105a;      /* tertiary button  */
  --neon: #38e1ff; --neon2: #ff2d8f;  /* section titles   */
  --hero: linear-gradient(180deg, #222 0%, #111 100%);
  --head: "Trebuchet MS", sans-serif;
  --body: system-ui, sans-serif;
  --title-shadow: 0 4px 0 rgba(0,0,0,.6);
  --radius: 18px;
  --bevel: rgba(255,255,255,.22);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--neon); text-underline-offset: 3px; }
.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Crumb (back to the studio) ---------- */
.crumb { background: #000; font-size: .82rem; color: #aaa; }
.crumb .wrap { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.crumb img { width: 22px; height: 22px; border-radius: 50%; }
.crumb a { color: #ddd; text-decoration: none; } .crumb a:hover { color: #fff; text-decoration: underline; }

/* ---------- Nav ---------- */
.p-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid #000; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
.p-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; }
.wordmark { font-family: var(--head); text-decoration: none; line-height: 1; font-size: 1.35rem; color: var(--text); display: flex; align-items: center; gap: 10px; }
.wordmark img { width: 40px; height: 40px; object-fit: contain; }
.wordmark em { font-style: normal; color: var(--neon2); }
.p-links { display: flex; align-items: center; gap: 4px; }
.p-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; opacity: .85; }
.p-links a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.p-links .btn { opacity: 1; margin-left: 6px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; padding: 6px 10px; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .p-links { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; background: var(--bg2); padding: 10px 16px 16px; border-bottom: 2px solid #000; }
  .p-links.open { display: flex; } .p-links a { padding: 12px; } .p-links .btn { margin: 8px 0 0; }
}

/* ---------- Buttons ---------- */
.btn { --c: var(--a1); --d: var(--a1d);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 700; font-size: 1rem; color: #fff; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,.35);
  padding: 11px 22px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c) 55%);
  box-shadow: 0 5px 0 var(--d), 0 10px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .12s, box-shadow .12s, filter .2s; }
.btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 7px 0 var(--d), 0 14px 22px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--d), 0 4px 8px rgba(0,0,0,.35); }
.btn.b2 { --c: var(--a2); --d: var(--a2d); } .btn.b3 { --c: var(--a3); --d: var(--a3d); }
.btn.dark { --c: #2a2a36; --d: #000; }
.btn.small { padding: 8px 15px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 16px; justify-content: center; }

/* ---------- Bevelled panel ---------- */
.panel { position: relative; background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 3px solid #000; outline: 2px solid rgba(255,255,255,.07); outline-offset: -7px; border-radius: 26px; box-shadow: 0 18px 40px rgba(0,0,0,.45); padding: 40px 38px; }
.panel::before, .panel::after { content: ""; position: absolute; width: 54px; height: 54px; pointer-events: none; background: linear-gradient(135deg, var(--bevel), transparent); }
.panel::before { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); border-top-left-radius: 22px; }
.panel::after { bottom: 0; right: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); border-bottom-right-radius: 22px; background: linear-gradient(315deg, var(--bevel), transparent); }
@media (max-width: 640px) { .panel { padding: 30px 18px; } }

/* ---------- Hero ---------- */
.p-hero { position: relative; overflow: hidden; isolation: isolate; padding: 70px 0 90px; background: var(--hero); }
.p-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.p-hero .panel { text-align: center; }
.hero-logo { width: min(300px, 70%); margin: 0 auto 6px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.p-title { font-family: var(--head); font-weight: 400; margin: 0; line-height: .95; font-size: clamp(2.6rem, 7.5vw, 5rem); text-shadow: var(--title-shadow); }
.tagline { font-size: 1.2rem; margin: 16px auto 24px; max-width: 560px; }
.store-card { width: 190px; background: #fff; color: #111; border-radius: 22px; padding: 18px 16px; text-align: center; border: 3px solid #000; box-shadow: 0 0 0 4px color-mix(in srgb, var(--neon) 55%, transparent), 0 18px 34px rgba(0,0,0,.45); display: grid; gap: 10px; justify-items: center; }
.store-card .price { font-family: var(--head); font-size: 2rem; line-height: 1; }
.store-card .price small { display: block; font-family: var(--body); font-size: .75rem; color: #555; margin-top: 4px; letter-spacing: .04em; }
.store-card .itch { display: flex; align-items: center; gap: 8px; background: #fa5c5c; color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 10px; text-decoration: none; box-shadow: 0 4px 0 #b83636; }
.store-card .itch:hover { filter: brightness(1.08); }
.store-card .note { font-size: .78rem; color: #555; }
@media (max-width: 860px) { .p-hero .wrap { grid-template-columns: 1fr; justify-items: center; } .store-card { width: min(320px, 100%); } }

/* ---------- At a glance ---------- */
.glance { margin-top: -50px; position: relative; z-index: 2; }
.glance .panel { padding: 26px 26px; }
.glance h2 { font-family: var(--head); font-weight: 400; text-align: center; margin: 0 0 16px; font-size: 1.5rem; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tile { border: 2px solid var(--neon); border-radius: 14px; padding: 14px 12px; text-align: center; background: rgba(0,0,0,.18); }
.tile:nth-child(even) { border-color: var(--neon2); }
.tile b { display: block; font-family: var(--head); font-weight: 400; font-size: 1.7rem; line-height: 1.1; text-shadow: 0 0 14px color-mix(in srgb, var(--neon) 50%, transparent); }
.tile span { font-size: .85rem; color: var(--muted); }

/* ---------- Sections ---------- */
.p-section { padding: 70px 0 20px; }
.neon { display: table; margin: 0 auto 34px; text-align: center; font-family: var(--head); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 4.6vw, 2.7rem); letter-spacing: .04em; line-height: 1.1; color: #fff; padding: 10px 22px; border-radius: 10px; border: 3px solid var(--neon); text-shadow: 0 0 10px var(--neon), 0 0 22px color-mix(in srgb, var(--neon) 60%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--neon) 60%, transparent), inset 0 0 14px color-mix(in srgb, var(--neon) 35%, transparent); }
.neon.alt { border-color: var(--neon2); text-shadow: 0 0 10px var(--neon2), 0 0 22px color-mix(in srgb, var(--neon2) 60%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--neon2) 60%, transparent), inset 0 0 14px color-mix(in srgb, var(--neon2) 35%, transparent); }
.lede { text-align: center; color: var(--muted); max-width: 680px; margin: -16px auto 34px; }

/* ---------- Feature cards ---------- */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: linear-gradient(180deg, var(--panel), var(--panel2)); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px 20px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.6), 0 14px 26px rgba(0,0,0,.3); transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-6px); border-color: var(--neon); }
.card .ico { width: 78px; height: 78px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; background: rgba(255,255,255,.06); border: 3px solid var(--line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.card h3 { font-family: var(--head); font-weight: 400; margin: 0 0 6px; font-size: 1.3rem; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.card ul { text-align: left; color: var(--muted); font-size: .95rem; margin: 8px 0 0; padding-left: 20px; }

/* ---------- Deep-dive rows ---------- */
.rows { display: grid; gap: 34px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.row:nth-child(even) .row-media { order: 2; }
.row-media img { max-height: 440px; object-fit: cover; border-radius: 16px; border: 3px solid #000; box-shadow: 0 0 0 2px var(--line), 0 18px 30px rgba(0,0,0,.45); width: 100%; cursor: zoom-in; }
.row h3 { font-family: var(--head); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 8px; line-height: 1.15; }
.row p { color: var(--muted); margin: 0 0 12px; }
.row ul { color: var(--muted); margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.row li::marker { color: var(--neon); }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } .row:nth-child(even) .row-media { order: 0; } }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.step { position: relative; padding-top: 34px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-size: 1.5rem; color: #fff; background: var(--a3); border: 3px solid #000; box-shadow: 0 4px 0 var(--a3d); }

/* ---------- Code / terminal ---------- */
.code { background: #0a0a0e; border: 2px solid var(--line); border-radius: 14px; padding: 18px 20px; font-family: "JetBrains Mono", Consolas, monospace; font-size: .9rem; color: #d7e0ea; overflow-x: auto; white-space: pre; line-height: 1.55; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 14px 26px rgba(0,0,0,.4); }
.code .k { color: var(--neon); } .code .v { color: var(--neon2); } .code .c { color: #6c7686; }

/* ---------- Gallery ---------- */
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; scrollbar-color: var(--neon) transparent; }
.gallery button { flex: 0 0 auto; scroll-snap-align: center; padding: 0; border: 3px solid #000; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: #000; box-shadow: 0 0 0 2px var(--line), 0 12px 22px rgba(0,0,0,.45); transition: transform .25s; }
.gallery button:hover { transform: translateY(-4px) rotate(-.5deg); }
.gallery img { height: 260px; width: auto; }
@media (max-width: 640px) { .gallery img { height: 190px; } }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.88); display: none; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; max-width: 94vw; border-radius: 12px; border: 3px solid #000; box-shadow: 0 0 0 2px var(--neon); }

/* ---------- Community ---------- */
.community .panel { text-align: center; }
.community h2 { font-family: var(--head); font-weight: 400; margin: 0 0 8px; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.community p { color: var(--muted); max-width: 620px; margin: 0 auto 18px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 22px; }
.socials a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.1); transition: transform .2s, background .2s; }
.socials a:hover { transform: translateY(-3px); background: rgba(255,255,255,.12); }
.socials img { width: 26px; height: 26px; object-fit: contain; }

/* ---------- Footer ---------- */
.p-footer { background: color-mix(in srgb, var(--bg) 70%, #000); border-top: 2px solid #000; padding: 46px 0 22px; margin-top: 70px; }
.p-footer .cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px; }
.p-footer h4 { font-family: var(--head); font-weight: 400; color: var(--neon2); letter-spacing: .08em; font-size: .95rem; text-transform: uppercase; margin: 0 0 12px; }
.p-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.p-footer ul a { color: var(--text); text-decoration: none; opacity: .82; } .p-footer ul a:hover { opacity: 1; text-decoration: underline; }
.p-footer p { color: var(--muted); margin: 10px 0 0; max-width: 320px; font-size: .95rem; }
.p-footer .legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 16px; font-size: .85rem; color: var(--muted); }
.p-footer .legal a { color: var(--muted); }
@media (max-width: 820px) { .p-footer .cols { grid-template-columns: 1fr 1fr; } .p-footer .cols > div:first-child { grid-column: 1 / -1; } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Giving Back (charity tracker) ---------- */
.giving-intro { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 22px; font-size: 1.05rem; }
.giving-intro b { color: var(--neon2); font-size: 1.15em; }
.giving-intro a { color: var(--neon); font-weight: 700; }

/* ---------- Return bar (every product site, brand-wide) ---------- */
.crumb { background: #07060a; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9rem; }
.crumb .wrap { min-height: 46px; justify-content: space-between; gap: 14px; }
.crumb-home { display: inline-flex; align-items: center; gap: 10px; color: #f1e6cc; text-decoration: none; font-family: "IM Fell English SC", Georgia, serif; font-size: 1.05rem; line-height: 1; }
.crumb-home img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 10px rgba(176,136,255,.45); }
.crumb-home small { display: block; font-family: system-ui, sans-serif; font-size: .58rem; letter-spacing: .3em; color: #8dffc1; margin-top: 2px; }
.crumb-home:hover { color: #fff; }
.crumb-back { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700; font-size: .85rem; background: rgba(176,136,255,.18); border: 1px solid rgba(176,136,255,.55); transition: background .2s, transform .2s; white-space: nowrap; }
.crumb-back:hover { background: rgba(176,136,255,.35); transform: translateX(-2px); }
@media (max-width: 480px) { .crumb-home span { display: none; } }

/* As-is note (first games: no files, no patches) */
.asis-wrap { padding-top: 10px; padding-bottom: 90px; }
.asis-note { display: flex; gap: 16px; align-items: flex-start; max-width: 900px; margin: 0 auto; padding: 18px 22px; border-radius: 14px; border: 2px solid #e0b252; border-left-width: 6px; background: rgba(22,14,6,.88); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.asis-note .asis-ic { font-size: 1.6rem; line-height: 1; }
.asis-note b { display: block; font-size: 1.05rem; margin-bottom: 4px; color: #ffe7b0; }
.asis-note p { margin: 0; color: #f1e6cf; line-height: 1.6; }

/* Press feature card */
.press-feature { display: block; max-width: 760px; margin: 0 auto 26px; padding: 22px 26px; border-radius: 16px; text-align: center; text-decoration: none; color: var(--text); background: var(--panel); border: 2px solid var(--line); box-shadow: 0 14px 28px rgba(0,0,0,.35); transition: transform .15s, border-color .15s; }
.press-feature:hover { transform: translateY(-2px); border-color: var(--neon, var(--line)); }
.press-feature .pf-label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.press-feature .pf-title { display: block; font-family: var(--head); font-size: 1.45rem; line-height: 1.3; }
.press-feature .pf-src { display: block; margin-top: 8px; color: var(--muted); font-size: .95rem; }
.press-feature .pf-quote { display: block; margin-top: 12px; font-style: italic; color: var(--text); opacity: .92; font-size: 1.05rem; }
