:root {
  --ink: #17202a;
  --muted: #5f6b78;
  --line: #d8dee5;
  --paper: #ffffff;
  --off-white: #f6f8f6;
  --asphalt: #202a31;
  --asphalt-2: #2f3b43;
  --blue: #1f5f8b;
  --blue-dark: #123b59;
  --orange: #f39b2f;
  --green: #1f8b60;
  --red: #c8372d;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.14);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--off-white);
}

body.nav-open {
  overflow: hidden;
}

body.download-modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 48px);
  color: #ffffff;
  background: rgba(23, 32, 42, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  background: #0753ef;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.site-nav a {
  padding: 10px 13px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: 7px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.site-nav .nav-cta {
  color: var(--ink);
  background: var(--orange);
}

.site-nav .nav-cta:hover {
  color: var(--ink);
  background: #ffb957;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: #ffffff;
}

.hero {
  position: relative;
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  padding: clamp(64px, 9vw, 108px) clamp(18px, 4vw, 48px);
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(14, 23, 31, 0.94) 0%, rgba(14, 23, 31, 0.82) 42%, rgba(14, 23, 31, 0.3) 70%), url("../assets/hero-dmv-practice.png");
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 70px, rgba(243, 155, 47, 0.9) 70px 120px, transparent 120px 190px);
  opacity: 0.8;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(2.8rem, 8vw, 6.6rem);
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.02rem, 2vw, 1.28rem);
}

.hero-actions,
.split-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.button.primary {
  color: var(--ink);
  background: var(--orange);
}

.button.primary:hover {
  background: #ffb957;
}

.button.secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.button.secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.button.ghost {
  color: var(--blue-dark);
  border-color: var(--line);
  background: #ffffff;
}

.full-width {
  width: 100%;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin-top: 42px;
}

.hero-metrics div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 1.35rem;
}

.hero-metrics span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
}

.section {
  padding: clamp(56px, 8vw, 92px) clamp(18px, 4vw, 48px);
}

.section-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.intro-band {
  background: #ffffff;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.two-column h2,
.section-heading h2,
.split-cta h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.two-column p,
.split-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 30px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.sign-card,
.score-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.07);
}

.feature-card {
  min-height: 260px;
  padding: 22px;
}

.feature-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 28px;
  color: #ffffff;
  font-weight: 900;
  background: var(--blue);
  border-radius: 8px;
}

.feature-card h3,
.benefit-list h3,
.sign-card h2 {
  font-size: 1.12rem;
}

.feature-card p,
.benefit-list p,
.sign-card p,
.score-box span {
  color: var(--muted);
}

.road-band {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(32, 42, 49, 0.98), rgba(18, 59, 89, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 85px, rgba(255, 255, 255, 0.22) 85px 125px, transparent 125px 210px);
}

.road-band .eyebrow,
.road-band p {
  color: rgba(255, 255, 255, 0.78);
}

.split-cta {
  justify-content: space-between;
  gap: 30px;
}

.split-cta > div {
  max-width: 720px;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.benefit-list > div {
  min-height: 170px;
  padding: 26px;
  background: #ffffff;
}

.page-hero {
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(23, 32, 42, 0.96), rgba(31, 95, 139, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 72px);
}

.page-hero.compact,
.page-hero.legal {
  padding: clamp(56px, 8vw, 92px) clamp(18px, 4vw, 48px);
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5.2rem);
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
}

.practice-section {
  background: var(--off-white);
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.quiz-panel {
  min-height: 560px;
  padding: clamp(18px, 3vw, 30px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quiz-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.pill {
  display: inline-flex;
  max-width: 72%;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 900;
  background: #e8f1f7;
  border-radius: 999px;
}

.quiz-count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.progress-track {
  height: 9px;
  margin: 20px 0 28px;
  overflow: hidden;
  background: #e8ecef;
  border-radius: 99px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--orange));
  transition: width 220ms ease;
}

.question-title {
  margin-bottom: 24px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.option-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.option-button {
  width: 100%;
  min-height: 60px;
  padding: 16px 18px;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.option-button:hover {
  border-color: var(--blue);
  background: #f4f9fc;
}

.option-button.correct {
  color: #0f5138;
  border-color: rgba(31, 139, 96, 0.45);
  background: #e8f7ef;
}

.option-button.incorrect {
  color: #842029;
  border-color: rgba(200, 55, 45, 0.45);
  background: #fbe9e7;
}

.option-button:disabled {
  cursor: default;
}

.quiz-feedback {
  min-height: 48px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}

.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.loading-state,
.empty-state,
.download-gate {
  display: grid;
  min-height: 370px;
  place-items: center;
  text-align: center;
}

.loading-state p,
.empty-state p,
.download-gate p {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
}

.loader {
  width: 44px;
  height: 44px;
  border: 4px solid #dce4ea;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.practice-aside {
  display: grid;
  gap: 16px;
}

.score-box {
  padding: 22px;
}

.score-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.score-box strong {
  display: block;
  font-size: 2.2rem;
}

.sign-card {
  padding: 22px;
}

.sign-shape {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  background: var(--red);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.sign-card p {
  margin-bottom: 20px;
}

.legal-section {
  background: #ffffff;
}

.legal-document {
  max-width: 880px;
  margin: 0 auto;
  color: #27323a;
}

.legal-document h2 {
  margin-top: 34px;
  font-size: 1.45rem;
}

.legal-document p,
.legal-document li {
  color: #43505c;
}

.legal-document a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 34px clamp(18px, 4vw, 48px);
  color: rgba(255, 255, 255, 0.82);
  background: var(--asphalt);
}

.site-footer p {
  margin: 2px 0 0;
}

.site-footer strong {
  color: #ffffff;
}

.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer a {
  font-weight: 800;
}

.fine-print {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(10, 17, 23, 0.72);
  backdrop-filter: blur(10px);
}

.download-modal.open {
  display: grid;
}

.download-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  width: min(100%, 640px);
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  background: #f1f4f6;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
  background: #ffffff;
}

.qr-frame {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.qr-frame img {
  width: 180px;
  height: 180px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-badge img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.18);
}

.download-dialog h2 {
  margin: 14px 34px 10px 0;
  font-size: 1.7rem;
}

.download-dialog p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    background-image: linear-gradient(90deg, rgba(14, 23, 31, 0.94), rgba(14, 23, 31, 0.76)), url("../assets/hero-dmv-practice.png");
  }

  .feature-grid,
  .benefit-list,
  .practice-layout {
    grid-template-columns: 1fr 1fr;
  }

  .practice-aside {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 66px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 18px 22px;
    background: rgba(23, 32, 42, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

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

  .site-nav a {
    padding: 14px;
  }

  .hero {
    padding-top: 72px;
    padding-bottom: 76px;
    background-position: 58% center;
  }

  .hero-metrics,
  .feature-grid,
  .benefit-list,
  .practice-layout,
  .practice-aside,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .quiz-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pill {
    max-width: 100%;
  }

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

  .site-footer {
    align-items: start;
  }

  .download-dialog {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
