/* Layout: Studio-window storefront — sale bar, baseplate-grid ground, hero with an Explorer panel,
   category ticker, product grid, bundle band, steps, FAQ, community band. */
:root {
  --bg: #e9ebee;            /* baseplate grey */
  --plate: #dfe2e6;         /* stud grid lines */
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --fg: #1d2127;
  --muted: #5b6370;
  --line: #cfd3d9;
  --accent: #ff5a1f;        /* flame orange-red */
  --accent-deep: #d81e1e;
  --accent-ink: #ffffff;
  --accent-soft: #ffe4d8;
  --select: #1a8cff;
  --good: #1d8a52; --good-soft: #dcf3e6;
  --bad: #c3352b; --bad-soft: #fbe1de;
  --robux: #1d2127;
  --shadow: 0 1px 0 rgba(20,24,30,.06), 0 8px 24px -12px rgba(20,24,30,.25);
  --f-display: "Bungee", "Arial Black", Impact, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #232427; --plate: #2b2c30; --surface: #2e2f33; --surface-2: #35363b;
    --fg: #ececee; --muted: #a5a8b0; --line: #43454b;
    --accent: #ff6d36; --accent-deep: #ff4a3a; --accent-ink: #1a0d06; --accent-soft: #4a2617;
    --select: #4aa5ff; --good: #4fcf8a; --good-soft: #1d3a2a; --bad: #ff7a6e; --bad-soft: #43221f;
    --robux: #ececee;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  background-color: var(--bg);
  background-image: linear-gradient(var(--plate) 2px, transparent 2px), linear-gradient(90deg, var(--plate) 2px, transparent 2px);
  background-size: 48px 48px;
  color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.55;
}
img { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--select); outline-offset: 2px; }
.mono { font-family: var(--f-mono); }

/* sale bar */
.announce { background: linear-gradient(90deg, var(--accent-deep), #ff5a1f 55%, #ff9a2e); color: #fff; font-weight: 700; font-size: 14px; }
.announce .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-block: 8px; text-align: center; }
.announce-tag { background: rgba(0,0,0,.25); border-radius: 4px; padding: 1px 7px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 18px; letter-spacing: .02em; text-decoration: none; color: var(--fg); }
.logo-mark { width: 28px; height: 35px; flex: none; overflow: visible; filter: drop-shadow(0 0 6px rgba(255, 110, 30, .55)); }
.logo-mark .flick { transform-origin: 16px 38px; animation: flick 1.8s ease-in-out infinite; }
.logo-mark .flick.core { animation-duration: 1.1s; animation-delay: -.4s; }
@keyframes flick { 0%, 100% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.96, 1.06) skewX(-3deg); } 65% { transform: scale(1.03, .95) skewX(2deg); } }
.logo:hover .logo-mark { filter: drop-shadow(0 0 10px rgba(255, 130, 40, .85)); }
.bar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 10px; border-radius: var(--r); }
.bar nav a:hover { color: var(--fg); background: var(--surface-2); }
.bar nav a.nav-cta { background: var(--fg); color: var(--bg); font-weight: 700; padding: 8px 14px; }
.bar nav a.nav-cta:hover { background: var(--fg); filter: brightness(1.15); }
@media (max-width: 640px) { .bar nav a:not(.nav-cta) { display: none; } }

/* hero */
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 56px 48px; }
.chip-hot { display: inline-block; background: var(--accent-soft); color: var(--accent-deep); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-size: 13px; font-weight: 700; border-radius: 99px; padding: 4px 12px; margin-bottom: 16px; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin: 20px 0 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 32px; }
.stats div { display: grid; }
.stats b { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; color: var(--accent); }
.stats span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 36px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r); padding: 12px 20px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: transform .12s ease; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 55%, #000); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-dark { background: var(--fg); color: var(--bg); }

