/*
Theme Name: Manitoba Auto Garage
Theme URI: https://example.com
Author: Prime
Description: Premium custom theme for an independent Manitoba automotive garage. Warm off-white and deep navy palette, editorial photography-led layout, built for trust and readability.
Version: 1.0
Requires PHP: 7.4
Text Domain: mb-auto-garage
*/

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* Color */
  --color-bg: #FAF8F3;          /* warm off-white */
  --color-surface: #FFFFFF;      /* card surfaces */
  --color-navy: #0E2340;         /* primary brand navy */
  --color-navy-deep: #081729;    /* darker navy for overlays/CTA */
  --color-navy-light: #1B3A63;   /* hover / accent navy */
  --color-steel: #6C7A8C;        /* muted steel-blue-gray accent */
  --color-steel-soft: #EDF0F3;   /* pale steel background tint */
  --color-charcoal: #262A2E;     /* body text */
  --color-charcoal-soft: #565C64;/* secondary text */
  --color-border: #E6E1D6;       /* hairline borders on warm bg */
  --color-border-cool: #DDE2E8;  /* hairline borders on white/steel */
  --color-gold: #B08A4E;         /* single restrained metallic accent — used sparingly (star ratings, dividers) */

  /* Type */
  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Radius / shadow / motion */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --shadow-soft: 0 1px 2px rgba(14, 35, 64, 0.04), 0 8px 24px rgba(14, 35, 64, 0.06);
  --shadow-lift: 0 4px 8px rgba(14, 35, 64, 0.06), 0 16px 32px rgba(14, 35, 64, 0.10);
  --ease: 200ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-stretch: condensed; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--color-charcoal-soft); }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-steel);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--color-gold);
}

section { padding: clamp(56px, 8vw, 104px) 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover { transform: translateY(-1px); }

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

.btn-secondary { background: transparent; color: var(--color-navy); border-color: var(--color-navy); }
.btn-secondary:hover { background: var(--color-navy); color: #fff; }

.btn-on-navy { background: #fff; color: var(--color-navy); }
.btn-on-navy:hover { background: var(--color-steel-soft); }

.btn-ghost-on-navy { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-on-navy:hover { border-color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-cool);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.site-logo img { height: 42px; width: auto; }
.site-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--color-navy); }

.primary-nav { display: flex; align-items: center; gap: 36px; }
.primary-nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.primary-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-charcoal);
  position: relative;
  padding: 4px 0;
}
.primary-nav a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width var(--ease);
}
.primary-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone { font-family: var(--font-mono); font-size: 0.9rem; color: var(--color-navy); white-space: nowrap; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 900px) {
  .primary-nav ul, .header-phone { display: none; }
  .nav-toggle { display: block; }
  .site-header .container { height: 72px; }
}

.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--color-border-cool);
  padding: 20px var(--gutter) 28px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav:not([hidden]) { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { display: block; padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--color-border-cool); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: #fff;
  background-color: var(--color-navy-deep);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,23,41,0.78) 0%, rgba(8,23,41,0.55) 45%, rgba(8,23,41,0.88) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-content h1 { color: #fff; }
.hero-content p.lead { color: rgba(255,255,255,0.82); font-size: 1.15rem; max-width: 520px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 24px; }
.hero-trust {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* =========================================================
   INTRO / TRUST SPLIT
   ========================================================= */
.intro-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.intro-split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; }
.stat { border-top: 2px solid var(--color-navy); padding-top: 12px; }
.stat .stat-number { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; color: var(--color-navy); display: block; }
.stat .stat-label { font-size: 0.82rem; color: var(--color-charcoal-soft); text-transform: uppercase; letter-spacing: 0.04em; }

@media (max-width: 900px) {
  .intro-split { grid-template-columns: 1fr; gap: 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   SERVICES GRID
   ========================================================= */
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-cool);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}
.service-card .icon {
  width: 42px; height: 42px;
  margin-bottom: 18px;
  color: var(--color-navy);
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 0.92rem; margin-bottom: 0; }

@media (max-width: 1000px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* =========================================================
   FEATURED / EDITORIAL SECTION
   ========================================================= */
.featured-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  align-items: stretch;
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.featured-split .featured-img { background-size: cover; background-position: center; min-height: 420px; }
.featured-split .featured-copy { padding: clamp(32px, 5vw, 64px); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.featured-split .featured-copy h2 { color: #fff; }
.featured-split .featured-copy p { color: rgba(255,255,255,0.75); }
.featured-split .eyebrow { color: rgba(255,255,255,0.55); }
.featured-split .eyebrow::before { background: var(--color-gold); }

@media (max-width: 900px) {
  .featured-split { grid-template-columns: 1fr; }
  .featured-split .featured-img { min-height: 260px; }
}

/* =========================================================
   WHY CHOOSE US
   ========================================================= */
.benefits-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.benefit { text-align: left; }
.benefit .icon { width: 34px; height: 34px; color: var(--color-gold); margin-bottom: 14px; }
.benefit h3 { font-size: 1.05rem; }
.benefit p { font-size: 0.88rem; }

@media (max-width: 1000px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefits-grid { grid-template-columns: 1fr; } }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-cool);
  border-radius: var(--radius-md);
  padding: 28px;
}
.testimonial-card .stars { color: var(--color-gold); letter-spacing: 2px; margin-bottom: 14px; font-size: 0.95rem; }
.testimonial-card p.quote { font-style: italic; color: var(--color-charcoal); }
.testimonial-card .who { font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-charcoal-soft); text-transform: uppercase; letter-spacing: 0.04em; }

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

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 12px;
}
.gallery-grid a {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms var(--ease); }
.gallery-grid a:hover img { transform: scale(1.06); }
.gallery-grid .tall { grid-row: span 2; }
.gallery-grid .wide { grid-column: span 2; }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-grid .wide { grid-column: span 2; }
}

