/* ============================================
   DUNFERMLINE DRIVING SCHOOL — STYLES
   Design concept: asphalt + lane-markings + signage
   ============================================ */

:root {
  /* Color tokens */
  --asphalt: #1E2023;
  --asphalt-soft: #2A2D31;
  --concrete: #ECEEEA;
  --concrete-dark: #DDE0D9;
  --route-blue: #1D4E8F;
  --route-blue-dark: #163D70;
  --signal-yellow: #F2B705;
  --pass-green: #2F7A4F;
  --ink: #1A1A1A;
  --ink-soft: #4A4D4F;
  --chalk: #F5F4F0;
  --chalk-soft: #C7CAC6;
  --line-dash: rgba(26, 26, 26, 0.18);
  --line-dash-dark: rgba(245, 244, 240, 0.22);

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

  /* Layout */
  --max-width: 1160px;
  --radius: 4px;
}

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

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

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

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

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

a { color: var(--route-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--route-blue);
  margin-bottom: 0.6em;
  display: inline-block;
}
.eyebrow.on-dark { color: var(--signal-yellow); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--route-blue);
  outline-offset: 2px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--signal-yellow);
  color: var(--ink);
}
.btn-primary:hover { background: #ffc626; }
.btn-outline-dark {
  background: transparent;
  border-color: var(--chalk-soft);
  color: var(--chalk);
}
.btn-outline-dark:hover { border-color: var(--chalk); background: rgba(255,255,255,0.06); }
.btn-outline-light {
  background: transparent;
  border-color: var(--route-blue);
  color: var(--route-blue);
}
.btn-outline-light:hover { background: rgba(29,78,143,0.08); }

/* ============ LANE-LINE DIVIDER ============ */
.lane-divider {
  height: 0;
  border-top: 3px dashed var(--line-dash);
  margin: 0;
}
.lane-divider.on-dark { border-top-color: var(--line-dash-dark); }

/* ============ HEADER / NAV ============ */
.site-header {
  background: var(--asphalt);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px dashed var(--line-dash-dark);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--chalk);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo img {
  height: 44px;
  width: auto;
  border-radius: 4px;
}
.logo .plate {
  background: var(--chalk);
  color: var(--asphalt);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 3px;
  border: 2px solid var(--route-blue);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--chalk-soft);
  font-weight: 600;
  font-size: 0.94rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--chalk); text-decoration: none; }
.nav-links a.active { color: var(--signal-yellow); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  font-family: var(--font-mono);
  color: var(--chalk-soft);
  font-size: 0.9rem;
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--chalk);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

@media (min-width: 700px) {
  .nav-phone { display: inline; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--asphalt);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 3px dashed var(--line-dash-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 24px; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-cta .btn-primary { padding: 10px 16px; font-size: 0.88rem; }
}

/* ============ HERO ============ */
.hero {
  background: var(--asphalt);
  color: var(--chalk);
  padding: 72px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { color: var(--chalk); }
.hero .lede { color: var(--chalk-soft); font-size: 1.15rem; max-width: 480px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.road-graphic {
  position: relative;
  height: 100%;
  min-height: 220px;
}
.road-graphic svg { width: 100%; height: auto; }

.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--asphalt-soft);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { display: none; }
}

.svg-road-fill { fill: var(--asphalt-soft); }
.svg-road-edge { stroke: var(--chalk-soft); stroke-width: 2; opacity: 0.5; }
.svg-road-line { stroke: var(--chalk); stroke-width: 4; stroke-dasharray: 14 14; }
.svg-plate-bg { fill: var(--chalk); }
.svg-plate-border { stroke: var(--signal-yellow); stroke-width: 4; fill: none; }
.svg-plate-text { fill: var(--asphalt); font-family: var(--font-mono); font-weight: 700; }
.svg-sun { fill: var(--signal-yellow); opacity: 0.9; }

/* ============ SECTIONS ============ */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section.on-dark { background: var(--asphalt); color: var(--chalk); }
.section.on-dark h2 { color: var(--chalk); }
.section.on-dark p { color: var(--chalk-soft); }
.section-head { max-width: 640px; margin-bottom: 44px; }

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--chalk);
  border: 1px solid var(--concrete-dark);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: 0.4em; }
.card .icon {
  width: 40px; height: 40px;
  margin-bottom: 16px;
  color: var(--route-blue);
}

