/* 90 + 40: grass on one side, parquet on the other, dark glass in between (as the app). */
:root {
  --grass: #2f8f46;
  --grass-alt: #2a8440;
  --parquet: #d8904c;
  --parquet-alt: #cc8443;
  --ink: #0b0f14;
  --ink-2: #121821;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --x: #e63946;
  --o: #3a86ff;
  --accent: #f2c14e;
  --field: var(--grass);
  --display: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 22px;
  --max: 1160px;
}

body.sport-basketball {
  --accent: #ff9f43;
  --field: var(--parquet);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); max-width: 18ch; }
h3 { font-size: 22px; }
.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.4s;
}
.lead { color: var(--muted); font-size: 19px; max-width: 54ch; }

/* Only the ball of the sport picked shows on the robots; only its screenshot on the phone. */
body.sport-football .ball-basketball,
body.sport-basketball .ball-football,
body.sport-football .shot-basketball,
body.sport-basketball .shot-football { display: none; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 16px;
  border: 0;
  font: 800 17px var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.3s, opacity 0.2s;
}
.button:active { transform: scale(0.97); }
.button.primary { background: #fff; color: var(--ink); }
.button.primary:hover { background: var(--accent); }
.button.ghost { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(11, 15, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo { flex: none; }
.nav-logo .logo { width: 104px; height: auto; }
.nav-links { display: flex; gap: 22px; margin-right: auto; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.sport-switch {
  display: flex;
  padding: 3px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
}
.sport-switch button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font: 800 14px var(--body);
  cursor: pointer;
}
.sport-switch button[aria-pressed='true'] { background: #fff; color: var(--ink); }
.ball { width: 18px; height: 18px; flex: none; transition: transform 0.4s; }
.sport-switch button[aria-pressed='true'] .ball { transform: rotate(-30deg); }
.lang {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

/* Hero: the pitch on the left, the court on the right; the one picked takes the stage. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-field { position: absolute; inset: 0; z-index: -1; display: flex; }
.hero-field > div { flex: 1; transition: flex 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); position: relative; }
body.sport-football .pitch, body.sport-basketball .court { flex: 3; }
.pitch {
  background:
    radial-gradient(circle at 100% 50%, transparent 0 88px, rgba(255, 255, 255, 0.3) 89px 91px, transparent 92px),
    linear-gradient(90deg, transparent calc(100% - 2px), rgba(255, 255, 255, 0.3) 0),
    repeating-linear-gradient(90deg, var(--grass) 0 64px, var(--grass-alt) 64px 128px);
}
.court {
  background:
    radial-gradient(circle at 0% 50%, transparent 0 88px, rgba(255, 255, 255, 0.45) 89px 91px, transparent 92px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, var(--parquet) 0 120px, var(--parquet-alt) 120px 240px);
}
.hero-field::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 15, 20, 0.88) 0%, rgba(11, 15, 20, 0.55) 55%, rgba(11, 15, 20, 0.15) 100%),
    linear-gradient(0deg, var(--ink) 0, transparent 22%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 16px 96px;
}
.hero-logo .logo { width: min(340px, 80%); height: auto; margin: 6px 0 22px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); }
.hero h1 { max-width: 13ch; margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.soon { color: var(--muted); font-size: 14px; font-weight: 700; }
.hero-phone { position: relative; justify-self: center; }

.phone {
  margin: 0;
  width: min(300px, 72vw);
  aspect-ratio: 390 / 844;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(145deg, #2a3140, #0b0f14);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 40px 80px rgba(0, 0, 0, 0.55);
}
.phone-screen { width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #000; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.tilt { transform: rotate(4deg); animation: float 6s ease-in-out infinite; }
@keyframes float {
  50% { transform: rotate(3deg) translateY(-12px); }
}

.chip {
  position: absolute;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  animation: pop 6s ease-in-out infinite;
  white-space: nowrap;
}
.chip-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 4px; border-radius: 6px; background: var(--x); color: #fff; }
.chip-mark.o { background: var(--o); }
.chip.swap { animation: none; opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s; }
.chip-1 { left: -64px; top: 22%; }
.chip-2 { right: -34px; top: 48%; background: var(--accent); animation-delay: -2s; }
.chip-3 { left: -40px; bottom: 14%; animation-delay: -4s; }
@keyframes pop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

/* Numbers */
.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: -48px auto 0;
  padding: 0 16px;
  gap: 12px;
  position: relative;
}
.number {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
}
.number strong { display: block; font-family: var(--display); font-size: 40px; line-height: 1; color: var(--accent); transition: color 0.4s; }
.number span { color: var(--muted); font-weight: 700; font-size: 15px; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 110px 16px 0; }
.section > h2 { margin-bottom: 36px; }

/* Modes: tabs, then the screenshot and the steps of the one picked. */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 34px;
}
.mode-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font: 800 14px var(--body);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.mode-tabs button img { width: 56px; height: 56px; border-radius: 14px; }
.mode-tabs button:hover { transform: translateY(-2px); }
.mode-tabs button[aria-selected='true'] { background: #fff; color: var(--ink); border-color: #fff; }
.mode-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
  padding: 36px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--field) 40%, transparent), transparent 60%),
    var(--ink-2);
  border: 1px solid var(--glass-border);
}
.mode-panel[hidden] { display: none; }
.mode-panel .phone { width: min(280px, 70vw); animation: rise 0.45s ease-out; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}
.mode-text h3 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 10px; }
.mode-text h4 { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.icon { width: 22px; height: 22px; flex: none; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--muted); }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
}

