/* LapsHub marketing site — Slate theme (matches app) */

:root {
  --bg-solid: #030712;
  --bg-alt: #111827;
  --bg-gradient: linear-gradient(to bottom, #111827, #030712);
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-muted: #d1d5db;
  --accent: #34d399;
  --accent-lap: #6ee7b7;
  --cta: linear-gradient(to right, #dc2626, #1d4ed8);
  --card-bg: linear-gradient(145deg, rgba(31, 41, 55, 0.95), rgba(3, 7, 18, 0.98));
  --card-border: rgba(248, 250, 252, 0.28);
  --panel-border: rgba(248, 250, 252, 0.22);
  --ink-bar: #f87171;
  --font: Roboto, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --max-width: 1120px;
  --header-height: 64px;
  --divider-gap: 40px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-solid);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

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

a { color: var(--accent-lap); text-decoration: none; }
a:hover { color: var(--accent); }

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

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.85));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.site-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--accent-lap); }

.site-nav a.is-active {
  color: var(--accent-lap);
}

.site-nav a.btn.is-active,
.site-nav a.btn { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 25px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}

.btn--primary:hover { color: #fff; box-shadow: 0 6px 28px rgba(29, 78, 216, 0.35); }

.btn--secondary {
  background: rgba(31, 41, 55, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.18);
}

.btn--secondary:hover { color: var(--text-primary); border-color: var(--card-border); }

.btn--block { width: 100%; }

/* ── Hero ── */

.hero--home {
  min-height: 100vh;
}

/* ── Page hero (inner pages) ── */

.page-hero {
  padding: calc(var(--header-height) + 48px) 0 48px;
  background: var(--bg-gradient);
  border-bottom: 1px solid var(--panel-border);
  margin-bottom: var(--divider-gap);
  text-align: center;
}

.page-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.page-hero__desc {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Page heroes stay visible — scroll-depth animation caused mobile flicker */
.page-hero,
.page-hero .container {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Explore cards (home) ── */

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.explore-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.explore-card:hover {
  border-color: rgba(52, 211, 153, 0.45);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.explore-card__icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 12px;
}

.explore-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.explore-card p {
  margin: 0 0 16px;
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.explore-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-lap);
}

/* ── Feature detail blocks ── */

.feature-details {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 760px;
}

.feature-detail {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.feature-detail__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent);
  font-size: 26px;
}

.feature-detail__body h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.feature-detail__body p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-detail__body p:last-child { margin-bottom: 0; }

.feature-details--wide {
  max-width: var(--max-width);
}

.feature-detail--app {
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 32px;
  max-width: none;
}

.feature-detail--app-reverse {
  flex-direction: row-reverse;
}

.feature-detail__phone {
  flex: 0 1 340px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-detail__content {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 20px;
}

/* ── App screenshots (device captures) ── */

.app-screenshot {
  width: min(100%, 280px);
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.15);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  background: #030712;
}

.app-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.app-screenshot-stack {
  position: relative;
  width: min(100%, 320px);
  min-height: 360px;
  margin: 0 auto;
}

.app-screenshot--stacked {
  position: relative;
}

.app-screenshot-stack .app-screenshot--stacked:first-child {
  position: relative;
  z-index: 2;
  width: 78%;
  margin-right: auto;
}

.app-screenshot-stack .app-screenshot--stacked:last-child {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 72%;
  z-index: 1;
}

.app-screenshot-stack .app-screenshot--stacked:only-child {
  position: relative;
  width: 100%;
}

/* ── App showcase band (home) ── */

.app-showcase-band__grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 48px;
  align-items: center;
}

.app-showcase-band__grid--reverse {
  direction: rtl;
}

.app-showcase-band__grid--reverse > * {
  direction: ltr;
}

