/*
 * Theme tokens: Uniroyal red and black.
 *   --red is sampled from the Uniroyal On Site logo (#e03625). White text on it is only 4.4:1,
 *   so buttons use the slightly darker --red-btn (5.4:1) and links use --red-dark (7.6:1).
 */
:root {
  --red: #e03625;            /* logo red: icons, accents, borders */
  --red-btn: #cc2a1b;        /* buttons and the Calendly widget (white text stays readable) */
  --red-dark: #a3200f;       /* links and hover states on white */
  --red-tint: #fdeeec;
  --success: #2e7d32;
  --error: #b42318;
  --black: #111111;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e2e2e2;
  --surface: #ffffff;
  --page: #f2f2f2;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", var(--font-body);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0 0 .6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--black);
}
h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 5.5vw, 2rem); }
h3 { font-size: 1.2rem; }
a { color: var(--red-dark); }
a:hover { color: var(--black); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
.narrow { max-width: 40rem; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); font-size: .95rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600;
  color: var(--muted); margin: 0;
}
.icon { width: 1.5em; height: 1.5em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Header: white, Uniroyal On Site logo on the left, menu on the right */
.site-header { background: var(--surface); border-bottom: 3px solid var(--red); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: flex; align-items: center; line-height: 0; }
.brand img { display: block; height: clamp(24px, 7.5vw, 32px); width: auto; }
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px; color: var(--black);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:focus-visible { outline: 2px solid var(--red-dark); outline-offset: -4px; }
.menu .icon-close { display: none; }
.menu[open] .icon-open { display: none; }
.menu[open] .icon-close { display: block; }
.menu nav {
  position: absolute; right: -16px; top: calc(100% + 11px); width: min(18rem, 100vw);
  background: var(--surface); border-top: 3px solid var(--red); box-shadow: var(--shadow);
}
.menu nav a {
  display: block; padding: .85rem 1.25rem; color: var(--black); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.menu nav a:hover { background: var(--red-tint); color: var(--red-dark); }

/* Wide screens: links across the header instead of the menu button */
.desktop-nav { display: none; }
@media (min-width: 900px) {
  .menu { display: none; }
  .desktop-nav { display: flex; align-items: center; gap: 2rem; }
  .desktop-nav a:not(.btn) {
    color: var(--black); text-decoration: none; font-family: var(--font-display); font-weight: 600;
    font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em; padding: .35rem 0;
    border-bottom: 2px solid transparent;
  }
  .desktop-nav a:not(.btn):hover { color: var(--red-dark); border-bottom-color: var(--red); }
  .desktop-nav .nav-cta { padding: .55rem 1.1rem; font-size: .95rem; }
  .site-header .wrap { min-height: 72px; }
}

/* Keep the footer at the bottom of the window on short pages */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; width: 100%; }

/* Footer: black, with the BridgeWay and Uniroyal logos, the event, then contact and FAQ */
.site-footer { background: var(--black); color: #fff; font-size: 1rem; padding: 2rem 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.footer-logos { display: flex; align-items: center; justify-content: flex-start; gap: 1.5rem; }
.footer-event { text-align: center; }
.footer-bridgeway { display: block; height: 60px; width: auto; }
.footer-uniroyal { display: block; height: 48px; width: auto; }
.footer-contact { text-align: center; }
.site-footer p { margin: .2rem 0; }
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1rem; }
  .footer-logos { justify-self: stretch; justify-content: space-evenly; gap: 1rem; }
}

/* Cards & layout */
.card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.lede { margin: 0 0 1.25rem; }
.two-col { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  /* Pick a Time: show the order first once the columns stack */
  .summary-first > .summary { order: -1; }
}
.back-link { display: inline-flex; align-items: center; gap: .2rem; font-size: .95rem; font-weight: 500; margin-bottom: .75rem; }
.back-link .icon { width: 1.1em; height: 1.1em; }

/* Lists of icon + text (home page points, How It Works, Why Uniroyal, What Happens Next) */
.icon-list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 1rem; }
.icon-list li { display: flex; gap: .9rem; align-items: flex-start; }
.icon-list .icon { width: 2rem; height: 2rem; color: var(--red); }
.icon-list strong { display: block; color: var(--black); }
.icon-list span { color: var(--muted); font-size: .95rem; }
.numbered { counter-reset: n; }
.numbered li { counter-increment: n; }
.numbered li::before {
  content: counter(n); flex: none; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--red-btn); color: #fff; font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; margin-top: .1rem;
}