/* Pricing cards */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--chalk);
  border: 1px solid var(--concrete-dark);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--route-blue);
  position: relative;
}
.price-card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--signal-yellow);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 3px;
  position: absolute;
  top: -12px;
  right: 20px;
}
.price-card .price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  margin: 8px 0 4px;
  color: var(--route-blue-dark);
}
.price-card .price span { font-family: var(--font-mono); font-size: 0.9rem; color: var(--ink-soft); font-weight: 400; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0; flex-grow: 1; }
.price-card li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 0.93rem;
  color: var(--ink-soft);
  border-top: 1px dashed var(--concrete-dark);
}
.price-card li:first-child { border-top: none; }
.price-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--pass-green);
  font-weight: 700;
}

/* ============ MILE-MARKER ROUTE TIMELINE ============ */
.route-timeline {
  position: relative;
  padding-left: 56px;
}
.route-timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 6px;
  border-left: 3px dashed var(--line-dash);
}
.on-dark .route-timeline::before { border-left-color: var(--line-dash-dark); }
.route-stop {
  position: relative;
  margin-bottom: 40px;
}
.route-stop:last-child { margin-bottom: 0; }
.route-stop .marker {
  position: absolute;
  left: -56px;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--route-blue);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--signal-yellow);
}
.route-stop h3 { margin-bottom: 0.3em; }
.route-stop p { margin-bottom: 0; }

/* ============ TESTIMONIAL ============ */
.testimonial {
  background: var(--chalk);
  border-left: 6px solid var(--signal-yellow);
  padding: 32px 36px;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
}
.testimonial cite {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--ink-soft);
}

/* ============ CTA BAND ============ */
.cta-band {
  background: var(--route-blue);
  color: var(--chalk);
  padding: 56px 0;
  text-align: center;
}
.cta-band h2 { color: var(--chalk); margin-bottom: 0.3em; }
.cta-band p { color: rgba(245,244,240,0.85); }

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px dashed var(--concrete-dark);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--route-blue);
  font-family: var(--font-body);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: 12px; }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-detail {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-detail .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--route-blue);
  width: 90px;
  flex-shrink: 0;
  padding-top: 2px;
}
.hours-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.hours-table td { padding: 6px 0; font-size: 0.93rem; border-bottom: 1px dashed var(--concrete-dark); }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); color: var(--ink-soft); }

form.lesson-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.85rem; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--concrete-dark);
  border-radius: var(--radius);
  background: var(--chalk);
  color: var(--ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--route-blue);
  outline: none;
}
.map-embed {
  border: 1px solid var(--concrete-dark);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 28px;
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--asphalt);
  color: var(--chalk-soft);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 {
  color: var(--chalk);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--chalk-soft); }
.footer-grid a:hover { color: var(--chalk); }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--asphalt-soft);
  color: var(--chalk-soft);
  border: 1px solid rgba(245,244,240,0.15);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.social-links a:hover {
  background: var(--signal-yellow);
  color: var(--asphalt);
  transform: translateY(-2px);
  text-decoration: none;
}
.social-links svg {
  width: 18px;
  height: 18px;
}
.footer-bottom {
  border-top: 1px dashed var(--line-dash-dark);
  padding-top: 24px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============ PAGE HERO (non-home pages) ============ */
.page-hero {
  background: var(--asphalt);
  color: var(--chalk);
  padding: 56px 0 64px;
}
.page-hero h1 { color: var(--chalk); }
.page-hero p { color: var(--chalk-soft); max-width: 600px; }

/* ============ ABOUT: PEOPLE ============ */
.person-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  background: var(--chalk);
  border: 1px solid var(--concrete-dark);
  border-radius: var(--radius);
  padding: 28px;
}
@media (max-width: 600px) { .person-card { grid-template-columns: 1fr; } }
.avatar-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--route-blue), var(--asphalt-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
}
.avatar-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 20%;
}
.values-list { list-style: none; padding: 0; margin: 0; }
.values-list li {
  padding: 14px 0;
  border-top: 1px dashed var(--concrete-dark);
  display: flex;
  gap: 14px;
}
.values-list li:first-child { border-top: none; }
.values-list strong { color: var(--ink); font-family: var(--font-display); }

/* ============ VEHICLE SECTION (Lessons page) ============ */
.vehicle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.vehicle-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--asphalt-soft);
}
.vehicle-photo img { width: 100%; display: block; }
@media (max-width: 860px) {
  .vehicle-grid { grid-template-columns: 1fr; }
}