.app-showcase-band__title {
  margin: 8px 0 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.app-showcase-band__desc {
  margin: 0 0 24px;
  max-width: 48ch;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.devices__image--phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.devices__image-caption {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-lap);
  text-align: center;
}

/* ── Steps ── */

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

.step-card {
  padding: 28px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  text-align: center;
}

.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-lap);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.step-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── FAQ ── */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 4px 20px;
}

.faq-item summary {
  padding: 16px 0;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item a { color: var(--accent-lap); }

/* ── Prose (legal + content) ── */

.prose, .prose-block {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2, .prose-block h2 {
  margin: 32px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prose h2:first-child, .prose-block h2:first-child { margin-top: 0; }

.prose p, .prose-block p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.prose li { margin-bottom: 8px; }

.prose a, .prose-block a { color: var(--accent-lap); }

.prose strong, .prose-block strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose h3, .prose-block h3 {
  margin: 24px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prose--legal {
  max-width: 920px;
}

.prose--legal .list-item {
  position: relative;
  padding-left: 18px;
}

.prose--legal .list-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-lap);
}

.prose--legal .callout {
  padding: 14px 16px;
  border-left: 3px solid var(--accent-lap);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
}

.prose--legal .table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.prose--legal table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.prose--legal th,
.prose--legal td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.prose--legal th {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.prose--legal tr:last-child td { border-bottom: 0; }

.prose-block .btn { margin-top: 8px; }

/* ── Cross links ── */

.cross-links {
  text-align: center;
}

.cross-links p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cross-links a { font-weight: 600; }

.cross-links__note {
  margin-top: 12px !important;
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.4) !important;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── Pitch strip h2 (home SEO) ── */

.pitch-strip__item h2,
.pitch-strip__item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-lap);
}

/* ── Hero default height for inner pages not using full hero ── */

.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 40px) 0 60px;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero--home .hero__grid {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.hero__logo {
  width: auto;
  max-width: 220px;
  height: auto;
  max-height: 80px;
  margin-bottom: 24px;
  object-fit: contain;
  filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.45));
}

.hero__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.hero__tagline {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-lap);
}

.hero__subtitle {
  margin: 0 0 32px;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 480px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Sections ── */

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__label {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-lap);
}

.section__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section__desc {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Pitch strip ── */

.pitch-strip {
  padding: 48px 0;
  margin-top: var(--divider-gap);
  margin-bottom: var(--divider-gap);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  background: rgba(31, 41, 55, 0.4);
}

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

.pitch-strip__item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-lap);
}

.pitch-strip__item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Feature cards ── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(52, 211, 153, 0.4);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  margin-bottom: 16px;
  font-size: 24px;
  color: var(--accent);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Devices ── */

.devices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.devices__media {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.devices__image--hardware {
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.devices__image {
  display: flex;
  justify-content: center;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.devices__image img {
  max-height: 280px;
  object-fit: contain;
}

.devices__image--phone .app-screenshot {
  width: min(100%, 240px);
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.device-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.device-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent);
  font-size: 22px;
}

.device-item h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
}

.device-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.device-item p a {
  color: var(--accent-lap);
  font-weight: 600;
}

.device-item__badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-lap);
}

/* ── Account types ── */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.audience-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: border-color 0.2s;
}

.audience-card:hover { border-color: rgba(52, 211, 153, 0.4); }

.audience-card__avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, var(--accent), var(--accent-lap));
}

.audience-card__avatar img {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1f2937;
}

.audience-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.audience-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Pricing ── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  text-align: center;
}

.pricing-card--featured {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.08);
}

.pricing-card__name {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-lap);
}