/* Forms */
label { display: block; font-weight: 500; margin-bottom: 1rem; }
input[type=text], input[type=tel], input[type=email], select {
  display: block; width: 100%; margin-top: .3rem; padding: .7rem .75rem;
  font: inherit; border: 1px solid #bdbdbd; border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--red-dark); outline-offset: 1px; border-color: var(--red-dark); }
input[type=checkbox], input[type=radio] { accent-color: var(--red-btn); width: 1.1rem; height: 1.1rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 30rem) { .field-pair { grid-template-columns: 1fr; } }
.choices .check { margin-bottom: .6rem; }
.choices legend { font-size: 1rem; font-weight: 500; }

/* Time picker */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .75rem; margin-top: .5rem; }
.time-slot {
  font: inherit; font-weight: 600; padding: .9rem .5rem; cursor: pointer;
  background: var(--surface); color: var(--red-dark); border: 1px solid var(--red-btn); border-radius: var(--radius);
}
.time-slot:hover { background: var(--red-tint); }
.time-slot:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-weight: 600; font-size: 1.1rem; margin-bottom: .75rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .25rem; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--error); font-weight: 600; font-size: .9rem; }
.alert { background: #fdecec; border-left: 4px solid var(--error); padding: .75rem 1rem; margin-bottom: 1rem; }
.alert .errorlist { margin: 0; }
.hint { display: flex; gap: .75rem; align-items: center; margin: 1.25rem 0 0; color: var(--muted); font-size: .95rem; }
.hint .icon { width: 2.25rem; height: 2.25rem; color: var(--black); }

/* Buttons: red, uppercase, with a chevron */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border: 0; border-radius: var(--radius);
  background: var(--red-btn); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer;
}
.btn::after { content: "›"; font-size: 1.5em; line-height: .6; margin-top: -.1em; }
.btn:hover { background: var(--red-dark); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.btn-block { display: flex; width: 100%; }
.btn-outline { background: #fff; color: var(--red-dark); border: 1px solid var(--red-btn); font-size: .95rem; }
.btn-outline::after { content: none; }
.btn-outline:hover { background: var(--red-tint); color: var(--red-dark); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1.25rem; }
.btn-row .btn { padding-left: .5rem; padding-right: .5rem; font-size: .9rem; letter-spacing: .03em; white-space: nowrap; }
.btn-row .icon { width: 1.2em; height: 1.2em; }

/* Placeholder images (swap the files in static/img/placeholders/ for real photos) */
.photo { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #d9d9d9; }

/* Home page: scrolling cards with a floating button */
/* Room under the footer so the floating button never covers it */
.home .site-footer { padding-bottom: 6.5rem; }
.home .card { scroll-margin-top: 1rem; }
.hero-card { position: relative; overflow: hidden; padding: 0; background: var(--black); color: #fff; }
.hero-card .photo { position: absolute; inset: 0; height: 100%; object-fit: cover; border-radius: 0; }
.hero-card::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.25) 100%); }
.hero-body { position: relative; z-index: 1; padding: 2rem 1.5rem 1.5rem; }
.hero-card h1 { color: #fff; font-size: clamp(2.6rem, 12vw, 4rem); text-transform: none; max-width: 10ch; }
.hero-card .lede { max-width: 26rem; font-size: 1.1rem; }
.hero-card .when { font-weight: 600; margin: 0 0 1.25rem; }
.hero-card .icon-list .icon { color: #fff; }
.hero-card .icon-list strong { color: #fff; font-weight: 500; }
.hero-strip {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.55);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .12em; font-size: 1.05rem;
}
.hero-strip img { height: 44px; width: auto; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.feature-row li { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .9rem; color: var(--ink); }
.feature-row .icon { width: 2rem; height: 2rem; color: var(--red); }
.tagline { background: var(--black); color: #fff; text-align: center; font-family: var(--font-display);
  font-size: 1.5rem; text-transform: none; line-height: 1.25; padding: 1.5rem; }
.floating-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(242,242,242,1) 60%, rgba(242,242,242,0));
}
.floating-cta .btn { width: 100%; max-width: 40rem; margin: 0 auto; display: flex; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* Tire list and detail */
.vehicle-title { color: var(--black); }
.tire-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin-top: 1rem; }
.tire-grid .card + .card, .two-col > .card + .card { margin-top: 0; }
.tire { display: flex; flex-direction: column; border-top: 4px solid var(--red); }
.tire img { width: 100%; height: 180px; object-fit: contain; margin-bottom: 1rem; }
.tire-placeholder { height: 180px; margin-bottom: 1rem; border-radius: 6px;
  background: radial-gradient(circle, var(--page) 28%, #222 29%, #222 62%, var(--page) 63%); }
.brand-name { color: var(--red); font-family: var(--font-display); font-weight: 700; font-style: italic;
  text-transform: uppercase; letter-spacing: .02em; margin: 0; font-size: 1.1rem; }
.tire h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.tire .size { font-weight: 600; color: var(--black); margin: 0 0 .5rem; }
.tire-buy { margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); }
.tire .price { margin: 0 0 .85rem; color: var(--muted); font-weight: 500; }
.tire .price .amount { font-size: 2rem; font-weight: 600; color: var(--black); margin-right: .2rem; }
.tire .fee-note { margin: -.75rem 0 .85rem; color: var(--muted); font-size: .9rem; }
.tire .btn { width: 100%; }
.tire-hero { display: grid; grid-template-columns: 40% 1fr; gap: 1rem; align-items: center; margin: 1rem 0 0; }
.tire-hero img, .tire-hero .tire-placeholder { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin: 0; }
.tire-hero h2 { font-size: 1.35rem; margin: 0 0 .4rem; }
.tire-hero p { margin: 0; font-size: .95rem; color: var(--muted); }
.feature-row.tire-features { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }

/* Price tables */
.pricing { margin: 1.25rem 0; }
.pricing h3 { font-family: var(--font-body); text-transform: none; font-size: 1rem; margin-bottom: .5rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 500; }
.pricing dl, dl.prices { grid-template-columns: 1fr auto; column-gap: 0; }
.subtotal, .divider { border-top: 1px solid var(--line); padding-top: .5rem; }
/* Itemized charges: "4 × $25.00" on the left, the line total on the right. */
dd.line-amount { display: flex; justify-content: flex-end; gap: .75rem; font-variant-numeric: tabular-nums; }
dd.line-amount span { color: var(--muted); font-weight: 400; white-space: nowrap; }
/* In a narrow column the "4 × $25.00" moves above the amount instead of breaking. */
dd.line-amount { flex-wrap: wrap; column-gap: .75rem; row-gap: 0; }
dd.subtotal { font-variant-numeric: tabular-nums; text-align: right; }
dt.subtotal { color: var(--black); font-weight: 600; }
dd.subtotal { font-size: 1.25rem; font-weight: 600; }
dd.subtotal span { font-size: .85rem; font-weight: 500; color: var(--muted); }
.paid-note { color: var(--muted); font-size: .9rem; margin: 0 0 .75rem; }
.summary { border-top: 4px solid var(--red); }
.summary dl { grid-template-columns: max-content 1fr; column-gap: 0; }
.summary dt { padding-right: 1rem; }  /* spacing that keeps the subtotal and total rules unbroken */
.summary h2 { font-size: 1.4rem; }
.summary-help { font-size: .95rem; margin: 0 0 .75rem; }

/* Notices and confirmation */
.notice { max-width: 40rem; border-top: 4px solid var(--red); }
.confirm-head { text-align: center; margin-bottom: 1.25rem; }
.confirm-head .icon { width: 3.5rem; height: 3.5rem; color: var(--success); }
.confirm-head p { margin: 0; color: var(--muted); }
.detail-list { list-style: none; padding: 0; margin: 0 0 1.25rem; background: var(--page); border-radius: var(--radius); }
.detail-list li { display: flex; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.detail-list li:last-child { border-bottom: 0; }
.detail-list .icon { color: var(--black); }
.detail-list strong { display: block; }

.calendly-inline-widget { margin: 0 -0.5rem; }
.calendly-inline-widget[hidden] { display: none; }
.schedule-status { margin: 1rem 0 0; font-weight: 500; }
.schedule-status:empty { display: none; }

/* FAQ: questions expand in place (native <details>, no script needed) */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 2px solid var(--red-dark); outline-offset: 2px; }
.faq-answer { padding: 0 0 1rem; }
.faq-answer p { margin: 0 0 .75rem; }
.faq-more { margin: 1.5rem 0 1rem; }

/* Deposit page (Stripe Payment Element) */
.card-form { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.payment-element { margin-bottom: 1.25rem; }
.alert p { margin: 0; }
.field-row { display: grid; gap: 0 .75rem; }
.field-row-3 { grid-template-columns: 1.3fr 1fr 1fr; }
.field-row input { min-width: 0; }
.btn:disabled { opacity: .75; cursor: progress; }
.btn:disabled::after { content: none; }
.card-note { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: .75rem 0 0; }
.card-note .icon { width: 1.1em; height: 1.1em; }

/* Modern Mobile Tire van (static/img/mmt-van.jpg is already cropped to 16:10) */
.van-photo { aspect-ratio: 16 / 10; object-fit: cover; }

/* Why Uniroyal: the Tiger Paw tire as an offset background, cut off by the card's right and
   bottom edges (like the mockup). Sized by width so its left edge always lands just past the
   text column: visible part = width - overhang = 62% - 24% = 38% of the card. */
.why-card { position: relative; overflow: hidden; min-height: 27rem; }
.why-card > * { position: relative; z-index: 1; }
.why-copy { max-width: 58%; }
.why-card .why-tire {
  position: absolute; z-index: 0; pointer-events: none;
  width: 62%; height: auto; max-width: none; right: -24%; bottom: -8%;
}
@media (min-width: 640px) {
  .why-card { min-height: 25rem; }
  .why-card h2 { max-width: 60%; }
  .why-card .why-tire { width: 46%; right: -8%; bottom: -14%; }
}

/* Home hero: BridgeWay plaza at sunset. On narrow cards only part of the width shows, so keep
   the clock tower to the right of the headline. */
.hero-card .hero-photo { object-position: 22% 60%; }

/* ---- Home page layout ----
   Phones: one column of cards (40rem max) with the floating "Find tires" button.
   Wide screens: full-width hero with its own button, the five steps in a row, and
   "Why Uniroyal" beside "Installed by Modern Mobile Tire". */
.home-layout { max-width: 40rem; margin: 0 auto; }
.home-pair { margin-top: 1.25rem; }
.home-pair + .card { margin-top: 1.25rem; }
.hero-cta { display: none; }
@media (min-width: 900px) {
  .home-layout { max-width: none; }
  .home .card { padding: 2rem 2.25rem; }
  .home .floating-cta { display: none; }
  .home .site-footer { padding-bottom: 2rem; }

  .home .hero-card { padding: 0; }
  .hero-card { min-height: 34rem; display: flex; flex-direction: column; justify-content: space-between; }
  .hero-card .hero-photo { object-position: 50% 58%; }
  .hero-body { padding: 3.5rem 3rem 2.5rem; max-width: 42rem; }
  .hero-card h1 { font-size: 5.25rem; max-width: 10ch; margin-bottom: 1rem; }
  .hero-card .lede { font-size: 1.3rem; max-width: 30rem; }
  .hero-card .icon-list { margin-bottom: 1.75rem; }
  .hero-cta { display: inline-flex; }
  .hero-strip { padding: 1rem 3rem; }

  #how-it-works h2 { font-size: 2.4rem; }
  #how-it-works .lede { max-width: 44rem; }
  /* One equal column per step, however many steps the list has. */
  .numbered { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1.75rem; margin: 1.75rem 0 .5rem; }
  .numbered li { display: grid; grid-template-columns: auto auto 1fr; align-items: center; align-content: start; gap: .6rem; }
  .numbered li > div { grid-column: 1 / -1; }
  .numbered li span { display: block; margin-top: .2rem; }

  .home-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
  .home-pair > .card + .card { margin-top: 0; }
  #installer { display: flex; flex-direction: column; }
  #installer .van-photo { flex: 1; min-height: 0; }

  .tagline { font-size: 2.1rem; padding: 2rem; }
}
