/* ==========================================================================
   Misted Window Repair Milton Keynes — by Dr. Glaze
   Design system: "Clarity" — misted glass resolving into a clear view.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: local('Fraunces');
  font-display: swap;
}

:root {
  /* Colour tokens */
  --colour-ink: #14212E;          /* near-black blue for body text */
  --colour-deep: #0F3460;         /* deep clarity blue - primary */
  --colour-deep-dark: #0A2647;    /* darker shade for hover/depth */
  --colour-clear: #1B98E0;        /* bright glass-clear accent */
  --colour-mist: #E9EEF3;         /* soft misted-glass grey-blue, section bg */
  --colour-mist-2: #DCE4EC;       /* slightly deeper mist for borders */
  --colour-white: #FFFFFF;
  --colour-amber: #E8912D;        /* warm CTA accent — sun through a clean window */
  --colour-amber-dark: #C97318;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --max-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-soft: 0 12px 32px -16px rgba(15, 52, 96, 0.25);
  --shadow-card: 0 4px 18px -6px rgba(15, 52, 96, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--colour-ink);
  background: var(--colour-white);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--colour-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--colour-clear); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-clear);
  background: rgba(27, 152, 224, 0.1);
  border: 1px solid rgba(27, 152, 224, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:focus-visible {
  outline: 3px solid var(--colour-amber);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--colour-amber);
  color: var(--colour-deep-dark);
  box-shadow: 0 8px 20px -8px rgba(232, 145, 45, 0.6);
}
.btn-primary:hover { background: var(--colour-amber-dark); color: var(--colour-white); }

.btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--colour-white);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

.btn-outline {
  background: transparent;
  border-color: var(--colour-deep);
  color: var(--colour-deep);
}
.btn-outline:hover { background: var(--colour-deep); color: var(--colour-white); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--colour-white);
  border-bottom: 1px solid var(--colour-mist-2);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 52px;
  width: auto;
  border-radius: 4px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--colour-deep);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--colour-clear);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--colour-ink);
  font-weight: 600;
  font-size: 0.96rem;
}
.main-nav a:hover { color: var(--colour-clear); text-decoration: none; }

.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.header-phone {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
  white-space: nowrap;
}
.header-phone a {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--colour-deep);
}
.header-phone span {
  font-size: 0.7rem;
  color: #5B6B7A;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--colour-deep);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Hero — signature "defog" element
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--colour-deep-dark) 0%, var(--colour-deep) 60%, #164A80 100%);
  color: var(--colour-white);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 72px 24px 88px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero h1 { color: var(--colour-white); }
.hero h1 em {
  font-style: normal;
  color: var(--colour-clear);
}
.hero-lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
}
.hero-trust strong { color: var(--colour-white); }
.hero-trust .dot::before {
  content: "•";
  margin-right: 8px;
  color: var(--colour-amber);
}

/* The hero van image */
.hero-van-pane {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.15);
  background: #11151A;
}
.hero-van-image {
  width: 100%;
  height: auto;
  display: block;
}
.defog-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  background: rgba(10, 38, 71, 0.55);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
section { padding: 76px 0; }
.section-mist { background: var(--colour-mist); }
.section-deep {
  background: linear-gradient(160deg, var(--colour-deep-dark), var(--colour-deep));
  color: var(--colour-white);
}
.section-deep h2, .section-deep h3 { color: var(--colour-white); }
.section-head {
  max-width: 68ch;
  margin-bottom: 44px;
}
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: #4A5A69; font-size: 1.05rem; }
.section-deep .section-head p { color: rgba(255,255,255,0.78); }

/* Service cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--colour-white);
  border: 1px solid var(--colour-mist-2);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.service-card .icon {
  width: 42px; height: 42px;
  margin-bottom: 16px;
  color: var(--colour-clear);
}
.service-card h3 { margin-bottom: 8px; font-size: 1.12rem; }
.service-card p { color: #4A5A69; font-size: 0.96rem; margin-bottom: 0; }
.service-card a.card-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Feature list (why choose) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.feature-item h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.feature-item h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--colour-amber);
  flex-shrink: 0;
}
.feature-item p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.section-mist .feature-item p, .section-white .feature-item p { color: #4A5A69; }

/* Process steps */
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  counter-reset: step;
  position: relative;
}
.process-step {
  position: relative;
  padding: 0 20px 20px 0;
}
.process-step .step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--colour-clear);
  opacity: 0.55;
  display: block;
  margin-bottom: 6px;
}
.process-step h3 { margin-bottom: 6px; }
.process-step p { color: #4A5A69; font-size: 0.95rem; }

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.testimonial-card {
  background: var(--colour-white);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--colour-amber);
}
.testimonial-card p.quote {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--colour-deep);
  margin-bottom: 14px;
}
.testimonial-card .attrib {
  font-size: 0.88rem;
  color: #5B6B7A;
  font-weight: 700;
}
.stars {
  color: var(--colour-amber);
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--colour-white);
  border: 1px solid var(--colour-mist-2);
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
}
.review-badge strong { color: var(--colour-deep); }
.review-badge-link { display: inline-block; }
.google-badge {
  width: 190px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(15,52,96,0.15));
  transition: transform 0.15s ease;
}
.review-badge-link:hover .google-badge { transform: translateY(-3px); }

