/* Tony's Tire and Auto. Bold working-shop look: logo red, black, white and the
   building's gray. Colors live here so the look can change in one place. */

:root {
  --red: #d9182d;        /* logo red. White text on it is 5.1:1 (passes) */
  --red-dark: #b8101f;   /* pressed/hover, 6.7:1 with white text */
  --red-light: #ff5a69;  /* small text on black. 5.9:1 (plain red on black is only 3.7:1) */
  --black: #111111;
  --white: #ffffff;
  --gray: #e8eaec;       /* the building's gray walls */
  --gray-line: #b9bec4;
  --text: #1a1a1a;
  --max-width: 72rem;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.2rem;     /* 19.2 px: easier to read; nothing on the page is smaller than 16 px */
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }

/* Keyboard focus: white ring with a black outer ring, visible on every background */
:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--black); }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: var(--gutter); top: var(--gutter); background: var(--white); color: var(--black); padding: .75rem 1rem; z-index: 20; font-weight: 700; }

/* Headings: heavy, upright capitals. Plain upright type reads faster than slanted type, and the logo keeps its own slant. */
h1, h2 { font-weight: 900; font-style: normal; text-transform: uppercase; line-height: 1.08; letter-spacing: .01em; margin: 0; }
h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); margin-bottom: 1.5rem; padding-bottom: .6rem; position: relative; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 4rem; height: .3rem; background: var(--red); }

/* Header: black bar, stays at the top so the call button is always in reach */
.site-header { background: var(--black); border-bottom: .3rem solid var(--red); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .5rem; padding-bottom: .5rem; }
.logo { background: var(--white); padding: .25rem .5rem; border-radius: .25rem; line-height: 0; flex: none; }
.logo img { width: 6.5rem; }

/* Buttons: at least 56 px tall */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0 1.5rem; font: inherit; font-weight: 800; text-decoration: none; border-radius: .3rem; border: 3px solid transparent; text-align: center; }
.btn-call { background: var(--red); color: var(--white); }
.btn-call:hover { background: var(--red-dark); }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: var(--gray); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #333; }
.site-header .btn { min-height: 3rem; padding: 0 .9rem; font-size: 1rem; }
/* Icon-only buttons: the phone in the header and the Facebook logo in the hero */
.btn-icon { width: 3.5rem; padding: 0; }
.site-header .btn-icon { min-height: 3rem; width: 3.5rem; padding: 0; }
.btn-fb { width: 3.5rem; padding: 0; background: var(--white); border-color: var(--white); }
.btn-fb:hover { background: var(--gray); }

