/* ============================================================
   California DMV — Calm Prototype
   Static HTML/CSS only. Inter + Material Icons.

   DESIGN DECISIONS (tldr)
   -----------------------
   • 16pt body = 21.333px → --font-body. Headings scale up from there.
   • 14pt buttons = 18.667px → physically large via generous padding.
   • Navigation blue matched to the supplied DMV logo background:
       --blue-900 #187EC7   (nav background, sampled from logo)
       --blue-700 #2B4FA0   (primary buttons, links)
       --blue-600 #3B62B5   (hover)
       --blue-100 #E8ECF4   (filled icon backgrounds)
   • Light-blue surfaces replaced with calm greys:
       --surface     #FFFFFF (cards)
       --bg          #F7F8FA (page)
       --surface-2   #F2F4F7 (subtle fills)
       --border      #E3E5EA (soft hairline)
   • Section gap: 96px. Card gap: 24px. Generous padding inside cards.
   • One outline style: 1px solid --border. No competing card outlines.
   ============================================================ */

:root {
  /* type — 16pt = 21.333px is the body */
  --font-body-px: 21.333px;   /* 16pt */
  --font-btn-px:  18.667px;   /* 14pt */
  --font-sm:      16px;       /* small/captions */
  --font-xs:      14px;

  /* type — display */
  --font-display-xl: clamp(40px, 4.2vw, 56px);
  --font-display-lg: 32px;
  --font-display-md: 24px;
  --font-display-sm: 20px;

  /* color */
  --blue-900: #187EC7;
  --blue-800: #1C72B3;
  --blue-700: #2B4FA0;
  --blue-600: #3B62B5;
  --blue-100: #E8ECF4;
  --blue-gradient: rgba(24, 126, 199, 0.18);

  --bg:        #F7F8FA;
  --surface:   #FFFFFF;
  --surface-2: #F2F4F7;
  --border:    #E3E5EA;
  --border-strong: #D5D8DE;

  --text:        #1A1F2B;
  --text-muted:  #5A6271;
  --text-faint:  #8B92A1;

  --warn-bg:    #FFF6D9;
  --warn-bd:    #F1E3A1;
  --warn-fill:  #E8B109;
  --warn-text:  #6B5300;

  /* radius / shadow */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --shadow-card: 0 1px 0 rgba(20, 30, 60, 0.03);
  --shadow-card-hover: 0 14px 30px rgba(20, 30, 60, 0.10);
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* spacing */
  --section-gap: 96px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: var(--font-body-px);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 900px 620px at -8% 4%,
      var(--blue-gradient) 0%,
      rgba(24, 126, 199, 0.10) 36%,
      rgba(24, 126, 199, 0.04) 58%,
      transparent 78%
    ),
    linear-gradient(
      90deg,
      rgba(24, 126, 199, 0.08) 0%,
      rgba(24, 126, 199, 0.035) 28%,
      transparent 62%
    );
}

img, svg { display: block; max-width: 100%; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-600); text-decoration: underline; }

h1, h2, h3, h4 { font-family: "Inter", sans-serif; color: var(--text); margin: 0; letter-spacing: -0.01em; }
h1 { font-weight: 700; }
h2, h3, h4 { font-weight: 600; }

ul { padding: 0; margin: 0; list-style: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue-700);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--r-md) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.material-icons-outlined {
  font-family: "Material Icons Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
.top-nav {
  background: var(--blue-900);
  color: #fff;
}
.top-nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand__logo {
  width: 286px;
  height: auto;
  display: block;
}

.top-nav__links {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.top-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: var(--font-btn-px);
  font-weight: 500;
  padding: 14px 22px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  transition:
    background-color 160ms var(--motion-ease),
    border-color 160ms var(--motion-ease),
    transform 160ms var(--motion-ease);
}
.top-nav__link:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.35);
  text-decoration: none;
  color: #fff;
}
.top-nav__link .material-icons-outlined { font-size: 20px; }

