/* ============================================================
   Another Tower Defense — marketing site
   Tokens extracted from the game's own assets (icon.svg, live captures)
   ============================================================ */

:root {
  --void: #05070f;
  --ink: #0d1021;
  --panel: #12152c;
  --panel-line: #23274a;

  --violet-deep: #3c2a72;
  --violet: #8656e8;
  --violet-bright: #c6a3ff;

  --mint: #6ef2b0;
  --crimson: #ef5a76;
  --amber: #ffe066;

  --text: #f3f1fb;
  --text-muted: #9a97b8;
  --text-faint: #5f5c81;

  --radius-card: 18px;
  --radius-pill: 999px;

  --maxw: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: inherit; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 32px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-line);
}

.btn-secondary:hover {
  border-color: var(--violet-bright);
  color: var(--violet-bright);
}

/* ---------- Google Play badge ---------- */

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border: 1px solid #4a4a55;
  border-radius: 12px;
  padding: 10px 20px 10px 16px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.play-badge:hover {
  transform: translateY(-2px);
  border-color: var(--violet-bright);
  box-shadow: 0 14px 32px -12px rgba(134, 86, 232, 0.6);
}

.play-badge svg { width: 26px; height: 26px; flex-shrink: 0; }

.play-badge-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.play-badge-copy small {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #cfcfe0;
}

.play-badge-copy span {
  font-size: 19px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
}

.play-badge.is-compact {
  padding: 7px 14px 7px 11px;
  border-radius: 9px;
  gap: 9px;
}

.play-badge.is-compact svg { width: 19px; height: 19px; }
.play-badge.is-compact .play-badge-copy small { font-size: 8.5px; }
.play-badge.is-compact .play-badge-copy span { font-size: 14px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .site-header .play-badge { display: none; }
  .nav-toggle { display: block; }
  .site-header .container { height: 68px; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 100px;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 1300px;
  height: 1300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(134, 86, 232, 0.22), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  align-items: center;
}

.hero-copy { max-width: 560px; }

.hero-kicker {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(42px, 5.4vw, 68px);
  background: linear-gradient(135deg, #ffffff, var(--violet-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin-top: 20px;
  font-size: 19px;
  color: var(--text-muted);
  max-width: 48ch;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hero-cta-note {
  font-size: 14px;
  color: var(--text-faint);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual .device {
  width: min(300px, 100%);
  transform: rotate(4deg);
}

.hero-visual .orb-badge {
  position: absolute;
  top: -30px;
  right: -6px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(198, 163, 255, 0.3), 0 20px 50px -12px rgba(134, 86, 232, 0.8);
  animation: pulse-glow 5s ease-in-out infinite;
  z-index: 2;
}

.hero-visual .orb-badge img { width: 100%; height: 100%; object-fit: cover; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(198, 163, 255, 0.25), 0 20px 50px -12px rgba(134, 86, 232, 0.7); }
  50% { box-shadow: 0 0 0 1px rgba(198, 163, 255, 0.45), 0 20px 60px -8px rgba(134, 86, 232, 0.95); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: none; text-align: center; }
  .hero-cta { align-items: center; }
  .hero-visual { margin-top: 16px; }
  .hero-visual .device { width: min(260px, 72vw); transform: rotate(0); }
}

/* ---------- device frame (reused for every screenshot) ---------- */

.device {
  position: relative;
}

.device-frame {
  position: relative;
  border-radius: 38px;
  background: linear-gradient(160deg, #1c2038, #090a14);
  padding: 10px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(198, 163, 255, 0.1);
}

.device-frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 18px;
  background: #090a14;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.device-frame::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 90px;
  width: 3px;
  height: 54px;
  background: #1c2038;
  border-radius: 2px 0 0 2px;
}

.device-screen {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--void);
}

.device-screen img {
  width: 100%;
  aspect-ratio: 9 / 16.2;
  object-fit: cover;
  object-position: top;
}

/* ---------- enemy strip ---------- */

.horde-strip {
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--ink);
}

.horde-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: drift 34s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .horde-track { animation: none; }
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.horde-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.horde-item svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ---------- stats ---------- */

.stats {
  padding: 84px 0 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 600;
  color: var(--violet-bright);
}

.stat-label {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- generic section head ---------- */

section { padding: 40px 0; }

.section-head {
  max-width: 620px;
  margin: 0 0 24px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 40px);
}

.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 17px;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- feature showcase (zigzag) ---------- */

.showcase-row {
  display: flex;
  align-items: center;
  gap: 72px;
  padding: 68px 0;
  border-top: 1px solid var(--panel-line);
}

.showcase-row:nth-child(even) .showcase-media { order: 2; }

.showcase-media {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
}

.showcase-media .device { width: 100%; max-width: 260px; }

.showcase-text { flex: 1 1 0; }

.showcase-text h3 {
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 16px;
}

.showcase-text p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 46ch;
}

.showcase-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--violet-bright);
  margin-bottom: 18px;
}

.showcase-tag svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  .showcase-row,
  .showcase-row:nth-child(even) {
    flex-direction: column;
    text-align: center;
    padding: 52px 0;
  }
  .showcase-row:nth-child(even) .showcase-media { order: 0; }
  .showcase-media { flex-basis: auto; }
  .showcase-media .device { max-width: 240px; }
  .showcase-text p { margin-left: auto; margin-right: auto; }
}

/* ---------- get the game / requirements ---------- */

.requirements {
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 640px;
}

.requirements strong { color: var(--text); }

/* ---------- final cta ---------- */

.final-cta {
  text-align: center;
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(closest-side, rgba(134, 86, 232, 0.25), transparent 70%);
  z-index: 0;
}

.final-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.final-cta h2 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 16px;
}

.final-cta p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.final-cta .requirements { margin-top: 28px; }

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

footer {
  border-top: 1px solid var(--panel-line);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-brand img { width: 22px; height: 22px; border-radius: 6px; }

.footer-note {
  color: var(--text-faint);
  font-size: 13px;
  max-width: 520px;
  line-height: 1.7;
}
