:root {
  color-scheme: dark;
  --bg: #080808;
  --bg-soft: #0e0e0d;
  --surface: #151514;
  --surface-2: #1e1c1a;
  --ink: #fff8e7;
  --muted: #c9c0ac;
  --muted-2: #8e8779;
  --line: rgba(255, 248, 231, 0.14);
  --line-strong: rgba(255, 210, 31, 0.32);
  --accent: #ffd21f;
  --accent-dark: #b88700;
  --danger: #e3262e;
  --success: #30d77a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  --radius: 8px;
  --container: 1180px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

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

body.is-locked {
  overflow: hidden;
}

img,
svg,
iframe {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 14px;
  background: var(--accent);
  color: #111;
  border-radius: var(--radius);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(8, 8, 8, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(8, 8, 8, 0.97);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.header-shell {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe76a 0 22%, var(--accent) 23% 52%, #151515 53% 100%);
  color: #111;
  font-weight: 950;
  box-shadow: inset 0 0 0 4px #111, 0 0 0 1px var(--line-strong);
}

.brand__text {
  display: grid;
  gap: 0;
  line-height: 1.1;
}

.brand__text strong {
  font-size: 1rem;
}

.brand__text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 248, 231, 0.04);
}

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
  background: rgba(255, 248, 231, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-border: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 850;
  line-height: 1;
  text-align: center;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease, border-color 170ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: #101010;
  --btn-border: var(--accent);
}

.btn--secondary {
  --btn-bg: var(--danger);
  --btn-fg: #fff;
  --btn-border: var(--danger);
}

.btn--ghost {
  --btn-bg: rgba(255, 248, 231, 0.06);
  --btn-border: rgba(255, 248, 231, 0.2);
}

.btn--call {
  --btn-bg: var(--accent);
  --btn-fg: #111;
  --btn-border: var(--accent);
  min-width: 132px;
}

.btn--small {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
}

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

.btn__icon {
  font-size: 1rem;
}

.section {
  padding: 92px 0;
}

.section--tight {
  padding: 34px 0 0;
}

.section--panel {
  background:
    linear-gradient(180deg, rgba(255, 210, 31, 0.05), rgba(227, 38, 46, 0.03)),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading h2,
.split-heading h2,
.content-block h2,
.quick-cta h2,
.contact-panel h2,
.info-card h2 {
  margin: 0;
  line-height: 1.02;
  font-size: clamp(2rem, 5vw, 4.2rem);
}

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

.split-heading > div {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.text-link,
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 850;
  background: transparent;
  border: 0;
  padding: 0;
}

.text-link::after,
.text-button::after {
  content: "->";
  transition: transform 160ms ease;
}

.text-link:hover::after,
.text-button:hover::after {
  transform: translateX(4px);
}

.hero {
  position: relative;
  min-height: calc(82vh - var(--header-h));
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  z-index: -3;
  object-fit: cover;
  transform: scale(1.03);
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.68) 48%, rgba(0, 0, 0, 0.22)),
    linear-gradient(0deg, rgba(8, 8, 8, 0.72), rgba(8, 8, 8, 0.04) 34%);
}

.hero__content {
  padding: 72px 0;
  max-width: var(--container);
}

.hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 7.6rem);
  line-height: 0.9;
  font-weight: 950;
}

.hero__lead {
  max-width: 630px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
}