/* Work gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gallery-item {
  background: var(--colour-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--colour-mist-2);
}
.gallery-item img {
  width: 100%;
  height: 340px;
  object-fit: contain;
  background: var(--colour-mist);
}
.gallery-caption {
  padding: 16px 18px;
}
.gallery-caption h3 { font-size: 1rem; margin-bottom: 4px; }
.gallery-caption p { font-size: 0.88rem; color: #4A5A69; margin-bottom: 0; }

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

/* FAQ accordion */
.faq-list { max-width: 800px; }
.faq-item {
  border-bottom: 1px solid var(--colour-mist-2);
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--colour-deep);
  padding: 18px 4px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--colour-clear);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 4px 20px;
  color: #4A5A69;
}

/* Areas list */
.areas-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.areas-list li {
  background: var(--colour-white);
  border: 1px solid var(--colour-mist-2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--colour-deep);
}

/* CTA band */
.cta-band {
  background: var(--colour-amber);
  color: var(--colour-deep-dark);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { color: var(--colour-deep-dark); margin-bottom: 6px; }
.cta-band p { margin-bottom: 0; color: rgba(20,33,46,0.8); }
.cta-band .btn-primary {
  background: var(--colour-deep-dark);
  color: var(--colour-white);
  box-shadow: none;
}
.cta-band .btn-primary:hover { background: var(--colour-ink); }

/* Contact block */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-detail {
  margin-bottom: 20px;
}
.contact-detail .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--colour-clear);
  display: block;
  margin-bottom: 4px;
}
.contact-detail .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--colour-deep);
}
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 8px 0; border-bottom: 1px solid var(--colour-mist-2); }
.hours-table td:last-child { text-align: right; font-weight: 700; color: var(--colour-deep); }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #5B6B7A;
  padding: 16px 0 0;
}
.breadcrumb a { color: #5B6B7A; font-weight: 600; }
.breadcrumb a:hover { color: var(--colour-clear); }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(160deg, var(--colour-deep-dark), var(--colour-deep));
  color: var(--colour-white);
  padding: 56px 0 68px;
}
.page-hero h1 { color: var(--colour-white); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 62ch; font-size: 1.05rem; }

/* Simple content pages (legal) */
.prose { max-width: 78ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { color: #4A5A69; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--colour-deep-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .brand-name { color: var(--colour-white); }
.site-footer p { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.footer-col h4 {
  color: var(--colour-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 0.94rem; }
.footer-col a:hover { color: var(--colour-clear); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--colour-mist-2);
  margin-bottom: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-van-pane { max-width: 480px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 1080px) {
  .header-phone span { display: none; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  section { padding: 56px 0; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

.site-header.nav-open .main-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--colour-white);
  padding: 20px 24px 26px;
  border-bottom: 1px solid var(--colour-mist-2);
  box-shadow: var(--shadow-card);
  gap: 16px;
}


/* ==========================================================================
   Area landing pages
   ========================================================================== */
.area-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.area-split .prose { max-width: none; }
.area-split .prose h2 { margin-top: 0.4em; }
.area-split .prose > p:last-child { margin-bottom: 0; }

.area-figure {
  margin: 0;
  background: var(--colour-white);
  border: 1px solid var(--colour-mist-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.area-figure img {
  width: 100%;
  height: 380px;
  object-fit: contain;
  background: var(--colour-mist);
}
.area-figure figcaption {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #4A5A69;
}

/* Google map embed — fallback sits behind the iframe */
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--colour-mist-2);
  box-shadow: var(--shadow-card);
  background: var(--colour-mist);
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}
.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 24px;
  color: #4A5A69;
  font-size: 0.95rem;
}
.map-fallback p { margin: 0; }
.map-fallback strong { color: var(--colour-deep); }

/* Tick list */
.tick-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  color: #4A5A69;
}
.tick-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 0.98rem;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 8px;
  border-left: 2.5px solid var(--colour-clear);
  border-bottom: 2.5px solid var(--colour-clear);
  transform: rotate(-45deg);
}

/* Linked area chips + cards */
.areas-list a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.areas-list li:has(a) { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.areas-list li:has(a):hover {
  border-color: var(--colour-clear);
  box-shadow: var(--shadow-card);
}
.service-card h3 a { color: var(--colour-deep); text-decoration: none; }
.service-card h3 a:hover { color: var(--colour-clear); }

@media (min-width: 901px) and (max-width: 1120px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .area-split { grid-template-columns: 1fr; gap: 32px; }
  .area-figure img { height: 300px; }
  .map-frame { aspect-ratio: 3 / 2; }
}

/* Small-screen header — keeps the bar inside 375px viewports */
@media (max-width: 620px) {
  .header-bar { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .brand { min-width: 0; }
  .brand-logo { height: 44px; }
  .brand-tag { display: none; }
  .header-phone { display: none; }
  .header-cta { gap: 8px; }
  .header-cta .btn { padding: 11px 16px; font-size: 0.9rem; white-space: nowrap; }
}

/* Village cards — 3-up reads better than 4+1 for five areas */
@media (min-width: 901px) {
  .card-grid--areas { grid-template-columns: repeat(3, 1fr); }
}
