/* Tapora — public site
   Palette mirrors the in-game UI theme (scripts/ui_theme.gd). */

:root {
  --night: #010413;
  --night-2: #070b1d;
  --card: rgba(12, 18, 32, 0.92);
  --card-border: rgba(89, 77, 140, 0.35);
  --pink: #e3326e;
  --pink-bright: #ee7ba3;
  --purple: #9e6bf0;
  --magenta: #d058e8;
  --blue: #4a8cdd;
  --gold: #f5b93e;
  --green: #3ee6a0;
  --text: #eef1fb;
  --dim: rgba(238, 241, 251, 0.62);
  --dimmer: rgba(238, 241, 251, 0.40);
  --radius: 20px;
  --maxw: 1120px;
  --font: "Inter", "Helvetica Neue", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* `display` rules below would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Ambient neon wash, fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 12% -10%, rgba(208, 88, 232, 0.20), transparent 60%),
    radial-gradient(55vw 55vw at 88% 8%, rgba(74, 140, 221, 0.18), transparent 62%),
    radial-gradient(70vw 50vw at 50% 105%, rgba(227, 50, 110, 0.16), transparent 65%);
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pink-bright); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  /* Sides only — sections carry their own vertical padding. */
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(1, 4, 19, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--dim);
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch a {
  padding: 4px 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--dimmer);
}
.lang-switch a[aria-current="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 88px 0 64px;
  text-align: center;
}

.hero-logo {
  width: min(620px, 82vw);
  margin: 0 auto 28px;
  filter: drop-shadow(0 0 40px rgba(208, 88, 232, 0.35));
}

.tagline {
  font-size: clamp(24px, 4.4vw, 40px);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 auto 18px;
  max-width: 18ch;
  background: linear-gradient(100deg, #fff 10%, var(--pink-bright) 55%, var(--purple) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--dim);
  max-width: 60ch;
  margin: 0 auto 36px;
}

/* ----------------------------------------------------------- store links */

.stores {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.store-badge:hover { text-decoration: none; }
.store-badge svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.store-badge small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dimmer);
}

.store-badge[href]:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 32px rgba(227, 50, 110, 0.28);
}

/* No href yet — rendered as an inert "coming soon" chip. */
.store-badge:not([href]) {
  opacity: 0.5;
  cursor: default;
}

.stores-note {
  font-size: 14px;
  color: var(--dimmer);
  text-align: center;
  margin: 0 0 8px;
}

/* -------------------------------------------------------------- sections */

section { padding: 84px 0; }

h1, h2, h3 { line-height: 1.25; }

h2.section-title {
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 10px;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--dim);
  max-width: 62ch;
  margin: 0 auto 44px;
}

/* Feature grid */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.feature p { margin: 0; color: var(--dim); font-size: 15.5px; }

.feature .glyph {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--night);
}
.glyph.g-pink { background: var(--pink); box-shadow: 0 0 26px rgba(227, 50, 110, 0.5); }
.glyph.g-blue { background: var(--blue); box-shadow: 0 0 26px rgba(74, 140, 221, 0.5); }
.glyph.g-purple { background: var(--purple); box-shadow: 0 0 26px rgba(158, 107, 240, 0.5); }
.glyph.g-gold { background: var(--gold); box-shadow: 0 0 26px rgba(245, 185, 62, 0.5); }
.glyph.g-green { background: var(--green); box-shadow: 0 0 26px rgba(62, 230, 160, 0.5); }
.glyph.g-magenta { background: var(--magenta); box-shadow: 0 0 26px rgba(208, 88, 232, 0.5); }

/* Timing strip */

.timing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.timing div {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}
.timing strong {
  display: block;
  font-size: 26px;
  letter-spacing: 0.02em;
}
.timing span { color: var(--dim); font-size: 14px; }
.t-perfect strong { color: var(--green); }
.t-great strong { color: var(--blue); }
.t-good strong { color: var(--gold); }
.t-miss strong { color: var(--pink); }

/* Screenshots */

/* Screenshots are 2.16:1 landscape — two per row at most, or they turn to stamps. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px;
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.shot img { width: 100%; }
.shot figcaption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
}

.shot-wide { grid-column: 1 / -1; }

/* Call to action band */

.cta {
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 54px 28px;
  background:
    linear-gradient(180deg, rgba(208, 88, 232, 0.12), rgba(1, 4, 19, 0)) ,
    var(--card);
}

/* ---------------------------------------------------------------- legal */

.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 6px; }
.doc .updated { color: var(--dimmer); font-size: 14px; margin: 0 0 40px; }
.doc h2 {
  font-size: 21px;
  margin: 44px 0 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.doc h3 { font-size: 17px; margin: 26px 0 8px; }
.doc p, .doc li { color: rgba(238, 241, 251, 0.82); font-size: 16.5px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 7px; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 15.5px;
}
.doc th, .doc td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  vertical-align: top;
}
.doc th { background: rgba(255, 255, 255, 0.05); font-weight: 600; }

.table-scroll { overflow-x: auto; }

.callout {
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--pink);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px 20px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }

.toc {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px 24px;
  margin-bottom: 20px;
}
.toc ol { margin: 8px 0 0; }
.toc li { margin-bottom: 4px; }

/* ----------------------------------------------------------------- form */

.form-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin-top: 8px;
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field .hint { font-weight: 400; color: var(--dimmer); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(227, 50, 110, 0.22);
}
.field select option { background: var(--night-2); }

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--dim);
}
.checkbox input { width: auto; margin-top: 4px; flex: none; }

.btn {
  display: inline-block;
  padding: 13px 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(100deg, var(--pink), var(--magenta));
  box-shadow: 0 10px 30px rgba(227, 50, 110, 0.35);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.form-status {
  margin-top: 16px;
  font-size: 15px;
  display: none;
}
.form-status.is-ok { display: block; color: var(--green); }
.form-status.is-error { display: block; color: var(--pink-bright); }

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 44px 0 60px;
  margin-top: 40px;
  color: var(--dimmer);
  font-size: 14.5px;
}
.site-footer .wrap {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-left: auto;
}
.site-footer a { color: var(--dim); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--pink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 44px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
  section { padding: 48px 0; }
}

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