/* explorer panel */
.explorer { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.explorer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.explorer-head span:last-child { font-family: var(--f-mono); font-weight: 400; color: var(--muted); font-size: 12px; }
.tree { list-style: none; margin: 0; padding: 8px 0; font-size: 14px; font-family: var(--f-mono); }
.tree li { display: flex; align-items: center; gap: 8px; padding: 3px 12px; padding-left: calc(12px + var(--d, 0) * 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree li.sel { background: color-mix(in srgb, var(--select) 18%, transparent); box-shadow: inset 2px 0 0 var(--select); }
.ico { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.ico.svc { background: #6f7a8a; } .ico.folder { background: #e0a83a; } .ico.script { background: #3d8bfd; }
.ico.local { background: #2fb37a; } .ico.module { background: #9b6bff; } .ico.part { background: var(--accent); }
.tree .tag { margin-left: auto; color: var(--muted); font-size: 11px; }
.explorer-foot { border-top: 1px solid var(--line); padding: 10px 12px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* category ticker */
.ticker { overflow: hidden; background: var(--fg); color: var(--bg); border-block: 1px solid var(--line); }
.ticker-track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.ticker-track span { font-family: var(--f-display); font-size: 18px; padding: 12px 22px; white-space: nowrap; display: flex; align-items: center; gap: 22px; }
.ticker-track span::after { content: ""; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
@keyframes tick { to { transform: translateX(-50%); } }

/* sections */
section.block .wrap { padding-block: 40px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.chip:hover { color: var(--fg); border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.thumb { aspect-ratio: 16 / 10; max-width: 100%; position: relative; border: 0; padding: 0; width: 100%; display: block; background-color: var(--c);
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.22) 0 5px, rgba(0,0,0,.12) 5.5px 6.5px, transparent 7px); background-size: 22px 22px; }
.thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.thumb .genre { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.55); color: #fff; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.thumb .badge { position: absolute; right: 10px; top: 10px; background: #fff; color: #1d2127; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.thumb .badge.sale { background: var(--accent-deep); color: #fff; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 18px; font-weight: 800; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.spec { font-family: var(--f-mono); font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; }
.card-foot { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.add { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); padding: 8px 14px; font-weight: 700; font-size: 14px; flex: none; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; }

/* prices */
.price { display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.price .rbx { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 19px; color: var(--robux); }
.price .rbx svg { width: 16px; height: 16px; flex: none; }
.price .usd { font-size: 13px; color: var(--muted); font-weight: 600; }
.price .usd s { margin-left: 4px; }
.price.big .rbx { font-size: 26px; } .price.big .rbx svg { width: 22px; height: 22px; }
.price.big .usd { font-size: 15px; }

/* bundle band */
.bundle { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; background: var(--fg); color: var(--bg); border-radius: 12px; padding: 32px; position: relative; overflow: hidden; }
.bundle::before { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); pointer-events: none; }
.bundle h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 3vw, 34px); margin: 10px 0 6px; }
.bundle p { margin: 0 0 12px; opacity: .8; }
.bundle ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; opacity: .9; }
.bundle-buy { display: grid; gap: 14px; justify-items: start; position: relative; }
.bundle .price .rbx, .bundle .price .usd { color: var(--bg); }
.badge-pill { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; }
@media (max-width: 760px) { .bundle { grid-template-columns: 1fr; padding: 22px; } }

/* steps, faq, community */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.step .n { font-family: var(--f-display); font-size: 28px; color: var(--accent); line-height: 1; }
.step h3 { font-size: 18px; margin: 10px 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); max-width: 65ch; }
.community { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--surface); border: 2px solid var(--accent); border-radius: 12px; padding: 28px; }
.community h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 3vw, 30px); }
.community p { margin: 6px 0 0; color: var(--muted); max-width: 48ch; }

footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 32px; }
footer .wrap { padding-block: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--muted); font-size: 14px; }

/* product modal */
.scrim { position: fixed; inset: 0; background: rgba(10,12,16,.55); z-index: 40; }
.modal { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal-card { pointer-events: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; width: min(820px, 100%); max-height: calc(100% - 32px); overflow-y: auto; box-shadow: var(--shadow); }
.modal-card .thumb { aspect-ratio: 21 / 7; }
.modal-top { position: relative; }
.x { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); width: 36px; height: 36px; font-size: 18px; line-height: 1; }
.modal-top .x { position: absolute; right: 12px; bottom: 12px; }
.modal-body { padding: 20px 24px 24px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
@media (max-width: 680px) { .modal-body { grid-template-columns: 1fr; padding: 16px; } .modal-body .pay { order: -1; } }
.modal-body h2 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.modal-body > div > p { color: var(--muted); }
.modal-body ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 16px 0 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--f-mono); font-size: 13px; text-align: right; }

/* checkout panel */
.pay { display: grid; gap: 14px; align-content: start; }
.seg { display: flex; gap: 4px; background: var(--surface-2); border-radius: 8px; padding: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 6px; font-weight: 700; color: var(--muted); display: inline-flex; justify-content: center; align-items: center; gap: 6px; }
.seg button svg { width: 15px; height: 15px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.paystep { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.paystep .num { width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.paystep.done .num { background: var(--good); color: #fff; }
.paystep > div { display: grid; gap: 8px; min-width: 0; }
.paystep b { font-size: 15px; }
.paystep small { color: var(--muted); }
.field { display: flex; gap: 8px; }
.field input, .lookup input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.msg { border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--good-soft); color: var(--good); }
.msg.info { background: var(--surface-2); color: var(--muted); }
.dl { display: grid; gap: 8px; }
.dl a { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; text-decoration: none; font-weight: 700; }
.dl a:hover { border-color: var(--accent); }
.dl a span:last-child { color: var(--accent); white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }

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