/* Hero: building photo cropped wide, then a black panel with the pitch */
.hero { background: var(--black); color: var(--white); padding: 0; }
.hero-photo { display: block; position: relative; }
/* Fades the bottom of the photo into the black panel so there is no hard seam. Only the pavement is covered, not the building. */
.hero-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(to bottom, rgba(17, 17, 17, 0), var(--black)); pointer-events: none; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 26rem; object-fit: cover; object-position: 50% 60%; } /* phones: taller 3:2 crop */
.hero-text { padding-top: 1.5rem; padding-bottom: 2rem; }
.hero h1 { font-size: clamp(2.25rem, 10vw, 4.25rem); }
.rating { margin: 1rem 0 0; font-size: 1.2rem; }
/* The whole line is one link to Tony's Google reviews (44 px+ tap area) */
.rating a, .rating a:visited, .rating a:hover, .rating a:active { color: #ffffff; }
.rating a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 .35rem; min-height: 2.75rem; text-decoration: none; }
.rating-text { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .65); text-underline-offset: .25em; text-decoration-thickness: 1px; }
.rating a:hover .rating-text { text-decoration-color: #ffffff; text-decoration-thickness: 2px; }
.rating strong { color: var(--white); background: var(--red); padding: .15rem .6rem; border-radius: .25rem; white-space: nowrap; }
.hero-body p { margin: 1rem 0 0; max-width: 34rem; }
.hero-body p:first-child { font-size: 1.3rem; font-weight: 600; }
.actions { display: grid; grid-template-columns: 1fr auto; gap: .75rem; max-width: 30rem; }
.actions .btn-call { grid-column: 1 / -1; }
.actions .btn-fb { align-self: stretch; height: auto; }
/* Call is the biggest thing on the page: taller, bigger type, white edge. Directions drops to an outline so it doesn't compete. */
.hero .btn-call { min-height: 4.25rem; font-size: 1.375rem; font-weight: 900; border-color: var(--white); }
.hero .btn-light { background: transparent; color: var(--white); border-color: var(--white); }
.hero .btn-light:hover { background: var(--white); color: var(--black); }

/* Red info strip under the hero: when and where */
.info-bar { background: var(--red); color: var(--white); }
.info-bar .wrap { padding-top: .9rem; padding-bottom: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; }
.info-bar p { margin: 0; font-size: 1.0625rem; font-weight: 800; }

section { padding: 2.5rem 0; }

/* Services: tiles on the building's gray */
.services { background: var(--gray); }
.services ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.services li { background: var(--white); border-left: .5rem solid var(--red); padding: .9rem 1rem; min-height: 4rem; display: flex; align-items: center; font-weight: 800; line-height: 1.25; }
.services-note { margin: 1.5rem 0 0; font-weight: 600; }

/* Reviews: black section, big white quotes. Sideways scroll that snaps one quote at a time (swipe works without JavaScript) */
.reviews { background: var(--black); color: var(--white); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
/* Every slide is as tall as the tallest quote, so the buttons never move. Short quotes sit centered in a dark card so the extra space looks planned. */
.slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; justify-content: center; background: #1f1f1f; border-left: .5rem solid var(--red); border-radius: .3rem; }
.slide::before { content: "\201C"; color: var(--red-light); font-size: 5rem; font-weight: 900; line-height: .7; height: 2.5rem; }
.slide blockquote { margin: 0; }
.slide blockquote p { margin: 0; font-size: clamp(1.25rem, 4.6vw, 1.75rem); font-weight: 600; line-height: 1.4; }
.slide figcaption { margin-top: 1rem; font-weight: 800; color: var(--red-light); text-transform: uppercase; letter-spacing: .05em; }
.carousel-controls[hidden] { display: none; }
.carousel-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; margin-top: 1rem; max-width: 32rem; }
.carousel-controls button { height: 3.5rem; padding: 0 .5rem; font: inherit; font-size: 1rem; font-weight: 800; line-height: 1; white-space: nowrap; border-radius: .3rem; border: 3px solid var(--white); background: var(--black); color: var(--white); cursor: pointer; }
.carousel-controls #next { background: var(--red); border-color: var(--red); }
.carousel-controls button:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.carousel-controls #next:hover { background: var(--red-dark); color: var(--white); border-color: var(--red-dark); }
#status { font-weight: 700; text-align: center; min-width: 3.5rem; }
.source-note { font-size: 1rem; color: #c4c9ce; margin: 1.25rem 0 0; }

/* Hours and location */
.visit { background: var(--gray); }
.visit-grid { display: grid; gap: 1.5rem; }
address { font-style: normal; font-size: 1.3rem; line-height: 1.6; }
address a { color: var(--black); font-weight: 800; display: inline-block; padding: .6rem 0; }
.hours { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
.hours caption { text-align: left; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; padding-bottom: .5rem; }
.hours { font-size: 1.1rem; }   /* keeps each hours line on one row on small phones */
.hours td { white-space: nowrap; }
.hours th, .hours td { text-align: left; padding: .7rem 0; border-top: 1px solid var(--gray-line); }
.hours th { font-weight: 800; padding-right: .75rem; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 1px solid var(--gray-line); }
.visit-cta { margin: 0; }
/* The sign photo sits in a rounded white card under the hours: cropped to the sign, with a short caption */
.sign-card { margin: 0; background: var(--white); border: 2px solid var(--gray-line); border-radius: .9rem; padding: .6rem .6rem .5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.sign-card img { width: 100%; border-radius: .5rem; }
.sign-card figcaption { margin: .6rem .25rem .1rem; font-size: 1rem; font-weight: 700; text-align: center; }
/* The map fills the right column to the bottom of the left one; on phones it is just a block under it */
.map-frame { position: relative; min-height: 20rem; border-radius: .6rem; overflow: hidden; background: var(--gray-line); }
.map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.site-footer { background: var(--black); color: var(--white); border-top: .3rem solid var(--red); padding: 2rem 0; }
.site-footer p { margin: 0 0 .75rem; }
.footer-top { display: grid; gap: 1.25rem; justify-items: start; }
.footer-name { font-size: 1.3rem; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 .5rem; }
.site-footer address { font-size: 1.0625rem; }
.site-footer address a { color: var(--white); padding: .5rem 0; }
/* Facebook logo: white tile so the blue logo reads on black; 44 px+ tap area */
.footer-fb { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; background: var(--white); border-radius: .3rem; }
.footer-fb:hover { background: var(--gray); }
.legal { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #3a3a3a; }
.legal p { font-size: 1rem; color: #c4c9ce; max-width: 52rem; }
.legal strong { color: var(--white); }

/* "Page not found" (404.html): black like the hero, one clear way home and one to call */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.not-found { flex: 1; background: var(--black); color: var(--white); padding: 3rem 0 4rem; }
.page-404 .site-footer p { margin: 0; }
.not-found h1 { font-size: clamp(2.25rem, 10vw, 4rem); }
.not-found p { margin: 1rem 0 0; max-width: 34rem; }
.not-found .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.not-found .btn { flex: 1 1 14rem; max-width: 20rem; min-height: 4rem; }
.not-found .btn-call { border-color: var(--white); }

/* Quick 150 ms fade-in for the logo and the hero. Plain CSS, so nothing waits on JavaScript,
   and anyone who asks their phone for less motion just sees the page. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.logo, .hero-photo, .hero-text { animation: fade-in 150ms ease-in; }
@media (prefers-reduced-motion: reduce) { .logo, .hero-photo, .hero-text { animation: none; } }

@media (min-width: 600px) {
  .hero-photo img { aspect-ratio: 8 / 3; }
  .hero-photo::after { height: 12%; }
  .logo img { width: 8.5rem; }
  .site-header .btn:not(.btn-icon) { min-height: 3.5rem; padding: 0 1.5rem; font-size: 1.125rem; }
  .site-header .btn-icon { min-height: 3.5rem; }
}

@media (min-width: 800px) {
  :root { --gutter: 2rem; }
  .hero-photo img { max-height: 21rem; }
  .hero h1 { font-size: 3.25rem; }
  .hero-text { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: center; padding-top: 2rem; padding-bottom: 2.5rem; }
  .hero-body p:first-child { margin-top: 0; }
  .services li { min-height: 5rem; }
  /* Left column: hours info, then the sign card. Right column: the map, spanning both rows. */
  .visit-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; align-items: stretch; gap: 0 2rem; }
  .visit-info { grid-column: 1; grid-row: 1; }
  .sign-card { grid-column: 1; grid-row: 2; align-self: start; margin-top: 1.75rem; }
  .map-frame { grid-column: 2; grid-row: 1 / span 2; }
  .slide blockquote p { max-width: 52rem; }
}

/* Five service tiles per row only when each tile is wide enough to read */
@media (min-width: 1100px) {
  .services ul { grid-template-columns: repeat(5, 1fr); }
  .services li { min-height: 5.5rem; }
}
