/* =========================================================================
   STREET BARON — standalone game site
   Identity: pixel-art night city · purple grow-glow · cozy menace.
   Self-contained (own design system). "A Tater Tot Games game."
   Money-green (#5fbf7a) is reserved for cash moments only (studio rule D-014).
   ========================================================================= */

:root {
  /* Night-city base */
  --bg:          #0a0812;   /* near-black aubergine */
  --bg-2:        #0e0b18;
  --surface:     #16111f;
  --surface-2:   #1e1830;
  --line:        rgba(180, 150, 230, 0.12);
  --line-strong: rgba(180, 150, 230, 0.22);

  --ink:         #f3eefb;
  --ink-soft:    #cdc2e0;
  --ink-mute:    #8f83a8;

  /* Street Baron purple grow-glow */
  --purple:      #a878e0;
  --purple-hi:   #c8a4f2;
  --purple-lo:   #7b4fbf;
  --grad:        linear-gradient(135deg, #c8a4f2 0%, #a878e0 45%, #7b4fbf 100%);
  --glow:        rgba(168, 120, 224, 0.4);

  /* Product-tier colours (the four substances) */
  --jade:   #5fcf7a;   /* T1 grown herb, green */
  --frost:  #6bc6e0;   /* T2 hydro crystal, pale blue */
  --glow-c: #b06bd8;   /* T3 lab-made, luminous purple (signature) */
  --static: #e6e2f2;   /* T4 designer, arc-white */

  --gold:   #f4c869;   /* ★5 Signature / rarity */
  --cash:   #5fbf7a;   /* money-green — cash moments ONLY */

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel:   "Silkscreen", "Space Grotesk", monospace;

  --maxw: 1180px;
  --maxw-text: 720px;
  --radius: 16px;
  --radius-sm: 10px;
  --pad: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  letter-spacing: 0.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
::selection { background: var(--purple); color: #12091f; }

/* pixel-art images render crisp, not blurred */
.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 11vw, 128px); position: relative; }
.section.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.center { text-align: center; }
.narrow { max-width: var(--maxw-text); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-pixel); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--purple-hi); margin: 0 0 1rem;
}
.section-title { font-size: clamp(2rem, 5vw, 3.1rem); }
.lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 0.85em 1.6em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); will-change: transform;
}
.btn--primary { background: var(--grad); color: #14091f; box-shadow: 0 8px 30px -8px var(--glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 44px -8px var(--glow); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--purple); color: var(--purple-hi); transform: translateY(-2px); }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.85rem; }

/* ---- Wordmark ---- */
.wordmark { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 0.5ch; line-height: 1; font-size: 0.95rem; }
.wordmark .st { color: var(--ink); }
.wordmark .br { color: var(--purple-hi); }

/* ---- Header ---- */
.site-head {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); }
.nav a { font-size: 0.92rem; color: var(--ink-soft); transition: color 0.2s; }
.nav a:hover { color: var(--purple-hi); }
.nav .btn { color: #14091f; }
@media (max-width: 760px) { .nav a.navlink { display: none; } }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding-block: clamp(60px, 12vh, 130px); }
.hero__bg { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 560px at 78% 8%, rgba(168,120,224,0.22), transparent 60%),
    radial-gradient(700px 460px at 12% 100%, rgba(95,207,122,0.08), transparent 55%);
}
.hero__grain { position: absolute; inset: 0; z-index: 1; opacity: 0.5; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.8rem, 9vw, 5.6rem); font-family: var(--font-pixel); letter-spacing: 0; line-height: 1; }
.hero h1 .accent { color: var(--purple-hi); text-shadow: 0 0 30px var(--glow); }
.hero__logline { font-size: clamp(1.15rem, 2.6vw, 1.5rem); color: var(--ink); font-style: italic; margin: 1.3rem 0 0.6rem; }
.hero__sub { color: var(--ink-soft); max-width: 46ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__art {
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-strong); background: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 30px 90px -30px var(--glow); display: grid; place-items: center;
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.art-ph { text-align: center; color: var(--ink-mute); font-family: var(--font-pixel); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 2rem; line-height: 1.8; }

/* ---- Store badges ---- */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.store-badge { display: inline-flex; align-items: center; gap: 0.7ch; padding: 0.7em 1.2em; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); font-family: var(--font-display); font-size: 0.9rem; transition: border-color 0.25s, transform 0.25s; }
.store-badge:hover { border-color: var(--purple); transform: translateY(-2px); color: var(--ink); }
.store-badge small { display: block; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }

/* ---- Loop steps ---- */
.loop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 26px); margin-top: 3rem; }
@media (max-width: 760px) { .loop-grid { grid-template-columns: 1fr; } }
.loop-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; position: relative; overflow: hidden; }
.loop-step__n { font-family: var(--font-pixel); font-size: 0.7rem; color: var(--purple); letter-spacing: 0.12em; }
.loop-step h3 { font-size: 1.5rem; margin: 0.5rem 0 0.4rem; }
.loop-step p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
.loop-step__verb { position: absolute; right: -10px; bottom: -18px; font-family: var(--font-pixel); font-size: 3.2rem; color: color-mix(in srgb, var(--purple) 12%, transparent); pointer-events: none; }