/* =========================================================
   SERVICE AREA
   ========================================================= */
.service-area { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.service-area .map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border-cool); box-shadow: var(--shadow-soft); }
.service-area .map-frame iframe { width: 100%; height: 340px; border: 0; display: block; }
.address-block { font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.8; color: var(--color-charcoal-soft); margin-top: 20px; }

@media (max-width: 900px) { .service-area { grid-template-columns: 1fr; } }

/* =========================================================
   APPOINTMENT CTA (full width navy)
   ========================================================= */
.cta-band {
  background: var(--color-navy-deep);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 480px; margin: 0 auto 28px; }
.cta-band .btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
.contact-info dl { margin: 0; }
.contact-info dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-steel); margin-top: 22px; }
.contact-info dd { margin: 4px 0 0; font-size: 1.02rem; color: var(--color-charcoal); }

.contact-form { background: var(--color-surface); border: 1px solid var(--color-border-cool); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--color-charcoal); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border-cool);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--color-navy);
  outline-offset: 1px;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}

/* =========================================================
   INNER-PAGE BANNER (About / Services / Contact / 404)
   ========================================================= */
.page-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-color: var(--color-navy-deep);
  overflow: hidden;
  padding-bottom: 40px;
}
.page-banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
}
.page-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,23,41,0.35) 0%, rgba(8,23,41,0.92) 100%);
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner .eyebrow { color: rgba(255,255,255,0.6); }
.page-banner .eyebrow::before { background: var(--color-gold); }
.page-banner h1 { color: #fff; margin-bottom: 6px; }
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: #fff; }

/* =========================================================
   ABOUT PAGE — STORY / VALUES / TEAM
   ========================================================= */
.story-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.story-split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-cool);
  border-radius: var(--radius-md);
  padding: 30px 26px;
}
.value-card .icon { width: 36px; height: 36px; color: var(--color-navy); margin-bottom: 16px; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { text-align: center; }
.team-card .photo {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--color-steel-soft);
}
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { margin-bottom: 2px; font-size: 1.05rem; }
.team-card .role { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-steel); }

@media (max-width: 900px) {
  .story-split { grid-template-columns: 1fr; gap: 32px; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   SERVICES ARCHIVE
   ========================================================= */
.service-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-archive-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-cool);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.service-archive-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.service-archive-card .thumb { aspect-ratio: 4/3; background: var(--color-steel-soft); overflow: hidden; }
.service-archive-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-archive-card .body { padding: 24px; }
.service-archive-card .body .eyebrow { margin-bottom: 8px; }
.service-archive-card .learn-more { font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-navy); text-transform: uppercase; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.service-archive-card:hover .learn-more { text-decoration: underline; }

@media (max-width: 1000px) { .service-archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .service-archive-grid { grid-template-columns: 1fr; } }

/* =========================================================
   STANDALONE CONTACT PAGE
   ========================================================= */
.contact-hours-card {
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}
.contact-hours-card h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.contact-hours-card .hours-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }
.contact-hours-card .hours-row:last-child { border-bottom: none; }

/* =========================================================
   404
   ========================================================= */
.error-404-wrap { text-align: center; padding: 100px 0; }
.error-404-wrap .code { font-family: var(--font-mono); font-size: 5rem; color: var(--color-steel); line-height: 1; margin-bottom: 12px; }

/* =========================================================
   ACCESSIBILITY / MOTION
   ========================================================= */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