.pricing-card__price {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-card__period {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.pricing-card li {
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pricing-card li::before {
  content: '✓';
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
}

/* ── CTA ── */

.cta-section {
  padding: 80px 0;
  margin-top: var(--divider-gap);
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-alt), var(--bg-solid));
  border-top: 1px solid var(--panel-border);
}

.cta-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.cta-section p {
  margin: 0 0 32px;
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ── App store buttons ── */

.store-buttons-wrap {
  text-align: center;
}

.store-buttons-section {
  padding-top: 48px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.store-buttons__note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.store-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 168px;
  padding: 10px 20px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  color: #fff;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.store-btn__label {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.store-btn__name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.store-btn--apple .store-btn__name::before {
  content: ' ';
}

.store-btn--google .store-btn__name::before {
  content: '▶ ';
  font-size: 0.85rem;
}

/* ── Footer ── */

.site-footer {
  padding: 40px 0;
  margin-top: var(--divider-gap);
  border-top: 1px solid var(--panel-border);
  background: var(--bg-solid);
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer__brand img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.site-footer__brand span {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover { color: var(--accent-lap); }

.site-footer__copy {
  width: 100%;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* ── Live badge (decorative) ── */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--accent);
  margin-bottom: 16px;
}

.live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__logo { margin-left: auto; margin-right: auto; }
  .devices-grid { grid-template-columns: 1fr; }
  .pitch-strip__grid { grid-template-columns: 1fr; gap: 24px; }
  .audience-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .feature-detail { flex-direction: column; }
  .feature-detail--app,
  .feature-detail--app-reverse { flex-direction: column; }
  .feature-detail__content { flex-direction: column; }
  .feature-detail__phone { flex: none; width: 100%; }
  .app-screenshot-stack {
    min-height: 0;
    padding-bottom: 48%;
  }
  .app-screenshot-stack .app-screenshot--stacked:last-child {
    position: relative;
    width: 88%;
    margin: -40px 0 0 auto;
  }
  .app-showcase-band__grid,
  .app-showcase-band__grid--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    text-align: center;
  }
  .app-showcase-band__desc { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(3, 7, 18, 0.98);
    border-bottom: 1px solid var(--panel-border);
    padding: 12px 0;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    padding: 14px 20px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .site-nav .btn { margin: 12px 20px 4px; }

  .section { padding: 56px 0; }
}

/* ── Photo hero & bands ── */

.hero--photo {
  position: relative;
  min-height: 92vh;
  background: var(--bg-solid);
}

.hero--photo .hero__photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.42;
}

.hero--photo .hero__photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(3, 7, 18, 0.55) 0%, rgba(3, 7, 18, 0.88) 55%, #030712 100%),
    linear-gradient(to right, rgba(3, 7, 18, 0.75) 0%, transparent 55%);
}

.hero--photo .container { position: relative; z-index: 1; }

.photo-band {
  position: relative;
  overflow: hidden;
  margin-top: var(--divider-gap);
  margin-bottom: var(--divider-gap);
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
}

.photo-band__img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0.55;
}

.photo-band__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.4), rgba(3, 7, 18, 0.85));
  text-align: center;
}

.photo-band__quote {
  margin: 0;
  max-width: 640px;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: minmax(220px, 28vw) minmax(220px, 28vw);
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.photo-mosaic__item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.photo-mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-mosaic__item--large {
  grid-row: span 2;
}

/* ── Showcase split ── */

.showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.showcase-split--reverse { direction: rtl; }
.showcase-split--reverse > * { direction: ltr; }

.showcase-split__media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.showcase-split__media img {
  width: 100%;
  display: block;
}

.showcase-split__body h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
}

.showcase-split__body p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
}

.showcase-split__body p:last-child { margin-bottom: 0; }

/* ── DIY / open source page ── */

.diy-legal {
  margin-top: 20px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.diy-legal a {
  color: rgba(255, 255, 255, 0.45);
}

.os-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-lap);
  margin-bottom: 16px;
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.build-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}