/* ---- Product tiers ---- */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(16px, 2.5vw, 22px); margin-top: 3rem; }
.tier {
  --c: var(--purple);
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c);
  border-radius: var(--radius); padding: 26px 24px 28px; transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.tier:hover { transform: translateY(-6px); box-shadow: 0 22px 50px -24px color-mix(in srgb, var(--c) 60%, transparent); }
.tier__swatch { width: 46px; height: 46px; border-radius: 12px; background: var(--c); box-shadow: 0 0 26px -2px var(--c); margin-bottom: 1rem; }
.tier__tag { font-family: var(--font-pixel); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--c); text-transform: uppercase; }
.tier h3 { font-family: var(--font-pixel); font-size: 1.15rem; margin: 0.4rem 0 0.5rem; color: var(--ink); letter-spacing: 0; }
.tier p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 0.9rem; }
.tier__meta { font-size: 0.82rem; color: var(--ink-mute); border-top: 1px solid var(--line); padding-top: 0.8rem; }

/* ---- Feature rows ---- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 68px); align-items: center; }
.feature-row:nth-child(even) .feature-row__art { order: -1; }
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; } .feature-row:nth-child(even) .feature-row__art { order: 0; } }
.feature-row + .feature-row { margin-top: clamp(48px, 8vw, 96px); }
.feature-row__art { aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(150deg, var(--surface-2), var(--surface)); display: grid; place-items: center; }
.feature-row__art img { width: 100%; height: 100%; object-fit: cover; }
.feature-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.85rem; }
.feature-list li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; background: var(--grad); }

/* rarity stars */
.stars { display: inline-flex; gap: 3px; font-family: var(--font-pixel); font-size: 0.8rem; }
.rar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.rar span { font-family: var(--font-pixel); font-size: 0.66rem; letter-spacing: 0.06em; padding: 0.5em 0.8em; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-soft); }
.rar .s3 { color: var(--ink-soft); }
.rar .s4 { color: var(--frost); border-color: color-mix(in srgb, var(--frost) 40%, transparent); }
.rar .s5 { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }

/* ---- Districts timeline ---- */
.districts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 3rem; }
@media (max-width: 820px) { .districts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .districts { grid-template-columns: 1fr; } }
.district { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.district__n { font-family: var(--font-pixel); font-size: 0.62rem; color: var(--purple); letter-spacing: 0.1em; }
.district h3 { font-size: 1.25rem; margin: 0.4rem 0 0.3rem; }
.district p { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 0.7rem; }
.district__unlock { font-family: var(--font-pixel); font-size: 0.6rem; color: var(--cash); letter-spacing: 0.06em; }

/* ---- Trust badges ---- */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 2.5rem; }
.trust div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.trust b { display: block; font-family: var(--font-display); color: var(--ink); margin-bottom: 0.2rem; }
.trust span { color: var(--ink-mute); font-size: 0.92rem; }

/* ---- Notify / signup ---- */
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 5vw, 52px); text-align: center; background-image: radial-gradient(600px 300px at 50% -20%, rgba(168,120,224,0.14), transparent 60%); }
.signup { display: flex; gap: 10px; max-width: 460px; margin: 1.6rem auto 0.6rem; flex-wrap: wrap; }
.signup input { flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.85em 1.3em; color: var(--ink); font-family: var(--font-body); font-size: 0.98rem; }
.signup input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--glow); }
.form-note { font-size: 0.82rem; color: var(--ink-mute); }

/* ---- Footer ---- */
.site-foot { border-top: 1px solid var(--line); padding-block: 54px 40px; background: var(--bg-2); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--ink-soft); font-size: 0.92rem; transition: color 0.2s; }
.foot-links a:hover { color: var(--purple-hi); }
.studio-line { color: var(--ink-mute); font-size: 0.9rem; }
.studio-line a { color: var(--purple-hi); }
.foot-legal { color: var(--ink-mute); font-size: 0.84rem; margin-top: 26px; }
.foot-legal a { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Doc pages ---- */
.doc { padding-block: clamp(48px, 8vw, 90px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.3rem; }
.doc .updated { color: var(--ink-mute); font-size: 0.9rem; margin-bottom: 2.5rem; }
.doc h2 { font-size: 1.4rem; margin-top: 2.6rem; color: var(--purple-hi); }
.doc h3 { font-size: 1.1rem; margin-top: 1.8rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.5rem; }
.doc a { color: var(--purple-hi); text-decoration: underline; text-underline-offset: 3px; }
.backlink { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--ink-mute); font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 1.4rem; transition: color 0.2s, gap 0.2s; }
.backlink:hover { color: var(--purple-hi); gap: 0.9ch; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; margin-bottom: 2.5rem; }
.toc h4 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 0.8rem; font-family: var(--font-pixel); }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { color: var(--purple-hi); }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---- Scrollbar (never ship the default — studio rule) ---- */
* { scrollbar-width: thin; scrollbar-color: var(--purple-lo) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--purple-lo), var(--purple)); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }
