/* ============================================================
   PARKSIDE AUTO CARE — main.css
   ------------------------------------------------------------
   Palette grounded in the shop's own storefront signage (blue
   paint, red lettering) — see shop-storefront-charlie-charlie.jpg.
   Exact brand hex codes still pending the real logo file
   (see client-brief.md "Outstanding" items); treat this as a
   grounded starting point, not final.
   ============================================================ */

:root {
  --color-bg:          #f7f2e8;   /* warm cream page background */
  --color-bg-alt:      #fffdf8;   /* card / section alt background */
  --color-bg-deep:     #0d2c4f;   /* deep navy — footer, dark sections */
  --color-text:        #24211d;   /* warm charcoal, primary text */
  --color-text-muted:  #5c564c;   /* secondary text */
  --color-accent:      #1c4e8c;   /* Parkside blue — primary brand color */
  --color-accent-deep: #123663;   /* darker blue for hover/emphasis */
  --color-accent-2:    #b8382a;   /* Parkside red — sparing accent only */
  --color-cream-line:  rgba(36,33,29,0.1);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, 'Segoe UI', sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --max-width: 1140px;
  --radius:    10px;

  --shadow-sm: 0 2px 8px rgba(13,44,79,0.08);
  --shadow-md: 0 10px 30px rgba(13,44,79,0.14);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain — the "richer texture, lived-in" feel from the brief,
   without shipping a texture image. Kept faint on purpose. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }

a {
  color: var(--color-accent);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 var(--space-sm) 0;
  color: var(--color-text);
}

p { margin: 0 0 var(--space-sm) 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-cream-line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transition: right 0.2s ease;
}

.site-nav a:hover { color: var(--color-accent); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }

.header-ctas {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--color-cream-line);
  }
  .site-nav.is-open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    border: 2px solid var(--color-text);
    background: transparent;
    font-size: 1.1rem;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); opacity: 0.94; }

.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-deep); }

.btn-secondary {
  background: transparent;
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-light { background: #fff; color: var(--color-accent-deep); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding: 0;
  background: var(--color-bg-deep);
  overflow: hidden;
}

.hero-media-wrap {
  position: relative;
  min-height: 66vh;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  position: absolute;
  inset: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,44,79,0.55) 0%, rgba(13,44,79,0.75) 55%, rgba(13,44,79,0.92) 100%);
}

.hero-content {
  position: relative;
  padding: var(--space-xl) var(--space-sm) var(--space-lg);
  color: #fff;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: #e7d9be;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  max-width: 20ch;
  margin: 0 auto var(--space-sm);
}

.hero-subhead {
  font-size: 1.15rem;
  color: #f1ece0;
  max-width: 52ch;
  margin: 0 auto var(--space-md);
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.hero-note { font-size: 0.85rem; color: #cdd7e5; }

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-xs) 0;
  overflow: hidden;
}

.trust-bar-track {
  display: flex;
  width: max-content;
  animation: trust-bar-scroll 32s linear infinite;
}

/* Pausing on hover/focus is a courtesy for anyone trying to read or tab
   through it, not just a nicety — reduced motion already freezes the
   animation outright via the global rule in the reset above. */
.trust-bar:hover .trust-bar-track,
.trust-bar:focus-within .trust-bar-track {
  animation-play-state: paused;
}

.trust-bar-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-md);
  padding-right: var(--space-md);
}

.trust-bar-group span {
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
}

.trust-bar-sep { opacity: 0.5; }

@keyframes trust-bar-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   STORY EXCERPT (About teaser)
   ============================================================ */

.story-section { padding: var(--space-xl) 0; }

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (max-width: 780px) {
  .story-grid { grid-template-columns: 1fr; }
}

.story-media {
  border-radius: var(--radius);
  overflow: hidden;
}

.story-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-media:hover img { transform: scale(1.04); }

.story-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.story-eyebrow::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin-right: 0.5em;
  vertical-align: middle;
  opacity: 0.65;
}

.story-copy p:last-of-type { margin-bottom: var(--space-md); }

.story-callout {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-accent-deep);
  border-left: 3px solid var(--color-accent-2);
  padding-left: var(--space-sm);
  margin: var(--space-md) 0;
}

/* ============================================================
   SERVICES TEASER
   ============================================================ */

.services-section {
  padding: var(--space-xl) 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-cream-line);
  border-bottom: 1px solid var(--color-cream-line);
}

.section-heading {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-lg) auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: var(--space-md);
  border: 1px solid var(--color-cream-line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.service-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ============================================================
   PROMISE ("What You Can Expect")
   ============================================================ */

.promise-section { padding: var(--space-xl) 0; }

.promise-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (max-width: 780px) {
  .promise-grid { grid-template-columns: 1fr; }
}

.promise-list {
  list-style: none;
  margin: 0 0 var(--space-md) 0;
  padding: 0;
}

.promise-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-cream-line);
  font-weight: 500;
}

.promise-list li:first-child { padding-top: 0; }

.promise-list li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.promise-media {
  border-radius: var(--radius);
  overflow: hidden;
}

.promise-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.promise-media:hover img { transform: scale(1.04); }

/* team-with-dog-portrait.jpg is a true portrait (547x820) — forcing it
   into the standard 4:3 landscape frame above crops out half the shot.
   This variant keeps the crop gentle. */
.promise-media.is-portrait img { aspect-ratio: 3 / 4; }

/* ============================================================
   REVIEWS
   ============================================================ */

.reviews-section {
  padding: var(--space-xl) 0;
  background: var(--color-bg-deep);
  color: #fff;
}

.reviews-section .section-heading h2 { color: #fff; }
.reviews-section .story-eyebrow { color: #e7d9be; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.review-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: transform 0.2s ease, background 0.2s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.1);
}

.review-stars {
  color: #e7b23a;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.review-quote { font-style: italic; color: #f1ece0; }

.review-attribution {
  color: #b9c3d3;
  font-size: 0.9rem;
  margin-top: var(--space-xs);
  margin-bottom: 0;
}

.reviews-links {
  text-align: center;
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   VISIT / LOCATION
   ============================================================ */

.visit-section {
  padding: var(--space-xl) 0;
  background: var(--color-bg-alt);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 720px) {
  .visit-grid { grid-template-columns: 1fr; }
}

.visit-detail { margin-bottom: var(--space-md); }

.visit-detail h3 {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
  font-weight: 700;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: var(--space-md) 0;
  text-align: center;
  color: #cdd7e5;
  font-size: 0.85rem;
  background: var(--color-bg-deep);
}

.site-footer .footer-names {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.site-footer a { color: #cdd7e5; }

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */

.page-hero {
  position: relative;
  background: var(--color-bg-deep);
  overflow: hidden;
}

.page-hero-media-wrap {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .page-hero-media-wrap { min-height: 340px; }
}

@media (min-width: 1024px) {
  /* Fixed px rather than a vw/aspect-ratio value on purpose — full-bleed
     width but a height that stays compact instead of ballooning on wide
     desktop monitors. min-height (not height) so it still grows to fit
     the heading/subhead on pages with longer copy instead of clipping. */
  .page-hero-media-wrap { min-height: 440px; }
}

.page-hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  position: absolute;
  inset: 0;
}

.page-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,44,79,0.6) 0%, rgba(13,44,79,0.88) 100%);
}

.page-hero-content {
  position: relative;
  padding: var(--space-lg) var(--space-sm);
  color: #fff;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.page-hero-content .story-eyebrow { color: #e7d9be; }

.page-hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin: 0 auto var(--space-xs);
}

.page-hero-content p {
  color: #f1ece0;
  max-width: 56ch;
  margin: 0 auto;
}

.site-nav a[aria-current="page"] { color: var(--color-accent); }

/* ============================================================
   SERVICES PAGE
   ============================================================ */

.service-category { margin-bottom: var(--space-lg); }

.service-category h2 {
  font-size: 1.35rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-md);
}

.service-list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem 2rem;
}

.service-list-plain li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-cream-line);
  font-weight: 500;
}

.ask-us-callout {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-cream-line);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  margin-top: var(--space-lg);
}

/* ============================================================
   PHOTO GALLERY (Our Story)
   ============================================================ */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

/* ============================================================
   REVIEWS PAGE (light card variant)
   ============================================================ */

.reviews-page-section { padding: var(--space-xl) 0; }

.review-card-light {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-cream-line);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.review-card-light .review-stars { color: #c98a1c; margin-bottom: var(--space-xs); }
.review-card-light .review-quote { font-style: italic; color: var(--color-text); }
.review-card-light .review-attribution {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
  margin-bottom: 0;
}

/* ============================================================
   CONTACT PAGE — phone-first "call band"
   ============================================================ */

.call-band {
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-lg) 0;
  text-align: center;
}

.call-band .story-eyebrow { color: #dbe6f5; }
.call-band h2 { color: #fff; }

.call-band-phone {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
  font-weight: 600;
  color: #fff;
  margin: var(--space-xs) 0 var(--space-sm);
  transition: opacity 0.15s ease;
}

.call-band-phone:hover { opacity: 0.88; }

.call-band-note { color: #dbe6f5; font-size: 0.9rem; margin: 0; }

/* ============================================================
   SCROLL REVEAL
   Fades sections up as they enter the viewport (see main.js).
   The noscript fallback in each page's <head> guarantees content
   is visible even if JS never runs.
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.section { padding: var(--space-lg) 0; }
.text-center { text-align: center; }

.cite-content-needed {
  outline: 2px dashed var(--color-accent-2);
  outline-offset: 4px;
}