.build-card__img {
  background: rgba(0, 0, 0, 0.35);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.build-card__img img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── DIY photo gallery (bento) ── */

.diy-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.diy-gallery__item {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.diy-gallery__item img {
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.diy-gallery__item--solo,
.diy-gallery__item--wide {
  grid-column: 1 / -1;
}

.build-card__body {
  padding: 24px;
}

.build-card__body h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.build-card__body p {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.build-card__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.parts-table th,
.parts-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.parts-table th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-lap);
}

.parts-table td { color: var(--text-secondary); }

.parts-table a { color: var(--accent-lap); font-weight: 600; }

.github-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 28px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
}

.github-cta p {
  flex: 1;
  min-width: 200px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .photo-mosaic { grid-template-columns: 1fr; grid-template-rows: auto; }
  .photo-mosaic__item--large { grid-row: auto; }
  .photo-mosaic__item { height: 200px; }
  .showcase-split { grid-template-columns: 1fr; }
  .showcase-split--reverse { direction: ltr; }
  .build-grid { grid-template-columns: 1fr; }
  .diy-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 20px;
    max-width: none;
  }
  .diy-gallery__item--hero,
  .diy-gallery__item--side-top,
  .diy-gallery__item--side-bottom,
  .diy-gallery__item--wide {
    grid-column: 1;
    grid-row: auto;
  }
  .diy-gallery__item img {
    min-height: 260px;
    max-height: 420px;
  }
  .diy-gallery__item--wide img {
    min-height: 240px;
    max-height: 360px;
  }
}

/* ── Scroll 3D effects ── */

html.scroll-3d-on {
  scroll-behavior: smooth;
}

/* Perspective on main only — body perspective breaks position:fixed on .site-header */
html.scroll-3d-on main {
  perspective: 1800px;
  perspective-origin: 50% 50%;
}

.scroll-depth {
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  opacity: 0;
  transform:
    perspective(1800px)
    rotateX(calc(5deg + var(--depth-x, 0deg)))
    rotateY(var(--depth-y, 0deg))
    translate3d(0, calc(24px + var(--depth-y-offset, 0px)), calc(-32px + var(--depth-z, 0px)));
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-depth.is-inview {
  opacity: 1;
  transform:
    perspective(1800px)
    rotateX(var(--depth-x, 0deg))
    rotateY(var(--depth-y, 0deg))
    translate3d(0, var(--depth-y-offset, 0px), var(--depth-z, 0px));
}

.hero--photo .hero__photo-bg.scroll-depth {
  opacity: 1;
  transition: transform 0.08s linear;
  transform: translate3d(0, var(--hero-parallax-y, 0px), 0) scale(1.06);
}

.hero--photo .hero__content {
  transform: translate3d(0, var(--hero-content-y, 0px), var(--hero-content-z, 0px));
  opacity: var(--hero-content-opacity, 1);
}

.photo-band__img.scroll-depth {
  opacity: 0.55;
  transition: transform 0.08s linear;
  transform: translate3d(0, var(--band-parallax-y, 0px), 0) scale(1.04);
}

.photo-band__quote {
  transform: translate3d(0, var(--band-quote-y, 0px), 0);
  opacity: var(--band-quote-opacity, 1);
}

.explore-card.scroll-depth.is-inview:hover,
.audience-card.scroll-depth.is-inview:hover,
.feature-card.scroll-depth.is-inview:hover {
  transform:
    perspective(1800px)
    rotateX(var(--depth-x, 0deg))
    rotateY(var(--depth-y, 0deg))
    translate3d(0, calc(var(--depth-y-offset, 0px) - 2px), calc(var(--depth-z, 0px) + 6px));
}

.site-header.is-scrolled {
  background: rgba(3, 7, 18, 0.98);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html.scroll-3d-off .scroll-depth {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .live-badge__dot { animation: none; }
  html { scroll-behavior: auto; }
  .btn:hover, .feature-card:hover, .explore-card:hover, .audience-card:hover { transform: none; }
  .scroll-depth {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero--photo .hero__photo-bg,
  .hero--photo .hero__content,
  .photo-band__img,
  .photo-band__quote {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ── Track leaderboards ── */

.track-leaderboard__loading,
.track-leaderboard__error {
  padding: calc(var(--header-height) + 80px) 20px 80px;
  text-align: center;
  color: var(--text-muted);
}

.track-leaderboard__error { color: #fca5a5; }

.track-hero {
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.track-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 15, 26, 0.55) 0%,
    rgba(12, 15, 26, 0.92) 70%,
    var(--bg-solid) 100%
  );
}

.track-hero__content {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-height) + 28px) 20px 20px;
  text-align: center;
}

.track-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-lap);
  font-weight: 600;
}

