/* J&D Tires — site styles. Mobile-first.
   Colors come from the client's brand theme (sampled from the J&D logo):
   blue #34529A · orange #E8641F · black #0E0E0C · white #FDFDFB */
:root {
  --blue: #34529A;
  --blue-dark: #263d75;
  --orange: #E8641F;       /* logo orange: decoration, and text on dark backgrounds */
  --orange-deep: #C9500F;  /* buttons & text on light backgrounds (passes contrast with white) */
  --orange-deeper: #B2450C;
  --black: #0E0E0C;
  --white: #FDFDFB;

  --bg: #F3F5FA;           /* background.default */
  --surface: #FFFFFF;
  --surface-2: #E9EDF6;    /* table-head tone */
  --line: #D6DCEA;
  --text: #1A1C22;         /* text.primary */
  --muted: #566074;
  --good: #1E8E4E;
  --bad: #B3261E;
  --radius: 8px;           /* shape.borderRadius */
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* room for mobile book bar */
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.eyebrow { color: var(--orange-deep); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.section h2 { font-size: clamp(30px, 6vw, 46px); margin-bottom: 12px; color: var(--blue); }
.lede { color: var(--muted); max-width: 56ch; font-size: 17px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--orange-deep); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 2px solid transparent;
  font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange-deep); color: #fff; }
.btn--primary:hover { background: var(--orange-deeper); }
.btn--ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--ghost:hover { background: var(--blue); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; padding: 0 30px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* Header (AppBar: brand blue) */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,0.15), 0 4px 16px rgba(14,14,12,0.18); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.logo { font-family: var(--display); font-size: 26px; text-transform: uppercase; text-decoration: none; letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; color: #fff; }
.logo img { width: 76px; height: 76px; display: block; }
.nav { display: none; gap: 6px; }
.nav a { text-decoration: none; color: rgba(255,255,255,0.82); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--radius); }
.nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
/* selected state, as in the theme's ListItemButton: blue tint + orange left border */
.nav a[aria-current='page'] { color: #fff; background: rgba(255,255,255,0.14); box-shadow: inset 4px 0 0 var(--orange); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { display: none; text-decoration: none; font-weight: 700; color: #fff; }
.header-cta .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }

/* Hero (brand black → deep blue) */
.hero { position: relative; overflow: hidden; color: #fff; padding: 56px 0 64px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(232,100,31,0.28), transparent 60%),
  linear-gradient(160deg, var(--black) 0%, #16224a 70%, #1d2f66 100%); }
.hero::after { content: ''; position: absolute; inset: auto -10% -40px -10%; height: 90px; opacity: 0.4;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0.09) 0 14px, transparent 14px 28px);
  transform: skewY(-2deg); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 12px; }
.hero .eyebrow { color: var(--orange); }
.hero h1 { font-size: clamp(44px, 11vw, 92px); letter-spacing: 0.005em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lede { margin-top: 18px; font-size: 18px; color: rgba(255,255,255,0.78); }
.hero .btn--ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.hero .btn--ghost:hover { background: #fff; color: var(--blue); border-color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 600; list-style: none; padding: 0; }
.hero-badges li::before { content: '✓'; color: #5BE08F; margin-right: 7px; font-weight: 800; }

/* 3D car stage */
.car-stage { position: relative; width: 100%; height: 340px; touch-action: pan-y; }
.car-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.car-fallback { position: absolute; inset: 0; margin: auto; width: min(420px, 90%); height: auto; }
.car-stage.is-live .car-fallback { display: none; }

/* Booking pins: hidden until the 3D scene is live */
.pin, .pin-dot, .pin-lines { display: none; }
.car-stage.is-live .pin { display: inline-flex; }
.car-stage.is-live .pin-dot, .car-stage.is-live .pin-lines { display: block; }
.pin-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.pin-lines line { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3; transition: opacity 150ms ease; }
.pin-dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); z-index: 3; pointer-events: none; transition: opacity 150ms ease; box-shadow: 0 0 0 3px rgba(14,14,12,0.6); }
.pin-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--orange); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
.pin {
  position: absolute; z-index: 4; align-items: center; gap: 8px; padding: 10px 16px;
  background: #fff; border: 2px solid var(--orange); border-radius: var(--radius);
  color: var(--blue); font-weight: 700; font-size: 14px; line-height: 1.1; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); transition: background-color 120ms ease, color 120ms ease;
}
.pin:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: #fff; }
.pin--oil { top: 2%; right: 0; }
.pin--tire { bottom: 2%; right: 0; }
@media (prefers-reduced-motion: reduce) { .pin-dot::after { animation: none; } }

/* Quick-book strip (overlaps hero) */
.quick-wrap { position: relative; z-index: 5; margin-top: -36px; }
.quick { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 50px rgba(26,28,34,0.18); display: grid; gap: 4px; }
.quick h2 { font-size: 28px; color: var(--blue); }
.quick p.sub { color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.quick .field { margin-bottom: 12px; }
.quick .btn { width: 100%; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 600; font-size: 14px; color: var(--text); padding: 0; }
.field .hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid #B9C2D8; background: #fff; color: var(--text); font: inherit;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(52,82,154,0.25); }
.field input[aria-invalid='true'], .field select[aria-invalid='true'] { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.row { display: grid; gap: 0 14px; }
fieldset.field { border: 0; margin: 0 0 16px; padding: 0; min-inline-size: 0; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 58px; padding: 6px; border: 1.5px solid #B9C2D8; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; background: #fff; }
.slot span small { color: var(--muted); font-weight: 500; font-size: 12px; }
.slot input:checked + span { border-color: var(--blue); background: rgba(52,82,154,0.12); color: var(--blue); box-shadow: inset 4px 0 0 var(--orange); }
.slot input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.alert { background: #FDECEA; border: 1px solid var(--bad); color: #7A1913; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cards & grids */
.grid { display: grid; gap: 16px; margin-top: 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(26,28,34,0.05); }
.card h3 { font-size: 24px; margin-bottom: 8px; color: var(--blue); }
.card p { color: var(--muted); }
.card .icon { width: 44px; height: 44px; border-radius: var(--radius); background: rgba(52,82,154,0.12); color: var(--blue); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; }
.card .more { display: inline-block; margin-top: 14px; color: var(--orange-deep); font-weight: 700; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

.split { display: grid; gap: 16px; margin-top: 32px; }
.panel { border-radius: var(--radius); padding: 32px 26px; position: relative; overflow: hidden; color: #fff; }
.panel--new { background: var(--blue); border-bottom: 5px solid var(--orange); }
.panel--used { background: var(--black); border-bottom: 5px solid var(--orange); }
.panel h3 { font-size: 34px; margin-bottom: 10px; color: #fff; }
.panel p { color: rgba(255,255,255,0.8); margin-bottom: 18px; max-width: 42ch; }
.panel ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; font-weight: 600; }
.panel li::before { content: '→'; color: var(--orange); margin-right: 10px; }
.panel .btn--primary { background: #fff; color: var(--blue); }
.panel .btn--primary:hover { background: var(--surface-2); }

.steps { counter-reset: step; display: grid; gap: 16px; margin-top: 32px; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: flex; gap: 16px; align-items: flex-start; }
.steps li::before { content: counter(step); flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 22px/44px var(--display); text-align: center; box-shadow: 0 0 0 4px rgba(232,100,31,0.35); }
.steps h3 { font-size: 22px; margin-bottom: 2px; color: var(--blue); }
.steps p { color: var(--muted); }

.cta-band { background: var(--orange-deep); color: #fff; padding: 48px 0; }
.cta-band .wrap { display: grid; gap: 18px; align-items: center; }
.cta-band h2 { font-size: clamp(30px, 6vw, 48px); color: #fff; margin: 0; }
.cta-band .btn { background: #fff; color: var(--blue); }
.cta-band .btn:hover { background: var(--surface-2); }

/* Tires page */
.page-head { padding: 48px 0 8px; }
.page-head .lede { margin-top: 14px; }
.page-head h1 { font-size: clamp(38px, 8vw, 64px); color: var(--blue); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 26px 0 8px; }
.filters .field { margin: 0; }
.chips { display: flex; gap: 8px; }
.chip { padding: 10px 18px; border-radius: var(--radius); border: 1.5px solid #B9C2D8; background: #fff; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); }
.chip:hover { color: var(--blue); border-color: var(--blue); }
.chip[aria-current='true'] { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: inset 0 -3px 0 var(--orange); }
.tire-grid { display: grid; gap: 14px; margin-top: 22px; }
.tire { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(26,28,34,0.05); }
.tire .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; }
.tag--new { background: rgba(52,82,154,0.12); color: var(--blue); }
.tag--used { background: rgba(232,100,31,0.15); color: var(--orange-deeper); }
.tire h3 { font-size: 24px; margin: 8px 0 2px; color: var(--text); }
.tire .size { font-family: var(--display); font-size: 20px; color: var(--blue); letter-spacing: 0.04em; }
.tire .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tire .buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--text); }
.price small { display: block; font-family: var(--body); font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.notice { margin-top: 28px; font-size: 13.5px; color: var(--muted); }

/* Booking page */
.book-layout { display: grid; gap: 28px; padding: 40px 0 72px; }
.book-form { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 30px rgba(26,28,34,0.08); }
.book-form h2 { font-size: 28px; margin: 6px 0 16px; color: var(--blue); }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.aside-card h3 { font-size: 22px; margin-bottom: 10px; color: var(--blue); }
.aside-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); }
.aside-card li::before { content: '✓'; color: var(--good); margin-right: 10px; font-weight: 800; }
.hours { width: 100%; border-collapse: collapse; color: var(--muted); font-size: 15px; }
.hours td { padding: 5px 0; }
.hours td:last-child { text-align: right; color: var(--text); font-weight: 600; }

.thanks { text-align: center; padding: 72px 0 96px; }
.thanks .check { width: 72px; height: 72px; border-radius: 50%; background: rgba(30,142,78,0.14); color: var(--good); display: grid; place-items: center; margin: 0 auto 22px; }
.thanks .check svg { width: 36px; height: 36px; }
.thanks h1 { font-size: clamp(36px, 8vw, 60px); margin-bottom: 12px; color: var(--blue); }
.thanks .ref { display: inline-block; margin: 18px 0 28px; padding: 8px 18px; border: 1.5px dashed var(--blue); border-radius: var(--radius); font-weight: 700; letter-spacing: 0.08em; color: var(--blue); background: #fff; }

/* Footer */
.site-footer { background: var(--black); color: #fff; padding: 48px 0 28px; }
.site-footer .cols { display: grid; gap: 28px; }
.site-footer h3 { font-size: 18px; color: var(--orange); margin-bottom: 10px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,0.72); font-size: 15px; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .hours, .site-footer .hours td:last-child { color: rgba(255,255,255,0.72); }
.site-footer .hours td:last-child { color: #fff; }
.site-footer .legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 13px; color: rgba(255,255,255,0.5); }

/* Sticky mobile booking bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--blue); box-shadow: 0 -4px 16px rgba(14,14,12,0.2); }
.mobile-bar .btn { flex: 1; min-height: 50px; }
.mobile-bar .btn--ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
.mobile-bar .btn--ghost:hover { background: #fff; color: var(--blue); }

@media (min-width: 720px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2, .split { grid-template-columns: repeat(2, 1fr); }
  .tire-grid { grid-template-columns: repeat(2, 1fr); }
  .row--2 { grid-template-columns: 1fr 1fr; }
  .cta-band .wrap { grid-template-columns: 1fr auto; }
  .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .nav { display: flex; }
  .header-phone { display: inline; }
  .hero { padding: 72px 0 96px; }
  .hero .wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
  .car-stage { height: 460px; }
  .quick { grid-template-columns: 1.1fr 1.3fr 1fr auto; align-items: end; gap: 16px; padding: 24px 28px; }
  .quick .field { margin-bottom: 0; }
  .quick .quick-title .sub { margin-bottom: 0; }
  .quick .btn { width: auto; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .tire-grid { grid-template-columns: repeat(3, 1fr); }
  .book-layout { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
  .section { padding: 88px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