.top-nav__search-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-nav__search-btn:hover { background: rgba(255,255,255,0.10); }
.top-nav__search-btn .material-icons-outlined { font-size: 20px; }

/* ============================================================
   HERO
   ============================================================ */
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero {
  padding-top: 72px;
}
.hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 72px;
  align-items: start;
}
.hero__left { padding-top: 16px; }
.hero__title {
  font-size: var(--font-display-xl);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text);
}
.hero__lede {
  font-size: var(--font-body-px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 0 40px;
}

.hero__search-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}
.hero__search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: stretch;
}
.hero__search-input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 18px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.hero__search-input:focus-within {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 4px rgba(43, 79, 160, 0.12);
}
.hero__search-input .material-icons-outlined {
  color: var(--text-faint);
  font-size: 22px;
  margin-right: 12px;
}
.hero__search-input input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 18px 0;
  font-size: var(--font-body-px);
  color: var(--text);
}
.hero__search-input input::placeholder { color: var(--text-faint); }

.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin: 18px 0 0;
}
.hero__hint .material-icons-outlined {
  color: var(--blue-700);
  font-size: 18px;
}

/* ============================================================
   TASK LIST (right panel)
   ============================================================ */
.task-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.task-list__head { margin-bottom: 20px; }
.task-list__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.task-list__sub {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin: 0;
}
.task-list__items {
  display: flex;
  flex-direction: column;
}
.task-list__items li + li {
  border-top: 1px solid var(--border);
}

.task-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition:
    background-color 160ms var(--motion-ease),
    color 160ms var(--motion-ease),
    transform 160ms var(--motion-ease);
}
.task-link:hover {
  background: var(--surface-2);
  color: var(--blue-700);
  text-decoration: none;
}
.task-link__icon {
  color: var(--blue-700);
  font-size: 22px;
}
.task-link__chev {
  color: var(--text-faint);
  font-size: 22px;
}
.task-link:hover .task-link__chev { color: var(--blue-700); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-top: var(--section-gap);
}
.section__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
}
.section__head { margin-bottom: 36px; }
.section__title {
  font-size: var(--font-display-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.section__sub {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin: 0;
}

.mt-xl { margin-top: 40px; }

/* grid utilities */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--gap-md { gap: 20px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition:
    transform 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease),
    border-color 180ms var(--motion-ease);
}

.card--feature { gap: 16px; }
.card--compact { gap: 12px; padding: 24px; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: var(--blue-100);
  color: var(--blue-700);
  border-radius: var(--r-md);
  font-size: 26px !important;
  transition:
    transform 180ms var(--motion-ease),
    background-color 180ms var(--motion-ease);
}
.card__icon--alert {
  background: var(--warn-bg);
  color: var(--warn-fill);
}

.card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}
.card__title-sm {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
.card__body {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.card__body-sm {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.card__listlabel {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 0;
}
.card__link {
  font-size: var(--font-sm);
  text-decoration: underline;
  color: var(--blue-700);
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--text-muted);
}
.checklist li .material-icons-outlined {
  color: var(--blue-700);
  font-size: 20px;
}

/* alert/warn card */
.card--alert {
  background: var(--warn-bg);
  border-color: var(--warn-bd);
  gap: 16px;
}
.card--alert .card__title { color: var(--warn-text); }
.card--alert .card__body { color: #6E5500; }

/* compact card buttons / push to bottom */
.card--feature .btn,
.card--compact .btn,
.card--alert .btn { margin-top: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: var(--font-btn-px);  /* 14pt */
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition:
    background-color 160ms var(--motion-ease),
    border-color 160ms var(--motion-ease),
    color 160ms var(--motion-ease),
    transform 160ms var(--motion-ease),
    box-shadow 160ms var(--motion-ease);
  white-space: nowrap;
}

.btn--md {
  padding: 14px 22px;
  min-height: 48px;
}
.btn--lg {
  padding: 18px 28px;
  min-height: 56px;
}

.btn--primary {
  background: var(--blue-700);
  color: #fff;
}
.btn--primary:hover { background: var(--blue-600); color: #fff; text-decoration: none; }

.btn--ghost {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--blue-700);
  color: var(--blue-700);
  text-decoration: none;
}

.btn--warning {
  background: var(--warn-fill);
  color: #1A1500;
}
.btn--warning:hover { background: #D6A107; color: #1A1500; text-decoration: none; }

.btn--block { width: 100%; }
.btn .material-icons-outlined { font-size: 20px; }

/* ============================================================
   FULL-WIDTH BANNER (sold a vehicle)
   ============================================================ */
.banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  transition:
    transform 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease),
    border-color 180ms var(--motion-ease);
}
.banner__icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 24px !important;
}
.banner__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}
.banner__body {
  margin: 0;
  font-size: 16px;
  color: var(--text-muted);
}

/* ============================================================
   AUDIENCES (services for different drivers)
   ============================================================ */
.audiences {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 64px;
  row-gap: 28px;
}
.audience {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition:
    color 160ms var(--motion-ease),
    transform 160ms var(--motion-ease),
    border-color 160ms var(--motion-ease);
}
.audience:hover { text-decoration: none; }
.audience:hover .audience__label { color: var(--blue-600); }
.audience__icon {
  color: var(--blue-700);
  font-size: 26px !important;
  margin-top: 2px;
}
.audience__label {
  display: block;
  color: var(--blue-700);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.audience__desc {
  display: block;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: var(--section-gap);
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 64px 64px;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin-bottom: 32px;
}
.footer__links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.footer__links a:hover { color: var(--blue-700); }

.footer__bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer__social {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.footer__social a {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--blue-700);
  transition:
    background-color 160ms var(--motion-ease),
    border-color 160ms var(--motion-ease),
    transform 160ms var(--motion-ease);
}
.footer__social a:hover {
  background: var(--blue-100);
  text-decoration: none;
}
.footer__social .material-icons-outlined { font-size: 20px; }

.footer__lang select {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 12px 36px 12px 16px;
  font-size: 15px;
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6271' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* ============================================================
   MOTION POLISH
   Subtle movement only; no layout shifts and no motion for users
   who request reduced motion.
   ============================================================ */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .top-nav__link:hover,
  .top-nav__search-btn:hover,
  .btn:hover,
  .footer__social a:hover {
    transform: translateY(-2px);
  }

  .task-link:hover,
  .audience:hover {
    transform: translateX(4px);
  }

  .card:hover,
  .card:focus-within,
  .banner:hover,
  .banner:focus-within {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card-hover);
  }

  .card:hover .card__icon,
  .card:focus-within .card__icon {
    transform: translateY(-2px);
  }

  .btn--primary:hover {
    box-shadow: 0 10px 22px rgba(43, 79, 160, 0.22);
  }

  .btn--warning:hover {
    box-shadow: 0 10px 22px rgba(232, 177, 9, 0.24);
  }

  .btn--ghost:hover {
    box-shadow: 0 8px 18px rgba(20, 30, 60, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================================================
   RESPONSIVE (mobile-down)
   ============================================================ */
@media (max-width: 1180px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .task-list { max-width: 560px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

@media (max-width: 860px) {
  :root { --section-gap: 64px; }
  .top-nav__inner { padding: 14px 20px; gap: 16px; grid-template-columns: auto 1fr; }
  .top-nav__links { display: none; }
  .hero__inner,
  .section__inner,
  .footer__inner { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 40px; }
  .hero__title { font-size: clamp(32px, 8vw, 40px); }

  .grid--3,
  .grid--4,
  .audiences { grid-template-columns: 1fr; }
  .grid--3 .card,
  .grid--4 .card { padding: 24px; }

  .hero__search-row { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; }

  .banner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .banner__cta { width: 100%; }

  .footer__bottom { grid-template-columns: 1fr; }
  .footer__social { justify-content: flex-start; }
}

/* focus visibility (accessibility) */
:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}
.task-link:focus-visible,
.audience:focus-visible {
  outline-offset: 4px;
}