.track-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.track-hero__tagline {
  margin: 0 auto 24px;
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.track-hero--catalog .track-hero__title {
  text-transform: none;
  letter-spacing: 0.01em;
}

.track-stat__num--text {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: none;
  max-width: 12ch;
}

.track-record {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 20px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.6);
}

.track-record__label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.track-record__time {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-lap);
}

.track-record__driver {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.track-hero__stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.track-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.track-stat__num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

.track-stat__label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.track-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px;
  padding: 20px 20px 48px;
  align-items: start;
  max-width: 100%;
  overflow-x: clip;
}

.track-detail-panel {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-alt);
  min-width: 0;
}

.track-tabs__bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(17, 24, 39, 0.95);
}

.track-tabs__tab {
  flex: 1;
  margin: 0;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.track-tabs__tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.track-tabs__tab.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-lap);
  background: rgba(52, 211, 153, 0.06);
}

.track-tabs__tab:focus-visible {
  outline: 2px solid var(--accent-lap);
  outline-offset: -2px;
}

.track-tabs__panels {
  min-height: 0;
}

.track-tabs__panel {
  display: none;
  padding: 16px;
}

.track-tabs__panel.is-active {
  display: block;
}

.track-tabs__panel[hidden] {
  display: none !important;
}

.track-leaderboard-panel {
  min-width: 0;
}

.track-map-panel {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-alt);
}

.track-map-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(17, 24, 39, 0.95);
}

.track-map-panel__badge--accent {
  color: #f59e0b;
}

.track-map-wrap {
  position: relative;
  isolation: isolate;
}

.track-map-wrap .track-map {
  height: 320px;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.track-map .leaflet-container {
  max-width: 100%;
}

.track-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 28px;
  pointer-events: none;
}

.leaflet-container > .track-map-overlay {
  z-index: 1000;
}

.track-map__lock {
  position: relative;
  inset: auto;
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(8px);
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.track-map__lock .material-symbols-outlined {
  font-size: 1.25rem;
  color: #f59e0b;
}

.track-map__lock-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.track-map__lock-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.track-map .track-map__reference-line {
  filter: blur(2px);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.tracks-index-pitch {
  padding-top: 48px;
  padding-bottom: 56px;
}

.tracks-index-pitch__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tracks-index-pitch__item {
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.tracks-index-pitch__item h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-lap);
}

.tracks-index-pitch__item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tracks-index-cta {
  padding-top: 64px;
  padding-bottom: 64px;
}

.tracks-index-cta__header {
  max-width: 52ch;
  margin: 0 auto 32px;
  text-align: center;
}

.tracks-index-cta__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tracks-index-cta__lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.55;
}

.tracks-index-cta__steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tracks-index-cta__step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--card-bg);
}

.tracks-index-cta__step-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.35);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-lap);
}

.tracks-index-cta__step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tracks-index-cta__step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tracks-index-cta__note {
  margin: 0 auto 28px;
  max-width: 58ch;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tracks-index-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tracks-index-cta__community {
  margin: 0 0 24px;
  padding: 24px 28px;
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.08), rgba(3, 7, 18, 0.4));
  text-align: center;
}

.tracks-index-cta__community-title {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text-primary);
}

