:root {
  --ink: #111417;
  --muted: #5e6670;
  --paper: #f7f4ee;
  --white: #ffffff;
  --line: #d9d4ca;
  --gold: #ffca28;
  --green: #55a539;
  --blue: #184f7a;
  --coral: #d95b43;
  --shadow: 0 18px 55px rgba(26, 35, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid rgba(17, 20, 23, 0.1);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 6px;
  font-size: 14px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #33383d;
  font-size: 14px;
  font-weight: 700;
}

.nav a {
  padding: 8px 0;
}

.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero-car-road.jpg");
  background-position: center 58%;
  background-size: cover;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(17, 20, 23, 0.62) 0%, rgba(17, 20, 23, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(850px, calc(100% - 36px));
  margin: 0 auto;
  padding: 100px 0 150px;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.55;
}

.search-band {
  position: relative;
  z-index: 5;
  margin-top: -86px;
  padding: 0 clamp(18px, 4vw, 56px) 56px;
}

.page-search {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: 28px;
}

.search-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px);
  background: var(--gold);
  border: 1px solid rgba(17, 20, 23, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-heading .section-kicker {
  color: #6c4b00;
}

.city-chip {
  max-width: 360px;
  padding: 10px 12px;
  color: #18340c;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(17, 20, 23, 0.12);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.widget-frame {
  min-height: 92px;
}

.cities-section,
.faq-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

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

.home-city-search {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-city-search h3 {
  margin-bottom: 0;
}

.home-city-search label {
  display: grid;
  gap: 6px;
}

.home-city-search label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-city-search input {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
}

.home-search-results {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.home-search-results a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
}

.city-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 20, 23, 0.08);
}

.city-photo-link {
  display: block;
  overflow: hidden;
}

.city-card img {
  height: 210px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.city-photo-link:hover img,
.city-photo-link:focus-visible img {
  transform: scale(1.04);
}

.city-body {
  display: grid;
  min-height: 252px;
  padding: 20px;
}

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

.city-title-link {
  color: inherit;
}

.city-title-link:hover,
.city-title-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.city-button {
  align-self: end;
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--green);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.city-button:focus-visible,
.city-photo-link:focus-visible,
.city-title-link:focus-visible,
.nav a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.content-band {
  padding: 64px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: var(--blue);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 70px);
  width: min(1120px, 100%);
  margin: 0 auto;
}

.content-grid .section-kicker {
  color: var(--gold);
}

.tips-list {
  display: grid;
  gap: 14px;
}

.tips-list p {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.tips-list strong {
  color: var(--white);
}

.inline-code {
  display: inline-block;
  padding: 2px 6px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 4px;
  font-weight: 800;
}

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

.city-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.city-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
}

.city-page-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.city-page-image {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--white);
}

.city-page-image img {
  height: 390px;
  object-fit: cover;
}

.image-credit {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.city-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 42px;
}

.fact-box {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fact-box h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.fact-box p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.seo-content {
  margin-bottom: 42px;
  padding: clamp(22px, 4vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.seo-content h2 {
  margin: 26px 0 12px;
  font-size: clamp(24px, 3vw, 34px);
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  margin: 22px 0 10px;
  font-size: 21px;
}

.seo-content p,
.seo-content li {
  color: var(--muted);
  line-height: 1.68;
}

.seo-content ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.seo-content p:last-child,
.seo-content ul:last-child {
  margin-bottom: 0;
}

.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.all-city-links {
  align-items: flex-start;
  max-height: 70vh;
  overflow: auto;
  padding: 4px;
}

.link-section-title {
  margin: 0 0 14px;
  font-size: 28px;
}

.city-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px);
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.city-filter label {
  display: grid;
  gap: 6px;
}

.city-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.city-filter input,
.city-filter select {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
}

.city-links a,
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
}

.back-link {
  margin-top: 8px;
  background: var(--ink);
}

.secondary-link {
  margin-left: 8px;
  background: var(--blue);
}

details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.footer {
  padding: 26px clamp(18px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

.footer p {
  width: min(1120px, 100%);
  margin: 0 auto;
  font-size: 14px;
}

.footer p + p {
  margin-top: 8px;
}

.footer a {
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 900px) {
  .city-grid,
  .faq-grid,
  .city-facts,
  .city-page-hero,
  .home-city-search,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .city-body {
    min-height: 210px;
  }

  .search-heading {
    align-items: start;
    flex-direction: column;
  }

  .city-chip {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  .city-page-image img {
    height: 300px;
  }

  .city-filter {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 80px 0 138px;
  }

  .search-band {
    margin-top: -72px;
  }

  .city-card img {
    height: 190px;
  }
}
