/* Palette tokens per scheme (Okabe-Ito blue, as in the team deck); components use the tokens only. */

:root > * {
  --lv-bg: #f6f7f9;
  --lv-card: #ffffff;
  --lv-line: #d7dce3;
  --lv-text: #17202b;
  --lv-muted: #4a5563;
  --lv-accent: #0063a3;
  --lv-accent-strong: #004f82;
  --lv-award: #8a4b00;
  --lv-award-bg: #fff3e0;

  --md-default-bg-color: var(--lv-bg);
  --md-default-fg-color: var(--lv-text);
  --md-primary-fg-color: #17202b;
  --md-primary-fg-color--light: #2b3746;
  --md-primary-fg-color--dark: #0e141b;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--lv-accent-strong);
  --md-typeset-a-color: var(--lv-accent);
}

[data-md-color-scheme="slate"] {
  --lv-bg: #0e141b;
  --lv-card: #17202b;
  --lv-line: #2b3746;
  --lv-text: #e8edf3;
  --lv-muted: #a9b4c2;
  --lv-accent: #6cb6e8;
  --lv-accent-strong: #9ccff2;
  --lv-award: #f5c27a;
  --lv-award-bg: #2e2416;

  --md-default-bg-color: var(--lv-bg);
  --md-default-fg-color: var(--lv-text);
  --md-default-fg-color--light: var(--lv-muted);
  --md-primary-fg-color: #0b1016;
  --md-primary-bg-color: #e8edf3;
  --md-accent-fg-color: var(--lv-accent-strong);
  --md-typeset-a-color: var(--lv-accent);
  --md-code-bg-color: #151d27;
}

/* Landing */

.hero {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.md-typeset .hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--lv-text);
  margin: 0.8rem 0 0.6rem;
}

.md-typeset .hero-subtitle {
  font-size: 1.1rem;
  color: var(--lv-muted);
  max-width: 40rem;
  margin: 0 auto 1.4rem;
}

.hero-award {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--lv-award);
  background: var(--lv-award-bg);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.md-typeset .hero-buttons .md-button {
  margin: 0;
}

.md-typeset .hero-shot {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--lv-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.landing-section {
  max-width: 46rem;
  margin: 2.5rem auto 0;
}

.js-ready .landing-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-ready .landing-section.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .landing-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.stat {
  background: var(--lv-card);
  border: 1px solid var(--lv-line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: var(--lv-muted);
  font-size: 0.85rem;
}

.md-typeset .stat p {
  margin: 0;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--lv-text);
  line-height: 1.2;
}

/* Drive page: the Myo photo and the five arm poses. The poses are inline SVG drawn in
   currentColor and the accent token, so they follow the color scheme. */
.myo-photo img {
  border-radius: 0.5rem;
  max-width: 28rem;
  width: 100%;
  height: auto;
}

.pose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.md-typeset .pose {
  margin: 0;
  padding: 0.6rem;
  border: 1px solid var(--lv-line);
  border-radius: 0.5rem;
  background: var(--lv-card);
  color: var(--lv-text);
  text-align: center;
}

.pose svg {
  display: block;
  width: 100%;
  height: auto;
}

.pose .arm { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; }
.pose .band { stroke: var(--lv-accent); stroke-width: 15; }
.pose .joint { fill: currentColor; }
.pose .ref { fill: none; stroke: var(--lv-muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pose .move { fill: none; stroke: var(--lv-accent); stroke-width: 2.5; }
.pose .tip, .pose .bandfill { fill: var(--lv-accent); }
.pose .fist { fill: color-mix(in srgb, currentColor 14%, transparent); stroke: currentColor; stroke-width: 3; }
.pose .timer { fill: var(--lv-accent); font-size: 13px; font-weight: 700; }

.md-typeset .pose figcaption {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.md-typeset .pose figcaption strong {
  display: block;
  color: var(--lv-accent);
}
