:root {
  --bg: #f4f8ee;
  --bg-deep: #e8f0df;
  --ink: #101914;
  --muted: #43544b;
  --soft: #25342d;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --line: rgba(20, 36, 28, 0.14);
  --line-strong: rgba(117, 168, 0, 0.5);
  --green: #c5ff00;
  --blue: #1778a8;
  --gold: #bb7a14;
  --red: #ff6b6b;
  --shadow: 0 24px 70px rgba(24, 45, 30, 0.16);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(244, 248, 238, 0.78), rgba(244, 248, 238, 0.96)),
    url("/assets/race-hero-06.jpg") center / cover fixed,
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 8px clamp(14px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #2b3b07;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
}

.main-nav a {
  color: #506055;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav a:hover {
  color: #203000;
}

.header-cta,
.button,
.start-card button,
.challenge-card button,
.guide-card button,
.plan-card button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--green);
  color: #071018;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.45fr);
  align-items: end;
  gap: 28px;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.04)),
    url("/assets/landing-ui-workspace.png") right center / min(650px, 58vw) auto no-repeat,
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #587600;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(50px, 8vw, 98px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-panel {
  display: grid;
  gap: 10px;
}

.hero-panel div,
.quick-search,
.start-card,
.challenge-card,
.guide-card,
.faq-list details,
.plan-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-panel div {
  padding: 18px;
}

.hero-panel strong {
  display: block;
  color: #587600;
  font-size: 32px;
  line-height: 1;
}

.hero-panel span {
  display: block;
  margin-top: 6px;
  color: var(--soft);
  font-weight: 700;
}

.race-rail {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 12px;
  margin-top: 20px;
}

.race-shot {
  position: relative;
  min-height: 245px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
}

.race-shot:first-child {
  min-height: 320px;
}

.race-shot img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.9;
  transform: scale(1.01);
  filter: saturate(1.25) brightness(1.2);
  transition: opacity 600ms ease, transform 1600ms ease, filter 600ms ease;
}

.race-shot.active {
  border-color: var(--line-strong);
}

.race-shot.active img {
  opacity: 0.96;
  transform: scale(1.06);
  filter: saturate(1.34) brightness(1.28);
}

.race-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 12, 0), rgba(3, 7, 12, 0.56));
}

.race-shot figcaption {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 16px;
}

.race-shot span {
  display: block;
  margin-bottom: 6px;
  color: #d7ff3d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.race-shot strong {
  display: block;
  max-width: 520px;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.12;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: end;
  margin-top: 20px;
  padding: 24px;
}

.search-control {
  display: grid;
  gap: 8px;
}

.search-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-control input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
}

.section-block {
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.section-block.contrast {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.2)),
    url("/assets/betman-race-mobile-workflow-01.jpg") center / cover;
}

.section-block.compact {
  box-shadow: none;
}

.section-title {
  max-width: 760px;
  margin-bottom: 20px;
}

.start-grid,
.challenge-grid,
.guide-grid,
.plan-grid {
  display: grid;
  gap: 12px;
}

.start-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.challenge-grid {
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

.guide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.start-card,
.challenge-card,
.guide-card,
.plan-card {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.start-card .step {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--green);
  color: #071018;
  font-weight: 900;
}

.start-card button,
.guide-card button,
.challenge-card button,
.plan-card button {
  margin-top: auto;
  width: fit-content;
}

.challenge-card.featured {
  border-color: var(--line-strong);
  background: rgba(197, 255, 0, 0.08);
}

.challenge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.challenge-head strong {
  color: #587600;
}

label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.guide-card span,
.plan-card span {
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #587600;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.guide-card.is-hidden {
  display: none;
}

.empty-state {
  display: none;
  margin: 14px 0 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--soft);
}

.empty-state.is-visible {
  display: block;
}

.support-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.84)),
    url("/assets/betman-race-trackside-ops-02.jpg") center / cover;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.support-grid article {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.support-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(1.25) brightness(1.18);
  border-bottom: 1px solid var(--line);
}

.support-grid h3,
.support-grid p {
  padding: 0 16px;
}

.support-grid h3 {
  margin-top: 16px;
}

.support-grid p {
  margin-bottom: 18px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  overflow: hidden;
}

.faq-list summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 0;
  padding: 0 16px 16px;
}

.conversion-band {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 24px;
  align-items: start;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.38)),
    url("/assets/betman-race-finish-crowd-01.jpg") center / cover;
  box-shadow: var(--shadow);
}

.plan-card {
  min-height: 230px;
  background: rgba(255, 255, 255, 0.92);
}

.plan-card.recommended {
  border-color: var(--green);
}

.plan-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.plan-card .button {
  margin-top: auto;
  width: fit-content;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 25, 20, 0.45);
}

.modal-card {
  position: relative;
  width: min(820px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.modal-body {
  display: grid;
  gap: 16px;
  color: var(--soft);
}

.modal-body p,
.modal-body li {
  color: var(--soft);
  line-height: 1.55;
}

.modal-body ul,
.modal-body ol {
  margin: 0;
  padding-left: 22px;
}

.modal-body .callout {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(197, 255, 0, 0.08);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .quick-search,
  .conversion-band {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .start-grid,
  .guide-grid,
  .plan-grid,
  .challenge-grid,
  .support-grid,
  .race-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .race-shot:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }

  .site-header {
    gap: 10px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand span {
    font-size: 13px;
  }

  .header-cta {
    width: 100%;
  }

  .hero {
    min-height: 650px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.38)),
      url("/assets/landing-ui-workspace.png") center bottom / 520px auto no-repeat,
      rgba(255, 255, 255, 0.84);
  }

  .start-grid,
  .guide-grid,
  .plan-grid,
  .challenge-grid,
  .support-grid,
  .race-rail {
    grid-template-columns: 1fr;
  }

  .race-shot:first-child {
    grid-column: auto;
  }

  .hero-actions,
  .modal-actions {
    flex-direction: column;
  }

  .button,
  .hero-actions .button {
    width: 100%;
  }
}
