/*
Theme Name: Driveway Tires
Theme URI: https://drivewaytires.ca
Author: Driveway Tires
Description: Custom theme for Driveway Tires — a GTA tire sales & service business. Built from the original static site design (Home, Services, Locations, Contact). Includes custom page templates, a custom logo slot, a "primary" nav menu location, and Web3Forms-powered contact forms.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: drivewaytires
*/

/* ==========================================================================
   Driveway Tires — main stylesheet
   ========================================================================== */

:root {
  --blue: #4a90e2;
  --blue-dark: #3a78c2;
  --ink: #1c1c1c;
  --ink-soft: #4b4b4b;
  --paper: #ffffff;
  --paper-tint: #f7f9fc;
  --line: #e7e9ee;
  --black: #111111;
  --red: #d1291f;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 30, 60, 0.08);
  --shadow-sm: 0 4px 14px rgba(20, 30, 60, 0.06);
  --max: 1180px;
  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

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

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

section { padding: 72px 0; }

@media (max-width: 700px) {
  section { padding: 48px 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-dark {
  background: var(--black);
  color: #fff;
}
.btn-dark:hover { background: #000; box-shadow: var(--shadow-sm); }

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover { background: var(--blue-dark); box-shadow: var(--shadow-sm); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 0.95rem;
  order: 1;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links a.active {
  color: var(--ink);
  border-color: var(--blue);
}

.brand {
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark { width: 46px; height: 46px; flex-shrink: 0; }
.logo-img {
  width: auto;
  height: 64px;
  object-fit: contain;
}
@media (max-width: 860px) {
  .logo-img { height: 52px; }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--blue-dark);
}
.brand-text .tag {
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--blue);
  font-weight: 600;
}

.nav-cta { order: 3; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  order: 4;
}

@media (max-width: 860px) {
  .nav-wrap { flex-wrap: wrap; }
  .brand { order: 1; }
  .nav-toggle { display: block; order: 2; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-links {
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 300px; padding-top: 12px; }
  .nav-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 12, 20, 0.82) 0%, rgba(10, 12, 20, 0.35) 55%, rgba(10, 12, 20, 0.55) 100%);
}

.hero-inner {
  position: relative;
  padding: 56px 0 64px;
  max-width: 620px;
}

.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); color: #fff; }
.hero p { color: #e7e9ee; font-size: 1.05rem; }

/* generic page hero (no photo, for services/locations/contact titles) */

.page-hero {
  text-align: center;
  padding: 64px 0 8px;
}
.page-hero p { max-width: 560px; margin-inline: auto; }

/* ---------- Section helpers ---------- */

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-weight: 700;
}

.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.center { text-align: center; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}
.two-col.reverse .col-media { order: 2; }
@media (max-width: 800px) {
  .two-col.reverse .col-media { order: -1; }
}

.col-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- Stat badge on media ---------- */

.media-frame { position: relative; }
.stat-badge {
  position: absolute;
  right: -18px;
  bottom: -18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  display: flex;
  gap: 26px;
  box-shadow: var(--shadow);
}
.stat-badge div strong { display: block; font-family: var(--font-head); font-size: 1.6rem; }
.stat-badge div span { font-size: 0.78rem; opacity: 0.9; }
@media (max-width: 500px) {
  .stat-badge { right: 10px; bottom: -16px; padding: 14px 16px; gap: 16px; }
}

/* ---------- Cards grid (services) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }

.card-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eaf1fc;
  color: var(--blue);
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.9rem; margin-bottom: 0; }

/* ---------- Testimonials ---------- */

.testimonials {
  background: #0e0e10;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.testimonials .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) { .testimonials .container { grid-template-columns: 1fr; } }

.testi-card { text-align: center; padding: 12px; }
.stars { color: #ffb400; letter-spacing: 3px; margin-bottom: 14px; font-size: 1.1rem; }
.testi-card p { color: #e2e2e6; font-style: italic; }
.testi-card .who { color: #9fa3ad; font-size: 0.85rem; font-style: normal; margin-top: 12px; }

.testimonials.single .container { grid-template-columns: 1fr; max-width: 720px; }

/* ---------- Locations ---------- */

.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .locations-grid { grid-template-columns: 1fr; } }

.location-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.location-card .map-embed {
  width: 100%;
  height: 200px;
  border: 0;
}
.location-card .info { padding: 18px 20px 22px; }
.location-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.location-card .addr { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 10px; }
.location-card .hours { font-size: 0.85rem; color: var(--blue-dark); font-weight: 600; margin-bottom: 16px; }
.location-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.location-card .btn { padding: 10px 18px; font-size: 0.85rem; }

/* ---------- Forms ---------- */

.form-card {
  background: var(--paper-tint);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d7dce4;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.18);
}

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  display: none;
}
.form-status.ok { color: #1e8e3e; display: block; }
.form-status.err { color: var(--red); display: block; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--black);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9bcc3; max-width: 520px; margin: 0 auto 26px; }

/* ---------- Bottom photo band ---------- */

.photo-band {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo-band img { filter: grayscale(1); width: 100%; height: 260px; object-fit: cover; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: #b9bcc3;
  padding: 48px 0 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-inner h3 { color: #fff; margin-bottom: 6px; }
.footer-inner .tagline { font-size: 0.9rem; margin-bottom: 18px; }
.footer-links a {
  color: #b9bcc3;
  text-decoration: underline;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 6px;
}
.footer-links a:hover { color: #fff; }
.footer-nav a {
  text-decoration: underline;
  font-weight: 600;
  color: #fff;
}
.footer-bottom {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #7c8794;
}

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

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