/* Arrow Chaos website. Colors mirror the game's theme (src/render/palette.ts). */
:root {
  --bg: #0e0f1a;
  --surface: #191b2b;
  --raised: #23263a;
  --border: #2e3150;
  --text: #f4f5ff;
  --soft: #c9cbe3;
  --muted: #9a9cb8;
  --coral: #ff6b4a;
  --coral-light: #ff9a6b;
  --gold: #ffc940;
  --heart: #ff4d6d;
  --teal: #1fd1c1;
  --violet: #a56bff;
  --sky: #3fb6ff;
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Fredoka, ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(14, 15, 26, 0.84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(46, 49, 80, 0.7); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: 0.2px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); }
@media (max-width: 780px) { .nav a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 14px; background: var(--coral); color: #fff !important; font-weight: 700; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -10px rgba(255, 107, 74, 0.75); }
.btn svg { width: 16px; height: 16px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-width: 214px; padding: 11px 22px 11px 16px; border-radius: 16px; background: #fff; color: #0e0f1a; text-decoration: none; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.9); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.store:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -16px rgba(255, 107, 74, 0.55); }
.store svg { width: 30px; height: 30px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.store b { font-size: 21px; font-weight: 700; }
.store small { font-size: 13px; font-weight: 500; color: #4d5070; }
.store.suggested { outline: 3px solid var(--coral); outline-offset: 3px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 52px 0 76px; }
.hero::before { content: ''; position: absolute; inset: -30% -20% 0; background: radial-gradient(40% 40% at 74% 36%, rgba(165, 107, 255, 0.2), transparent 70%), radial-gradient(38% 40% at 18% 20%, rgba(255, 107, 74, 0.17), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 48px; align-items: center; }
.hero h1 { text-wrap: balance; margin: 0 0 18px; font-size: clamp(42px, 6.2vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -0.5px; }
.hero h1 .kicker { display: block; margin-bottom: 16px; font-size: clamp(14px, 1.5vw, 17px); letter-spacing: 2.4px; text-transform: uppercase; color: var(--coral-light); font-weight: 600; }
.hero h1 .accent { background: linear-gradient(90deg, var(--coral), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0; max-width: 560px; font-size: clamp(18px, 1.9vw, 21px); color: var(--soft); }
.hero .stores { margin-top: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
@media (max-width: 920px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .lead { margin: 0 auto; }
  .hero .stores, .facts { justify-content: center; }
}

/* Phone mockup with the live board */
.phone { --w: min(330px, 80vw); position: relative; width: var(--w); aspect-ratio: 390 / 844; margin: 0 auto; padding: calc(var(--w) * 0.032); border-radius: calc(var(--w) * 0.15); background: linear-gradient(155deg, #34385a, #0a0b14 38%, #0a0b14 70%, #262a45); box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 0 120px -30px rgba(165, 107, 255, 0.35); }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--w) * 0.12); background: var(--bg); container-type: inline-size; }
.screen .island { position: absolute; z-index: 4; top: 2.6cqw; left: 50%; width: 29cqw; height: 7.6cqw; transform: translateX(-50%); border-radius: 99px; background: #000; }
.screen .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen.live .fallback { display: none; }
.hud, .demo-canvas, .bottom-bar, .complete { visibility: hidden; }
.screen.live .hud, .screen.live .demo-canvas, .screen.live .bottom-bar, .screen.live .complete { visibility: visible; }
.hud { position: absolute; z-index: 2; top: 13cqw; left: 4cqw; right: 4cqw; }
.hud-top, .hud-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.hud-group { display: flex; gap: 2.4cqw; }
.hud-group.end { justify-content: flex-end; }
.hud-icon { display: grid; place-items: center; width: 10.2cqw; height: 10.2cqw; border-radius: 3.2cqw; background: var(--surface); color: var(--soft); }
.hud-icon svg { width: 5.2cqw; height: 5.2cqw; }
.hud-level { position: relative; text-align: center; font-weight: 700; font-size: 6cqw; letter-spacing: 0.3cqw; line-height: 1; }
.hud-level small { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1cqw; padding: 0.2cqw 2cqw; border: 0.3cqw solid var(--gold); border-radius: 99px; color: var(--gold); font-size: 2.5cqw; letter-spacing: 0.3cqw; white-space: nowrap; }
.hud-level small[hidden] { display: none; }
.hud-row { margin-top: 4.2cqw; }
.hearts { display: flex; gap: 1.2cqw; color: var(--heart); }
.hearts svg { width: 5cqw; height: 5cqw; }
.flow { text-align: center; font-weight: 700; font-size: 4.3cqw; letter-spacing: 0.2cqw; }
.demo-canvas { position: absolute; z-index: 1; top: 35cqw; left: 0; width: 100%; height: calc(100% - 57cqw); }
.bottom-bar { position: absolute; z-index: 2; left: 3.5cqw; right: 3.5cqw; bottom: 6cqw; display: flex; gap: 2.6cqw; }
.bottom-bar span { flex: 1 1 auto; padding: 0 2cqw; white-space: nowrap; position: relative; display: flex; align-items: center; justify-content: center; gap: 1.4cqw; height: 12.4cqw; border-radius: 3.6cqw; background: var(--surface); font-weight: 700; font-size: 3.3cqw; letter-spacing: 0.2cqw; }
.bottom-bar svg { width: 3.8cqw; height: 3.8cqw; }
.bottom-bar .help { color: #fff; }
.bottom-bar .free { font-style: normal; font-weight: 700; line-height: 1.2; position: absolute; top: -2.4cqw; right: 2.6cqw; padding: 0.3cqw 1.6cqw; border-radius: 99px; background: var(--gold); color: #0e0f1a; font-size: 2.3cqw; }
.complete { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(14, 15, 26, 0.72); opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.complete.show { opacity: 1; }
.complete b { font-size: 7.4cqw; letter-spacing: 0.3cqw; }
.complete span { margin-top: 2cqw; font-size: 4.2cqw; color: var(--gold); font-weight: 700; }

/* Sections */
section { padding: 76px 0; }
.section-head { max-width: 740px; margin: 0 auto 42px; text-align: center; }
.section-head .kicker { color: var(--coral-light); text-transform: uppercase; letter-spacing: 2.2px; font-size: 14px; font-weight: 600; }
h2 { text-wrap: balance; margin: 8px 0 12px; font-size: clamp(32px, 4.2vw, 46px); line-height: 1.08; font-weight: 700; }
.section-head p { margin: 0; color: var(--muted); font-size: 19px; }
.band { background: linear-gradient(180deg, rgba(25, 27, 43, 0.55), rgba(25, 27, 43, 0)); border-top: 1px solid rgba(46, 49, 80, 0.55); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.step svg { width: 100%; height: auto; aspect-ratio: 16 / 10; margin-bottom: 18px; border-radius: 16px; background: var(--bg); }
.step h3 { margin: 0 0 6px; font-size: 22px; }
.step h3::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 16px; vertical-align: 2px; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.feature .icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 15px; color: #0e0f1a; }
.feature .icon svg { width: 26px; height: 26px; }
.feature h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.2; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* Screenshots */
.shots-wrap { position: relative; }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(210px, 23vw, 262px); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 28px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.shot { margin: 0; scroll-snap-align: center; }
.shot .frame { padding: 7px; border-radius: 30px; background: linear-gradient(155deg, #34385a, #0a0b14 40%, #262a45); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.95); }
.shot img { width: 100%; height: auto; border-radius: 24px; }
.shot figcaption { margin-top: 14px; text-align: center; color: var(--soft); font-size: 16px; font-weight: 500; }
.shot figcaption small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.shots-nav { display: flex; justify-content: center; gap: 10px; }
.shots-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 20px; }
.shots-nav button:hover { background: var(--raised); }

/* Keywords */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin: 0 auto; padding: 0; list-style: none; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--soft); font-size: 16px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 18px; background: var(--surface); border: 1px solid var(--border); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative; font-size: 19px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--coral-light); font-size: 26px; font-weight: 500; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Call to action */
.cta { display: flex; align-items: center; gap: 28px; padding: 36px; border-radius: 30px; background: radial-gradient(80% 140% at 0% 0%, rgba(255, 107, 74, 0.22), transparent 60%), radial-gradient(70% 140% at 100% 100%, rgba(165, 107, 255, 0.2), transparent 60%), var(--surface); border: 1px solid var(--border); }
.cta img { width: 104px; height: 104px; border-radius: 24px; flex: none; }
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0 0 18px; color: var(--muted); }
@media (max-width: 760px) { .cta { flex-direction: column; text-align: center; padding: 30px 22px; } .cta .stores { justify-content: center; } }

/* Content pages (support) */
.page { padding: 56px 0 80px; }
.page .wrap { max-width: 820px; }
.page h1 { margin: 0 0 10px; font-size: clamp(36px, 5vw, 50px); line-height: 1.08; }
.page .lead { max-width: none; margin-bottom: 32px; }
.card { padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; }
.card h2 { font-size: 26px; margin: 0 0 10px; }
.card p, .card li { color: var(--soft); }
.card ul { margin: 0; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.email { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: clamp(20px, 3vw, 26px); font-weight: 700; color: var(--coral-light); text-decoration: none; word-break: break-all; }
.email:hover { text-decoration: underline; }
.note { display: flex; gap: 12px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 201, 64, 0.08); border: 1px solid rgba(255, 201, 64, 0.35); color: var(--soft); }
.note svg { width: 22px; height: 22px; flex: none; color: var(--gold); margin-top: 2px; }

/* Footer */
.site-footer { border-top: 1px solid rgba(46, 49, 80, 0.7); padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.site-footer .brand { font-size: 17px; color: var(--text); }
.site-footer .brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .legal { margin-left: auto; }
@media (max-width: 760px) { .site-footer .wrap, .site-footer nav { justify-content: center; text-align: center; } .site-footer .legal { margin-left: 0; width: 100%; } }
@media (max-width: 520px) { .card { padding: 22px 18px; } }