.hero__actions,
.button-row,
.quick-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__actions {
  margin-top: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero__meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trust-strip div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong {
  display: block;
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.trust-strip span {
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-grid,
.service-grid,
.tire-grid {
  display: grid;
  gap: 18px;
}

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

.feature-card,
.service-card,
.tire-card,
.contact-panel,
.info-card,
.modal__panel,
.map-card,
.review,
.no-results {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.feature-card,
.service-card,
.contact-panel,
.info-card,
.no-results {
  padding: 24px;
}

.feature-card {
  min-height: 246px;
}

.feature-card img,
.service-card img {
  width: 44px;
  height: 44px;
}

.feature-card h3,
.service-card h3,
.tire-card h3,
.review p {
  margin: 18px 0 8px;
}

.feature-card p,
.service-card p,
.content-block p,
.contact-panel p,
.info-card p,
.modal__copy {
  color: var(--muted);
}

.service-grid--compact {
  grid-template-columns: repeat(3, 1fr);
}

.service-grid--full {
  grid-template-columns: repeat(2, 1fr);
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  transition: transform 170ms ease, border-color 170ms ease;
}

.service-card:hover,
.feature-card:hover,
.tire-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.service-card__top,
.service-card__bottom,
.tire-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.service-card__top span,
.tire-card figure figcaption {
  color: #101010;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.service-card strong,
.tire-card strong {
  color: var(--accent);
  font-size: 1.12rem;
}

.service-card--large p {
  flex: 1;
}

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

.tire-card {
  overflow: hidden;
  transition: transform 170ms ease, border-color 170ms ease;
}

.tire-card[hidden] {
  display: none;
}

.tire-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1.35 / 1;
  background: #111;
  overflow: hidden;
}

.tire-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.tire-card:hover figure img {
  transform: scale(1.05);
}

.tire-card figure figcaption {
  position: absolute;
  left: 14px;
  top: 14px;
}

.tire-card__body {
  padding: 18px;
}

.tire-card__body > p {
  margin: 0;
  color: var(--muted-2);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.tire-card h3 {
  font-size: 1.08rem;
  line-height: 1.2;
}

.tire-card__meta {
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.spec-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.spec-list li {
  display: flex;
  gap: 8px;
}

.spec-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 42px;
  align-items: center;
}

.split-layout--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.media-block,
.map-card {
  overflow: hidden;
}

.media-block img,
.map-card iframe {
  width: 100%;
  min-height: 440px;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.content-block h2 {
  margin-bottom: 18px;
}

.review-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.review {
  padding: 20px;
}

.stars {
  color: var(--accent);
}

.review span {
  color: var(--muted-2);
  font-weight: 850;
}

.hours-list,
.footer-links,
.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hours-list {
  margin: 24px 0;
}

.hours-list li,
.footer-links li,
.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.hours-list strong,
.footer-links strong,
.contact-list strong,
.contact-list a {
  color: var(--ink);
}

.page-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.28)),
    var(--page-hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.page-hero--tires {
  --page-hero-image: url("../img/hero/tire-inventory-wall.jpg");
}

.page-hero--services {
  --page-hero-image: url("../img/hero/tire-service-tools.jpg");
}

.page-hero--contact {
  --page-hero-image: url("../img/hero/houston-tire-shop-contact.jpg");
}

.page-hero__content {
  position: relative;
  z-index: 1;
  padding: 70px 0;
  max-width: var(--container);
}

.page-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.95;
}

.page-hero p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.12rem;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.catalog-toolbar h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

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

.filters label,
.form label {
  display: grid;
  gap: 8px;
}

.filters span,
.form span {
  color: var(--muted);
  font-weight: 850;
  font-size: 0.86rem;
}

.filters select,
.form input,
.form textarea,
.form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 231, 0.05);
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.filters select {
  color: var(--ink);
}

.filters option,
.form option {
  background: #111;
  color: var(--ink);
}

.form textarea {
  resize: vertical;
}

.filters select:focus,
.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 210, 31, 0.15);
}

.btn--filter-reset {
  align-self: end;
}

.no-results {
  margin-top: 24px;
  text-align: center;
}

.step-list {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 231, 0.04);
}

.step-list span {
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.contact-sidebar {
  display: grid;
  gap: 18px;
}

.contact-panel h2,
.info-card h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 18px;
}

.stack {
  display: grid;
  gap: 16px;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.alert {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: var(--radius);
}

.alert--success {
  border: 1px solid rgba(48, 215, 122, 0.42);
  background: rgba(48, 215, 122, 0.1);
}

.alert--error {
  border: 1px solid rgba(227, 38, 46, 0.48);
  background: rgba(227, 38, 46, 0.12);
}

.alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.map-card--small iframe {
  min-height: 280px;
}

.quick-cta {
  padding: 54px 0;
  background:
    linear-gradient(90deg, rgba(255, 210, 31, 0.18), rgba(227, 38, 46, 0.14)),
    #111;
  border-block: 1px solid var(--line);
}

.quick-cta__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.quick-cta h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.site-footer {
  padding: 62px 0 24px;
  background: #080808;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.9fr 0.95fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 360px;
  color: var(--muted);
}

.footer-title {
  margin: 0 0 16px;
  font-size: 1rem;
}

.footer-links li {
  display: grid;
  justify-content: stretch;
  gap: 2px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.9rem;
}

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

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

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 26px;
  background: #12110f;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 231, 0.06);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}

.modal h2 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.7rem);
  line-height: 1;
}

@media (max-width: 1020px) {
  .header-call {
    display: none;
  }

  .feature-grid,
  .service-grid--compact,
  .tire-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-toolbar,
  .split-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(14, 14, 13, 0.98);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    border-radius: var(--radius);
    padding: 14px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .brand__text small {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero__content {
    padding: 78px 0 86px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .section {
    padding: 68px 0;
  }

  .section--tight {
    padding-top: 22px;
  }

  .trust-strip,
  .feature-grid,
  .service-grid--compact,
  .service-grid--full,
  .tire-grid,
  .footer-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

  .split-heading,
  .quick-cta__grid,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row,
  .hero__actions,
  .quick-cta__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .btn,
  .hero__actions .btn,
  .quick-cta__actions .btn {
    width: 100%;
  }

  .page-hero {
    min-height: 370px;
  }

  .media-block img,
  .map-card iframe {
    min-height: 300px;
  }
}

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