/* Phil's Auto And Fleet Repair — static site
   Colors follow the live site: navy #18206f, red #e53d2a, Helvetica/Barlow. */

:root {
  --navy: #18206f;
  --navy-deep: #10164a;
  --red: #e53d2a;
  --red-dark: #c43322;
  --ink: #1c1e27;
  --muted: #5c6370;
  --line: #e3dfd6;
  --paper: #f6f3ec;
  --white: #ffffff;
  --notice: #fff6ee;
  --max: 1120px;
  --shadow: 0 10px 30px rgba(16, 22, 74, 0.08);
  --header-offset: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: 0.25rem 0; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

.topbar {
  background: var(--navy-deep);
  color: #e8eaf6;
  font-size: 0.92rem;
}
.topbar-inner, .parts-inner, .header-inner, .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  justify-content: space-between;
  padding: 0.45rem 0;
}
.topbar a { color: white; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #ffd0c8; }

.parts-banner {
  background: var(--notice);
  border-bottom: 1px solid #f0d3c2;
  color: #3d2418;
}
.parts-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  font-weight: 600;
}
.parts-banner strong { color: var(--red-dark); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-right: auto;
}
.logo img { height: 42px; width: 42px; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav > a, .has-sub > a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
}
.nav > a[aria-current="page"], .has-sub > a[aria-current="page"] {
  color: var(--red-dark);
}
.nav > a:hover, .has-sub > a:hover { background: var(--paper); color: var(--navy); }
.has-sub { position: relative; }
.sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 50;
}
.services-menu .sub {
  display: none;
  width: min(520px, 70vw);
  grid-template-columns: 1fr 1fr;
  gap: 0.1rem 0.75rem;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.services-menu:hover .sub, .services-menu:focus-within .sub { display: grid; }
.sub a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.sub a:hover { background: var(--paper); color: var(--navy); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--red);
  color: white !important;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
}
.btn:hover { background: var(--red-dark); color: white !important; }
.btn.navy { background: var(--navy); }
.btn.navy:hover { background: var(--navy-deep); }
.btn.ghost {
  background: transparent;
  color: white !important;
  border: 2px solid white;
}
.btn.ghost:hover { background: white; color: var(--navy) !important; }
.header-call { white-space: nowrap; padding: 0.85rem 1rem; }