.tracks-index-cta__community-desc {
  margin: 0 auto;
  max-width: 58ch;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.track-about__title {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 700;
}

.track-about__tagline {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.track-about__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.track-about__facts li:not(:last-child)::after {
  content: '·';
  margin: 0 10px;
  color: var(--text-muted);
}

.track-about__body {
  max-width: 68ch;
}

.track-about__body .track-catalog__paragraph {
  font-size: 0.925rem;
}

.track-about__body .track-catalog__highlights {
  margin-top: 20px;
  padding-top: 16px;
}

.track-about__body .track-catalog__highlights-title {
  font-size: 0.95rem;
}

.track-about__body .track-catalog__highlights-list {
  font-size: 0.9rem;
}

.track-catalog {
  padding-top: 48px;
  padding-bottom: 48px;
}

.track-catalog__title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.track-catalog__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.track-catalog__facts li:not(:last-child)::after {
  content: '·';
  margin: 0 10px;
  color: var(--text-muted);
}

.track-catalog__body {
  max-width: 68ch;
}

.track-catalog__paragraph {
  margin: 0 0 1em;
  color: var(--text-secondary);
  line-height: 1.65;
}

.track-catalog__paragraph:last-of-type {
  margin-bottom: 0;
}

.track-catalog__highlights {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--panel-border);
}

.track-catalog__highlights-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.track-catalog__highlights-list {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--text-secondary);
  line-height: 1.6;
}

.track-catalog__highlights-list li + li {
  margin-top: 10px;
}

.track-reference-teaser {
  padding: 24px 20px;
}

.track-reference-teaser__visual {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--card-bg);
  color: #f59e0b;
}

.track-reference-teaser__svg {
  display: block;
  width: 100%;
  height: auto;
}

.track-reference-teaser__line {
  filter: blur(2px);
}

.track-reference-teaser__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: rgba(3, 7, 18, 0.72);
  border-radius: 16px;
}

.track-reference-teaser__lock .material-symbols-outlined {
  font-size: 1.5rem;
  color: #f59e0b;
}

.track-reference-teaser__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.track-reference-teaser__desc {
  margin: 0;
  max-width: 28ch;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.track-submit-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.track-submit-cta__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.track-submit-cta__record {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  color: var(--accent-lap);
}

.track-submit-cta__desc {
  margin: 0;
  max-width: 58ch;
  color: var(--text-secondary);
  line-height: 1.55;
}

.track-submit-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.track-map-panel__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-lap);
}

.track-map {
  height: 360px;
  width: 100%;
  background: #111827;
}

.track-map__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.track-map .leaflet-control-attribution {
  font-size: 9px;
  background: rgba(3, 7, 18, 0.75) !important;
  color: var(--text-muted) !important;
}

.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  min-height: 200px;
}

.podium-slot {
  flex: 1;
  max-width: 160px;
}

.podium-slot--first { order: 2; }
.podium-slot--second { order: 1; }
.podium-slot--third { order: 3; }

.podium-slot--first .podium-card { min-height: 190px; }
.podium-slot--second .podium-card { min-height: 160px; }
.podium-slot--third .podium-card { min-height: 140px; }

.podium-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  overflow: hidden;
}

.podium-card__color-bar {
  height: 4px;
  width: 100%;
}