/* AI */
.ai { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.level {
  padding: 22px 18px;
  border-radius: var(--radius);
  background: var(--ink-2);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}
.level:hover { transform: translateY(-6px); }
.level-easy:hover { border-color: #3ddc84; }
.level-medium:hover { border-color: #f5c84c; }
.level-hard:hover { border-color: #ff4d5e; }
.level h3 { margin: 12px 0 6px; }
.level p { margin: 0; color: var(--muted); font-size: 15px; }
.robot { width: 112px; height: 112px; margin: 0 auto; }
.robot:hover { animation: wobble 0.6s ease-in-out; }
@keyframes wobble {
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.robot-ear { fill: var(--accent); transition: fill 0.4s; }
.robot-face { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.robot-easy .robot-face { stroke: #3ddc84; }
.robot-medium .robot-face { stroke: #f5c84c; }
.robot-hard .robot-face { stroke: #ff4d5e; }
.robot-glow { stroke: none; opacity: 0.35; }
.robot-easy .robot-glow { fill: #3ddc84; }
.robot-medium .robot-glow { fill: #f5c84c; }
.robot-hard .robot-glow { fill: #ff4d5e; }
.robot-eye { stroke: none; }
.robot-medium .robot-eye { fill: #f5c84c; }
.robot-hard .robot-eye { fill: #ff4d5e; animation: blink 4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

/* Online */
.online { text-align: center; }
.online h2 { margin: 0 auto 36px; }
.duel { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 30px; }
.side { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 20px; background: var(--ink-2); border: 2px solid; }
.side-x { border-color: var(--x); }
.side-o { border-color: var(--o); }
.mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-family: var(--display); font-size: 24px; }
.side-x .mark { background: var(--x); }
.side-o .mark { background: var(--o); }
.score { font-family: var(--display); font-size: 44px; line-height: 1; }
.side-x .score { color: var(--x); }
.side-o .score { color: var(--o); }
.colon { font-family: var(--display); font-size: 36px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--glass-border); }
.feature .icon { width: 30px; height: 30px; color: var(--accent); }
.feature h3 { margin: 14px 0 6px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Demo: one Tic Tac Toe square. */
.demo { text-align: center; }
.demo h2, .demo .lead { margin-left: auto; margin-right: auto; }
.demo-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  max-width: 620px;
  margin: 34px auto 0;
  padding: 26px;
  border-radius: 30px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 40px, transparent 40px 80px),
    color-mix(in srgb, var(--field) 55%, var(--ink));
  border: 1px solid var(--glass-border);
  transition: background 0.5s;
}
.criterion {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(8, 12, 16, 0.55);
  font-weight: 900;
  font-size: 19px;
}
.criterion small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.times { font-family: var(--display); font-size: 28px; color: var(--muted); }
.demo-form { grid-column: 1 / -1; display: flex; gap: 10px; }
.demo-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #f7f4ec;
  color: #1b1b1b;
  font: 700 17px var(--body);
}
.demo-form input:focus { outline: none; border-color: var(--accent); }
.demo-result { grid-column: 1 / -1; min-height: 1.6em; margin: 0; font-weight: 800; }
.demo-result.right { color: #3ddc84; }
.demo-result.wrong { color: #ff8a8a; }
.demo-result small { display: block; color: var(--muted); font-weight: 600; }
.demo-next { grid-column: 1 / -1; justify-self: center; }
.demo.offline .demo-board > :not(.demo-result) { opacity: 0.4; pointer-events: none; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--glass-border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 24px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.footer { margin-top: 120px; padding: 48px 16px 40px; text-align: center; border-top: 1px solid var(--glass-border); }
.footer .logo { width: 150px; height: auto; margin: 0 auto 12px; }
.footer p { margin: 4px 0; color: var(--muted); }
.footer .credit { font-size: 13px; }

/* Things slide in as they scroll into view (main.js adds .seen). */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s, transform 0.7s; }
.reveal.seen { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-phone { margin-top: 20px; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .mode-tabs { grid-template-columns: repeat(3, 1fr); }
  .mode-panel { grid-template-columns: 1fr; justify-items: center; gap: 30px; padding: 24px 18px; }
  .ai { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { gap: 10px; }
  .nav-logo .logo { width: 78px; }
  .sport-switch button { padding: 7px 9px; font-size: 0; gap: 0; }
  .sport-switch .ball { width: 20px; height: 20px; }
  .chip-1 { left: -8px; }
  .chip-2 { right: -8px; }
  .chip-3 { left: 0; }
  .section { padding-top: 80px; }
  .levels { grid-template-columns: 1fr; }
  .level { display: grid; grid-template-columns: 80px 1fr; text-align: left; gap: 2px 14px; align-items: center; }
  .level .robot { width: 80px; height: 80px; grid-row: span 2; }
  .level h3 { margin: 0; }
  .demo-board { grid-template-columns: 1fr; padding: 18px; }
  .times { display: none; }
  .demo-form { flex-direction: column; }
  .duel .score { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
