/* Colors: Catppuccin Mocha (dark, default) and Latte (light), MIT, the same set as the game UI. */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito_variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --sky-top: #11111b;
  --sky-bottom: #2f2c42;
  --star: rgba(255, 255, 255, 0.75);
  --text: #cdd6f4;
  --text-2: #a6adc8;
  --accent: #cba6f7;
  --on-accent: #11111b;
  --glass: rgba(24, 24, 37, 0.55);
  --glass-rim: rgba(255, 255, 255, 0.12);
  --grid: rgba(205, 214, 244, 0.1);
  --c1: #a6e3a1;
  --c2: #f38ba8;
  --c3: #89b4fa;
  --c4: #fab387;
  --c5: #f9e2af;
  --c6: #cba6f7;
  --glow: 8px;
}

@media (prefers-color-scheme: light) {
  :root {
    --sky-top: #a8daf0;
    --sky-bottom: #eff1f5;
    --star: rgba(255, 255, 255, 0);
    --text: #4c4f69;
    --text-2: #6c6f85;
    --accent: #8839ef;
    --on-accent: #ffffff;
    --glass: rgba(255, 255, 255, 0.6);
    --glass-rim: rgba(76, 79, 105, 0.15);
    --grid: rgba(76, 79, 105, 0.12);
    --c1: #40a02b;
    --c2: #d20f39;
    --c3: #1e66f5;
    --c4: #fe640b;
    --c5: #df8e1d;
    --c6: #8839ef;
    --glow: 2px;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--sky-bottom);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 28% 62%, var(--star), transparent 60%),
    radial-gradient(2px 2px at 44% 9%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 63% 34%, var(--star), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 12%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 88% 48%, var(--star), transparent 60%),
    radial-gradient(1.5px 1.5px at 7% 82%, var(--star), transparent 60%),
    radial-gradient(1px 1px at 53% 88%, var(--star), transparent 60%),
    radial-gradient(2px 2px at 94% 76%, var(--star), transparent 60%),
    linear-gradient(var(--sky-top), var(--sky-bottom) 900px);
  background-color: var(--sky-bottom);
  background-repeat: no-repeat;
}

a { color: var(--accent); }

.wrap {
  width: min(64rem, 100% - 2rem);
  margin: 0 auto;
}

/* Header and footer */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand img { width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; }

.top nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;
  margin-left: 1.25rem;
}

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

footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--glass-rim);
  color: var(--text-2);
  font-size: 0.95rem;
}

footer p { margin: 0.25rem 0; }

/* Home */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 4.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero h1 span:nth-child(1) { color: var(--c2); }
.hero h1 span:nth-child(2) { color: var(--c4); }
.hero h1 span:nth-child(3) { color: var(--c5); }
.hero h1 span:nth-child(4) { color: var(--c1); }
.hero h1 span:nth-child(5) { color: var(--c3); }
.hero h1 span:nth-child(6) { color: var(--c6); }
.hero h1 span:nth-child(n+7) { color: var(--text); }

.tagline {
  margin: 0.75rem 0 1rem;
  font-size: 1.4rem;
  font-weight: 800;
}

.lead { color: var(--text-2); max-width: 32rem; }

.badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.board { width: 100%; max-width: 26rem; justify-self: center; overflow: visible; }
.board-glass { fill: var(--glass); stroke: var(--glass-rim); stroke-width: 2; }
.board-grid { stroke: var(--grid); stroke-width: 2; fill: none; }

.link {
  fill: none;
  stroke-width: 20;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.7s ease-out forwards;
  animation-delay: calc(0.5s + var(--i) * 0.55s);
}

.dot, .link { filter: drop-shadow(0 0 var(--glow) currentColor); }
.shine { fill: rgba(255, 255, 255, 0.55); }

.c1 { color: var(--c1); --i: 0; }
.c2 { color: var(--c2); --i: 1; }
.c3 { color: var(--c3); --i: 2; }
.c4 { color: var(--c4); --i: 3; }
.c5 { color: var(--c5); --i: 4; }
.c6 { color: var(--c6); --i: 5; }
.link.c1, .link.c2, .link.c3, .link.c4, .link.c5, .link.c6 { stroke: currentColor; }
.dot.c1, .dot.c2, .dot.c3, .dot.c4, .dot.c5, .dot.c6 { fill: currentColor; }

@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .link { animation: none; stroke-dashoffset: 0; }
}

h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: 1.9rem;
  font-weight: 900;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.4rem;
  border-radius: 1.25rem;
  background: var(--glass);
  border: 1px solid var(--glass-rim);
  backdrop-filter: blur(8px);
}

.card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 800; }
.card p { margin: 0; color: var(--text-2); }

.steps { counter-reset: step; }
.steps .card h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
}

/* Text pages (privacy policy) */

.doc {
  max-width: 46rem;
  margin: 2rem auto 0;
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-rim);
  backdrop-filter: blur(8px);
}

.doc h1 { margin: 0 0 0.25rem; font-size: 2.2rem; font-weight: 900; line-height: 1.2; }
.doc h2 { margin: 2rem 0 0.5rem; font-size: 1.3rem; }
.doc .updated { margin-top: 0; color: var(--text-2); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--glass-rim); }
.doc li { margin: 0.25rem 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; text-align: center; }
  .lead { margin: 0 auto; }
  .board { max-width: 22rem; }
  .top nav a { margin-left: 0.9rem; }
  .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; }
  .doc thead { display: none; }
  .doc td:first-child { font-weight: 800; border-bottom: 0; padding-bottom: 0; }
}