.podium-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  text-align: center;
  gap: 4px;
  flex: 1;
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.podium-rank--gold { color: #fcd34d; border: 2px solid #fcd34d; }
.podium-rank--silver { color: #d1d5db; border: 2px solid #9ca3af; }
.podium-rank--bronze { color: #fdba74; border: 2px solid #f97316; }

.podium-card__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.podium-card__time {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-lap);
}

.podium-card__car {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.podium-card__gap {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.podium-card__date {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: auto;
}

.lb-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.lb-section__header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.lb-section__count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lb-table {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 52px 1fr 1.4fr 100px 72px;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
  font-size: 0.875rem;
}

.lb-row:last-child { border-bottom: none; }

.lb-row--head {
  background: rgba(17, 24, 39, 0.95);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lb-row__pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 2px solid #6b7280;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lb-row__driver { font-weight: 600; }

.lb-row__car {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.lb-row__time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-lap);
}

.lb-row__gap {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lb-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
}

.track-leaderboard__meta {
  margin: 20px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.track-card-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.track-card-link.is-search-hidden {
  display: none !important;
}

.track-card-link:hover {
  border-color: var(--accent-lap);
  transform: translateY(-2px);
  color: inherit;
}

.track-card-link__img {
  aspect-ratio: 21 / 9;
  background-size: cover;
  background-position: center;
  background-color: #111827;
}

.track-card-link__body {
  padding: 20px;
}

.track-card-link__name {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.track-card-link__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding-bottom: 64px;
}

.tracks-world-map {
  padding-top: 48px;
  padding-bottom: 48px;
}

.tracks-world-map__header {
  margin-bottom: 20px;
}

.tracks-world-map__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.tracks-world-map__desc {
  margin: 0;
  max-width: 52ch;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tracks-world-map__frame {
  position: relative;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  overflow: hidden;
  background: #030712;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  max-width: 100%;
}

.tracks-world-map__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.world-map-region {
  cursor: pointer;
  outline: none;
  pointer-events: visiblePainted;
}

.world-map-region__shape {
  fill: #94a3b8;
  fill-opacity: 0.42;
  stroke: #cbd5e1;
  stroke-opacity: 0.35;
  stroke-width: 0.5;
  pointer-events: visiblePainted;
  transition:
    fill 0.18s ease,
    fill-opacity 0.18s ease,
    stroke 0.18s ease,
    stroke-opacity 0.18s ease,
    stroke-width 0.18s ease,
    opacity 0.18s ease;
}

.world-map-outlines__group .world-map-region__outline {
  fill: none;
  stroke: transparent;
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition:
    stroke 0.18s ease,
    stroke-width 0.18s ease,
    stroke-opacity 0.18s ease,
    filter 0.18s ease;
}

.tracks-world-map__svg.is-continent-hover .world-map-region:not(:hover):not(.is-hovered) .world-map-region__shape {
  fill: #64748b;
  fill-opacity: 0.18;
  stroke-opacity: 0.12;
  opacity: 0.55;
}

.tracks-world-map__svg.is-continent-hover .world-map-outlines__group:not(.is-hovered) .world-map-region__outline {
  stroke: transparent;
}

.world-map-region:hover .world-map-region__shape,
.world-map-region.is-hovered .world-map-region__shape,
.world-map-region:focus-visible .world-map-region__shape {
  fill: #10b981;
  fill-opacity: 0.5;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-opacity: 1;
  stroke-width: 0.4;
  opacity: 1;
}

.world-map-outlines__group.is-hovered .world-map-region__outline,
.world-map-outlines__group.is-active:not(.is-hovered) .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='northamerica']:hover) .world-map-outlines__group[data-region='northamerica'] .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='southamerica']:hover) .world-map-outlines__group[data-region='southamerica'] .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='europe']:hover) .world-map-outlines__group[data-region='europe'] .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='africa']:hover) .world-map-outlines__group[data-region='africa'] .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='asia']:hover) .world-map-outlines__group[data-region='asia'] .world-map-region__outline,
.tracks-world-map__svg:has(.world-map-region[data-region='australia']:hover) .world-map-outlines__group[data-region='australia'] .world-map-region__outline {
  stroke: #ffffff;
  stroke-opacity: 1;
  stroke-width: 1.4;
  filter: url(#world-map-outline-glow);
}

.world-map-outlines__group.is-active:not(.is-hovered) .world-map-region__outline {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1;
  filter: none;
}

.world-map-region.is-active:not(:hover):not(.is-hovered) .world-map-region__shape {
  fill: #34d399;
  fill-opacity: 0.38;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-opacity: 1;
}

.world-map-region:focus-visible {
  outline: none;
}

.tracks-world-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 14px;
  border-top: 1px solid var(--panel-border);
  background: rgba(3, 7, 18, 0.65);
}

