/* TapTown public website. One stylesheet, no framework, no web fonts: it paints on the first frame.
   Tokens are the product's own (src/app/globals.css): lime #bff801 on near-black #0b0a10, violet for emphasis. Dark first; light follows the visitor's system. */
:root {
  --bg: #0b0a10;
  --bg-2: #13111b;
  --surface: #16141f;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f4fa;
  --muted: #a7a3b8;
  --brand: #bff801;
  --on-brand: #0f1b05;
  --violet: #7b3fe4;
  --accent-text: #bff801;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-2: #f4f3f8;
    --surface: #f4f3f8;
    --line: rgba(20, 17, 31, 0.12);
    --text: #14111f;
    --muted: #5d5873;
    --accent-text: #6a2fd0;
    --shadow: 0 40px 80px -30px rgba(20, 17, 31, 0.35);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 999px; font-weight: 700; z-index: 100; }
.skip:focus { left: 12px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---- navigation ---- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background 0.3s var(--ease), border-color 0.3s var(--ease); border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.links { display: flex; align-items: center; gap: 6px; }
.links a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-radius: 999px; transition: color 0.2s; }
.links a:hover { color: var(--text); }
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, white); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.links .btn { min-height: 40px; padding: 0 18px; font-size: 15px; color: var(--on-brand); }
@media (max-width: 640px) { .links a.hide-sm { display: none; } .links a { padding: 10px 10px; } .links .btn { padding: 0 16px; font-size: 14px; } }

/* ---- hero ---- */
.hero { position: relative; padding: 132px 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { font-size: clamp(46px, 8.4vw, 96px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 900; margin: 0; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lede { margin: 24px 0 0; max-width: 34em; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { margin-top: 16px; font-size: 14px; color: var(--muted); }
.hero-art { position: relative; height: clamp(420px, 62vw, 640px); }
.asterisk { position: absolute; width: min(120%, 760px); right: -22%; top: -6%; opacity: 0.1; animation: spin 90s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.phone { position: absolute; width: min(300px, 48vw); aspect-ratio: 640 / 1000; border-radius: 38px; padding: 7px; background: linear-gradient(160deg, #2a2738, #0f0d16); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 32px; background: #0b0a10; }
.hero-art .p1 { left: 4%; bottom: 0; transform: rotate(-5deg) translateY(var(--py, 0)); }
.hero-art .p2 { right: 2%; bottom: -70px; transform: rotate(4deg) translateY(var(--py2, 0)); }
@media (max-width: 520px) { .phone { width: 52vw; } .hero-art .p2 { right: -2%; } }

/* ---- story sections ---- */
.story { padding: clamp(80px, 12vw, 160px) 0; border-top: 1px solid var(--line); }
.story-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .story-grid { grid-template-columns: 1fr 1fr; gap: 96px; } .story.flip .story-text { order: 2; } }
.eyebrow { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-text); margin: 0 0 16px; }
.story h2 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 900; margin: 0; }
.story p.body { margin: 22px 0 0; font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 30em; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; font-weight: 600; }
.ticks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); transform: translateY(-1px); }
.stage { position: relative; display: grid; place-items: center; min-height: 440px; }
.stage .phone { position: relative; width: min(310px, 70vw); }
.stage::before { content: ""; position: absolute; width: min(420px, 90%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 34%, transparent), transparent); filter: blur(10px); z-index: 0; }
.stage .phone { z-index: 1; }

/* the typographic story: games, polls, errands */
.words { padding: clamp(80px, 12vw, 150px) 0; border-top: 1px solid var(--line); }
.words ul { list-style: none; margin: 0; padding: 0; }
.words li { font-size: clamp(42px, 9.5vw, 128px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.04; color: transparent; -webkit-text-stroke: 1.5px var(--muted); transition: color 0.4s var(--ease), -webkit-text-stroke-color 0.4s; }
.words li:hover, .words li.on { color: var(--text); -webkit-text-stroke-color: var(--text); }
.words li small { font-size: clamp(14px, 1.6vw, 18px); letter-spacing: 0; font-weight: 600; color: var(--muted); -webkit-text-stroke: 0; margin-left: 14px; vertical-align: middle; }
.words .note { margin-top: 36px; max-width: 36em; color: var(--muted); font-size: 18px; }

/* ---- download ---- */
.get { padding: clamp(80px, 12vw, 150px) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.get h2 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 900; margin: 0; }
.get .lead { color: var(--muted); font-size: 19px; max-width: 34em; margin: 20px 0 0; }
.cards { display: grid; gap: 16px; margin-top: 44px; }
@media (min-width: 800px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 230px; }
.card h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .btn { margin-top: auto; align-self: flex-start; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.live { background: var(--brand); color: var(--on-brand); border-color: transparent; }

/* ---- close ---- */
.close { padding: clamp(90px, 14vw, 190px) 0; text-align: center; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.close h2 { font-size: clamp(44px, 9vw, 112px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 900; margin: 0; }
.close .cta { justify-content: center; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }
footer .small { flex-basis: 100%; font-size: 13px; opacity: 0.85; }

/* ---- plain pages (privacy, terms, contact, 404) ---- */
.doc { padding: 130px 0 90px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(38px, 6vw, 60px); letter-spacing: -0.04em; line-height: 1.02; font-weight: 900; margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); font-size: 17px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- motion: reveal on scroll; everything is visible without JavaScript and with reduced motion ---- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; } .js .reveal.d2 { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .asterisk { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav { transition: none; }
}
