/*
 * DotSurvive's page on haulx.net: the game's own colors and font, dark and
 * bright, like the app. Tokens and component shapes mirror the game's existing
 * web page (dotsurvive.module.css in the TCG Bolt repo) and lib/ui/theme.dart.
 */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ds-bg: #07060f;
  --ds-card: #12111d;
  --ds-line: rgba(255, 255, 255, 0.08);
  --ds-text: #ffffff;
  --ds-dim: #a1a1a8;
  --ds-yellow: #ffd60a;
  --ds-blue: #2f80ff;
  --ds-green: #34c759;
  --c: var(--ds-blue);
}

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

html { background: var(--ds-bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; margin: 0; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* --------------------------------------------------------------- top bar */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(47, 128, 255, 0.5);
}

.topLinks { display: flex; gap: 18px; font-size: 15px; }

.topLinks a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 0;
}

.topLinks a:hover { color: var(--ds-yellow); }

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

.hero {
  position: relative;
  min-height: min(92svh, 860px);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--ds-bg));
  pointer-events: none;
  z-index: 1;
}

.arena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(70% 60% at 30% 20%, rgba(47, 128, 255, 0.22), transparent 70%),
    linear-gradient(#0b0d1c, #000000);
}

.heroContent {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 96px 20px 72px;
  max-width: 760px;
}

.heroIcon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 40px rgba(47, 128, 255, 0.55);
  margin-bottom: 18px;
}

.title {
  font-size: clamp(56px, 13vw, 128px);
  line-height: 0.95;
  text-shadow:
    0 0 24px rgba(47, 128, 255, 0.75),
    0 4px 0 rgba(0, 0, 0, 0.35);
}

.tagline {
  margin-top: 14px;
  font-size: clamp(22px, 4.6vw, 34px);
  font-weight: 700;
}

.tagline span {
  color: var(--ds-yellow);
  text-shadow: 0 0 18px rgba(255, 214, 10, 0.55);
}

.lede {
  margin-top: 10px;
  max-width: 34ch;
  font-size: clamp(16px, 2.6vw, 19px);
  color: rgba(255, 255, 255, 0.82);
}

.playBtn {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  background: var(--ds-yellow);
  border-radius: 999px;
  padding: 16px 30px;
  text-decoration: none;
  box-shadow:
    0 6px 0 #b39400,
    0 12px 32px rgba(255, 214, 10, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}

.playBtn:hover { transform: translateY(-2px); }

.playBtn:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #b39400,
    0 6px 18px rgba(255, 214, 10, 0.3);
}

.playIcon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #111;
}

.stores {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.storePill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  padding: 9px 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 18px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.storePill small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

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

.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.stat {
  text-align: center;
  padding: 18px 10px;
  border-radius: 18px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
}

.stat b {
  display: block;
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  color: var(--c);
  text-shadow: 0 0 22px var(--c);
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--ds-dim);
  font-size: 15px;
}

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

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 88px 20px 0;
}

.kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c);
}

.h2 {
  margin-top: 6px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
}

.intro {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
}

.section h3 { font-size: 21px; line-height: 1.2; }

.section article p,
.step p,
.powerup p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15.5px;
}

.steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  padding: 24px;
  border-radius: 22px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  border-top: 3px solid var(--c);
}

.stepNum {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
  background: var(--c);
  box-shadow: 0 0 20px var(--c);
}

.modes {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mode {
  padding: 24px;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 60%),
    var(--ds-card);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}

.mode h3 {
  color: var(--c);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.online {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  color: #06220f;
  background: var(--ds-green);
}

.bosses {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.boss {
  padding: 22px;
  border-radius: 22px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.boss:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--c) 22%, transparent);
}

.bossArt {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  color: var(--c);
  filter: drop-shadow(0 0 8px var(--c));
}

.boss h3 { color: var(--c); }

.events {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.event {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, var(--ds-card)), var(--ds-card) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}

.eventHint {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111 !important;
  background: var(--c);
}

.zones {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.zone {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background:
    radial-gradient(90% 60% at 30% 25%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%),
    linear-gradient(var(--top), var(--bottom));
  border: 1px solid var(--ds-line);
}

.zoneNum {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.zoneName { font-size: 18px; font-weight: 700; line-height: 1.15; }

.powerups {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.powerup {
  text-align: center;
  padding: 24px 16px;
  border-radius: 20px;
  background: var(--ds-card);
  border: 1px solid var(--ds-line);
}

.orb {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c) 40%);
  box-shadow: 0 0 26px var(--c);
  animation: bob 3s ease-in-out infinite;
}

.powerup:nth-child(2) .orb { animation-delay: -0.6s; }
.powerup:nth-child(3) .orb { animation-delay: -1.2s; }
.powerup:nth-child(4) .orb { animation-delay: -1.8s; }
.powerup:nth-child(5) .orb { animation-delay: -2.4s; }

@keyframes bob {
  50% { transform: translateY(-6px); }
}

.finale {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 96px;
}

.finale .intro { margin-left: auto; margin-right: auto; }

.support { margin-top: 30px; color: rgba(255, 255, 255, 0.78); }
.support a { color: var(--ds-yellow); }

.smallprint { margin-top: 10px; font-size: 14px; color: var(--ds-dim); }
.smallprint a { color: var(--ds-dim); }

.foot {
  border-top: 1px solid var(--ds-line);
  padding: 24px 20px 40px;
  font-size: 14px;
  color: var(--ds-dim);
}

.foot div {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}

.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ds-yellow); }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 960px) {
  .modes, .events { grid-template-columns: repeat(2, 1fr); }
  .zones { grid-template-columns: repeat(3, 1fr); }
  .powerups { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topLinks a.wide { display: none; }
  .section { padding-top: 64px; }
}

@media (max-width: 520px) {
  .modes, .events { grid-template-columns: 1fr; }
  .zones, .powerups { grid-template-columns: repeat(2, 1fr); }
  .zone { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .boss, .playBtn { transition: none; }
}