.hero {
  position: relative;
  min-height: 560px;
  color: white;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-slides, .hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-slides img {
  object-fit: cover;
  opacity: 0;
  animation: hero-fade 18s infinite;
}
.hero-slides img:nth-child(1) { animation-delay: 0s; }
.hero-slides img:nth-child(2) { animation-delay: 6s; }
.hero-slides img:nth-child(3) { animation-delay: 12s; }
@keyframes hero-fade {
  0% { opacity: 0; }
  6% { opacity: 1; }
  30% { opacity: 1; }
  38% { opacity: 0; }
  100% { opacity: 0; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 48, 0.88) 0%, rgba(10, 14, 48, 0.55) 52%, rgba(10, 14, 48, 0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.2rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffd0c8;
  margin-bottom: 0.7rem;
}
.rotator {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  height: 2.15em;
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.rotator-track { animation: cycle 12s infinite step-end; }
.rotator p {
  margin: 0;
  height: 2.15em;
  font-size: 1em;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-transform: uppercase;
}
@keyframes cycle {
  0% { transform: translateY(0); }
  33% { transform: translateY(-2.15em); }
  66% { transform: translateY(-4.3em); }
  99.9% { transform: translateY(-4.3em); }
  100% { transform: translateY(0); }
}
.hero p.lede { max-width: 38rem; font-size: 1.15rem; color: #f3f4fb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }

.badge-bar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
}
.badges img { width: min(150px, 100%); margin: 0 auto; display: block; }

.section { padding: 3.5rem 0; }
.section.paper { background: var(--paper); }
.section.navy { background: var(--navy); color: white; }
.section.navy a { color: white; }
.section.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.prose { max-width: 46rem; }
.prose.wide { max-width: 760px; margin: 0 auto; }
.center { text-align: center; }
.kicker { color: var(--red-dark); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.section.navy .kicker { color: #ffb0a4; }

.service-grid, .card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card img.cover { width: 100%; height: 150px; object-fit: cover; display: block; }
.card.horizontal { flex-direction: row; align-items: stretch; }
.card.horizontal img.cover { width: 220px; height: auto; min-height: 160px; flex: none; }
.services-list { grid-template-columns: 1fr; }
.card .pad, .pad { padding: 1.1rem 1.15rem 1.2rem; }
.card h2, .card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }

.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.checklist li {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin: 0;
}
.photo-frame { border-radius: 16px; overflow: hidden; min-height: 280px; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 280px; }

.notice {
  background: var(--notice);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.4rem;
}
.page-hero {
  position: relative;
  min-height: 240px;
  display: grid;
  align-items: end;
  color: white;
  background: var(--navy) center/cover no-repeat;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 22, 74, 0.25), rgba(16, 22, 74, 0.82));
}
.page-hero .wrap { position: relative; z-index: 1; padding: 3.2rem 0 1.6rem; }
.crumbs { font-size: 0.92rem; margin-bottom: 0.45rem; }
.crumbs a { color: #ffe4de; text-decoration: none; }
.page-hero p { max-width: 40rem; color: #f4f5fb; }

.faq details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0 0 0.7rem;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq summary h2 { display: inline; font-size: 1.08rem; }
.area-group { margin: 0 0 1.8rem; }
.area-group ul { columns: 1; }
@media (min-width: 700px) {
  .area-group ul { columns: 3; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.gallery-grid a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.gallery-grid img { width: 100%; height: 280px; object-fit: cover; display: block; }

form.stack { display: grid; gap: 0.75rem; }
label { font-weight: 650; font-weight: 600; display: block; margin-bottom: 0.25rem; }
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.75rem;
  border: 1px solid #ccc6ba;
  border-radius: 8px;
  background: white;
}
textarea { min-height: 140px; resize: vertical; }
.form-help, .owner-note {
  font-size: 0.92rem;
  color: var(--muted);
}
.owner-note {
  background: #fff8d8;
  border: 1px dashed #c9a227;
  color: #3f3410;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.form-status {
  background: #e8f6ee;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 500; }
.check input { width: auto; margin-top: 0.3rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.map-embed {
  border: 0;
  width: 100%;
  min-height: 320px;
  border-radius: 14px;
  background: var(--paper);
}
.hours-card, .info-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.pay-list { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; list-style: none; }
.pay-list li {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin: 0;
  font-size: 0.92rem;
}

.policy h2 { margin-top: 1.6rem; }
.policy h3 { margin-top: 1rem; font-size: 1.05rem; }
.policy details { margin: 0.4rem 0 0.8rem; }
.policy table { width: 100%; border-collapse: collapse; }
.policy td, .policy th { border: 1px solid var(--line); padding: 0.4rem 0.5rem; vertical-align: top; }

.site-footer { background: var(--navy-deep); color: #d9dced; padding: 2.5rem 0 1.2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 1.4rem;
}
.site-footer h2 { font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; color: white; }
.site-footer a { color: white; }
.fineprint {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.4rem;
  padding-top: 0.9rem;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}
.policy-links { display: flex; gap: 0.9rem; list-style: none; padding: 0; margin: 0; }
.policy-links a { color: #d9dced; }

.sticky-call {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  background: white;
  border-top: 1px solid var(--line);
  padding: 0.55rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom));
  gap: 0.5rem;
}
.sticky-call .btn { flex: 1; white-space: nowrap; font-size: 0.95rem; padding: 0.85rem 0.55rem; }

.review-link { display: inline-block; }
.review-link img { width: 180px; }

.band-photo { position: relative; color: white; background: #10164a center/cover no-repeat; }
.band-photo::before { content: ""; position: absolute; inset: 0; background: rgba(16, 22, 74, 0.78); }
.band-photo .wrap { position: relative; z-index: 1; }
.band-photo a { color: white; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .header-call { display: none; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: white;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1rem;
    max-height: calc(100vh - 78px);
    overflow: auto;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .has-sub .sub, .services-menu .sub {
    display: block;
    position: static;
    width: auto;
    box-shadow: none;
    border: 0;
    padding: 0 0 0.4rem 0.6rem;
    grid-template-columns: 1fr;
  }
  .service-grid, .card-grid, .footer-grid, .contact-layout, .section.split, .badges {
    grid-template-columns: 1fr 1fr;
  }
  .services-list { grid-template-columns: 1fr; }
  .card.horizontal { flex-direction: column; }
  .card.horizontal img.cover { width: 100%; height: 180px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sticky-call { display: flex; }
  body { padding-bottom: 76px; }
  .hero { min-height: 480px; }
}
@media (max-width: 640px) {
  .parts-inner { flex-direction: column; gap: 0.15rem; }
  .service-grid, .card-grid, .badges, .footer-grid, .contact-layout, .section.split, .checklist, .gallery-grid {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 440px; }
  .hero-content { padding: 3rem 0 2rem; }
  .section { padding: 2.4rem 0; }
  .logo img { height: 42px; width: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides img { animation: none; opacity: 0; }
  .hero-slides img:first-child { opacity: 1; }
  .rotator { height: auto; }
  .rotator-track { animation: none; }
  .rotator p { height: auto; margin-bottom: 0.35rem; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 3px solid #f0a040; outline-offset: 2px; }