.tracks-world-map__legend-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
}

.tracks-world-map__legend-link span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-lap);
}

.tracks-world-map__legend-link:hover,
.tracks-world-map__legend-link.is-hovered,
.tracks-world-map__legend-link.is-active {
  color: var(--text-primary);
  border-color: var(--accent-lap);
  background: rgba(52, 211, 153, 0.08);
}

.tracks-world-map__legend-link.is-hovered {
  background: rgba(52, 211, 153, 0.16);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.25);
}

.tracks-world-map__credit {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tracks-world-map__credit a {
  color: var(--text-muted);
}

.tracks-catalog-search {
  margin-top: 20px;
}

.tracks-catalog-search__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tracks-catalog-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tracks-catalog-search__field:focus-within {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.tracks-catalog-search__icon {
  color: var(--text-muted);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tracks-catalog-search__input {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
}

.tracks-catalog-search__input::placeholder {
  color: var(--text-muted);
}

.tracks-catalog-search__input:focus {
  outline: none;
}

.tracks-catalog-search__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.tracks-catalog-search__clear .material-symbols-outlined {
  font-size: 1.1rem;
}

.tracks-catalog-search__clear:hover {
  background: rgba(148, 163, 184, 0.25);
  color: var(--text-primary);
}

.tracks-catalog-search__meta {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.tracks-region.is-search-empty {
  display: none;
}

.back-to-top {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--accent-lap);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.back-to-top:not([hidden]) {
  display: inline-flex;
}

.back-to-top .material-symbols-outlined {
  font-size: 1.75rem;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.tracks-world-map__tooltip {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -100%);
  padding: 8px 12px;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 10px;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(8px);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.tracks-world-map__tooltip strong {
  display: block;
  font-size: 0.85rem;
}

.tracks-world-map__tooltip span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-lap);
}

.tracks-region__header {
  margin-bottom: 20px;
}

.tracks-region__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.tracks-region__desc {
  margin: 0 0 8px;
  max-width: 62ch;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tracks-region__count {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.track-card-link__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-lap);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.track-card-link--catalog {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
}

.track-card-link--catalog:hover {
  border-color: rgba(52, 211, 153, 0.45);
}

.track-leaderboard-placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0 8px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.track-leaderboard-placeholder__icon {
  font-size: 2rem;
  color: var(--text-muted);
}

.track-leaderboard-placeholder__title {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
}

.track-leaderboard-placeholder__desc {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.track-leaderboard-placeholder__steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.track-leaderboard-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.track-map--catalog.track-map--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  background: #111827;
}

.track-card-link__badge--catalog {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  .track-layout {
    grid-template-columns: 1fr;
  }

  .track-map-panel {
    position: static;
  }

  .tracks-index-pitch__grid {
    grid-template-columns: 1fr;
  }

  .tracks-index-cta__steps {
    grid-template-columns: 1fr;
  }

  .track-submit-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .world-map-region__label {
    font-size: 10px;
  }

  .tracks-world-map__legend {
    gap: 6px;
  }

  .back-to-top {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .lb-row {
    grid-template-columns: 44px 1fr 88px;
    grid-template-areas:
      'pos driver time'
      'pos car gap';
  }

  .lb-row--head { display: none; }

  .lb-row__pos { grid-area: pos; }
  .lb-row__driver { grid-area: driver; }
  .lb-row__car { grid-area: car; }
  .lb-row__time { grid-area: time; text-align: right; }
  .lb-row__gap { grid-area: gap; text-align: right; }

  .podium-stage {
    flex-wrap: wrap;
  }

  .podium-slot {
    max-width: none;
    flex: 1 1 140px;
  }
}
