/* ==========================================================================
   Halifax Tint Plus
   Tint black and graphite, with the red from their logo used sparingly.
   Mobile-first: 480 / 768 / 1024.
   ========================================================================== */

:root {
  /* Colors */
  --ink: #111315;
  --ink-deep: #0a0b0c;
  --ink-soft: #1c1f22;
  --graphite: #2a2e33;
  --red: #e3412b;
  --red-light: #f26a55;
  --red-glow: #ff9a7a;
  --red-btn-top: #ec4f39;
  --red-btn: #d23520;
  --red-btn-bottom: #b2261a;
  --red-text: #b42a18;
  --red-text-dark: #8e1f11;
  --paper: #ffffff;
  --light: #f4f3f1;
  --white: #ffffff;
  --text: #16181a;
  --text-muted: #52575d;
  --text-on-dark: #eef0f2;
  --text-on-dark-muted: #a9b0b8;
  --line: #dcdad6;
  --line-dark: rgba(255, 255, 255, 0.14);
  --input-border: #9da2a8;
  --success-bg: #e6f0e6;
  --success: #2c6a33;
  --error: #b3261e;
  --error-bg: #fbeceb;
  --btn-dark-top: #3a3f45;
  --text-on-photo: #d9dde1;
  --star: #e8a317;

  /* RGB channels for overlays */
  --ink-rgb: 17, 19, 21;
  --red-rgb: 227, 65, 43;

  /* Typography */
  --font-heading: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-body: 1.0625rem;
  --fs-small: 0.94rem;
  --fs-h1: clamp(2.4rem, 1.5rem + 3.6vw, 4.1rem);
  --fs-h2: clamp(1.9rem, 1.35rem + 2.1vw, 2.9rem);
  --fs-h3: 1.35rem;
  --fs-lead: clamp(1.1rem, 1rem + 0.4vw, 1.22rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-pad: clamp(4rem, 3rem + 4vw, 6.5rem);
  --container-max: 1200px;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --nav-height: 68px;
  --marquee-h: 3.25rem;
  --strip-h: 3.25rem;
  --below-hero: calc(var(--marquee-h) + var(--strip-h));

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-photo: 0 18px 40px rgba(var(--ink-rgb), 0.25);
  --shadow-nav: 0 2px 18px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 4px 16px rgba(var(--ink-rgb), 0.06), 0 1px 3px rgba(var(--ink-rgb), 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-card-hover: 0 28px 56px rgba(var(--ink-rgb), 0.14), 0 10px 20px rgba(var(--ink-rgb), 0.08);
  --shadow-btn: 0 4px 15px rgba(var(--red-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --shadow-btn-hover: 0 12px 30px rgba(var(--red-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --shadow-btn-pressed: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  --focus-ring: 0 0 0 3px rgba(var(--red-rgb), 0.35);

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  scroll-padding-bottom: 6rem; /* keeps focused items clear of the chat button */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h2 { font-size: var(--fs-h2); margin-bottom: var(--space-md); }
h3 { font-size: var(--fs-h3); }
h2 span.line { display: block; }

p, li, dd, blockquote, figcaption { overflow-wrap: break-word; }
a { color: inherit; }
ul { list-style: none; padding: 0; }
dd { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.container {
  width: min(100% - 2 * var(--gutter), var(--container-max));
  margin-inline: auto;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  z-index: 1000;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  background: var(--red-btn);
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: var(--space-md); }

.section { padding-block: var(--section-pad); }
.section--paper { background: var(--paper); }

.lead { max-width: 36em; font-size: var(--fs-lead); color: var(--text-muted); }

.inline-link { color: var(--red-text); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.inline-link:hover { color: var(--red-text-dark); }

/* ==========================================================================
   Buttons and links
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-lg { min-height: 56px; padding: 0.9rem 1.7rem; font-size: 1.15rem; }
.btn-block { width: 100%; }

/* White on the middle of this red is 4.8:1 */
.btn-primary {
  color: var(--white);
  background: linear-gradient(180deg, var(--red-btn-top) 0%, var(--red-btn) 50%, var(--red-btn-bottom) 100%);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover { box-shadow: var(--shadow-btn-hover); }
.btn-primary:active { box-shadow: var(--shadow-btn-pressed); }

.btn-nav { padding-inline: 1.4rem; border-radius: var(--radius-full); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--red-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}

.text-link:hover { color: var(--red-text-dark); text-decoration-color: var(--red-text-dark); }
.text-link--light { color: var(--white); }
.text-link--light:hover { color: var(--red-glow); text-decoration-color: var(--red-glow); }
.link-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled,
.site-header.menu-open {
  border-bottom-color: var(--line-dark);
  box-shadow: var(--shadow-nav);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--nav-height);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  margin-right: auto;
  color: var(--white);
  text-decoration: none;
}

.logo img { width: 44px; height: 44px; object-fit: contain; }
.logo-name { font-family: var(--font-heading); font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }

/* Tap-to-call stays in the bar on phones */
.btn-call-mobile { min-height: 44px; padding: 0.5rem 0.95rem; border-radius: var(--radius-full); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu: solid opaque panel */
.nav-menu {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  left: 0;
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: var(--space-sm) var(--gutter) var(--space-xl);
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.nav-menu.open { visibility: visible; opacity: 1; pointer-events: auto; }

.nav-links a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-on-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark);
}

.nav-links a:hover { color: var(--red-glow); }
.nav-menu .btn-nav { width: 100%; margin-top: var(--space-lg); }

/* ==========================================================================
   Hero: their own vehicles in a stack beside the headline
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-3xl);
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(ellipse at 85% 30%, rgba(var(--red-rgb), 0.14), transparent 55%),
    linear-gradient(90deg, var(--ink-deep) 0%, var(--ink) 60%, var(--ink-soft) 100%);
}

.hero-grid { display: grid; gap: var(--space-2xl); align-items: center; }
.hero-content { max-width: 660px; }

.hero-kicker {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--red-light);
}

.hero-title { margin-bottom: var(--space-lg); font-size: var(--fs-h1); font-weight: 800; line-height: 1.03; }
.hero-text { max-width: 33em; margin-bottom: var(--space-xl); font-size: var(--fs-lead); color: var(--text-on-photo); }

.hero-actions, .cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}

.highlight { color: var(--red-light); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .highlight {
    color: transparent;
    background: linear-gradient(90deg, var(--red-light) 0%, var(--red-glow) 25%, var(--red-light) 50%, var(--red) 75%, var(--red-glow) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.hero-quote {
  max-width: 440px;
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-md);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-quote blockquote { margin-bottom: 0.35rem; font-size: 1.1rem; font-weight: 500; line-height: 1.4; }
.hero-quote figcaption { font-size: var(--fs-small); color: var(--text-on-dark-muted); }

/* Photo stack: one tall, two square */
.hero-photos {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-sm);
  max-width: 520px;
}

.hero-photo {
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--graphite);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.hero-photo--main { grid-row: span 2; aspect-ratio: auto; }
.hero-photo picture, .hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Marquee and area strip
   ========================================================================== */

.marquee {
  display: flex;
  align-items: center;
  height: var(--marquee-h);
  overflow: hidden;
  background: var(--ink-deep);
  border-top: 1px solid var(--line-dark);
}

.marquee-track { display: flex; width: max-content; }

.marquee-item {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-on-dark);
  white-space: nowrap;
}

.marquee-item::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-inline: 1.75rem;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(var(--red-rgb), 0.6);
}

.area-strip { display: flex; align-items: center; min-height: var(--strip-h); padding: 0.6rem 0; color: var(--white); background: var(--red-btn); }

.area-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-xl);
  font-weight: 600;
}

/* ==========================================================================
   Services: sticky intro, list with rules
   ========================================================================== */

.services-layout { display: grid; gap: var(--space-2xl); }
.services-intro .lead { margin-bottom: var(--space-md); }
.services-also { max-width: 30em; margin-bottom: var(--space-xs); padding-left: var(--space-md); color: var(--text-muted); border-left: 3px solid var(--red); }

.service-group + .service-group { margin-top: var(--space-2xl); }

.group-title {
  padding-bottom: var(--space-sm);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red-text);
  border-bottom: 2px solid var(--ink);
}

.service {
  display: grid;
  gap: 0.3rem;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--line);
}

.service h4 { font-size: 1.35rem; }
.service p { max-width: 40em; color: var(--text-muted); }

/* ==========================================================================
   Proof band
   ========================================================================== */

.proof { color: var(--text-on-dark); background: var(--ink); }

.proof-title { max-width: 16em; margin-bottom: 0; font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.8rem); font-weight: 800; line-height: 1.04; }
.proof-title > span { display: block; }
.proof-accent { color: var(--red-light); }
.count { display: inline-block; min-width: 1.8em; font-variant-numeric: tabular-nums; }

.facts {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line-dark);
}

.fact dt { margin-bottom: 0.3rem; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--white); }
.fact dd { color: var(--text-on-dark-muted); }

.certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); margin-top: var(--space-2xl); }

.cert {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--white);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  cursor: zoom-in;
}

.cert img { width: 100%; height: 100%; object-fit: cover; }
.cert:hover { border-color: var(--red); }

/* ==========================================================================
   Recent work gallery
   ========================================================================== */

.work-head { max-width: 42em; margin-bottom: var(--space-xl); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }

.photo-zoom {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}

.photo-zoom img { width: 100%; height: 100%; object-fit: cover; }
.photo-zoom::after { content: ''; position: absolute; inset: 0; background: rgba(var(--ink-rgb), 0); }
.photo-zoom:hover::after, .photo-zoom:focus-visible::after { background: rgba(var(--ink-rgb), 0.35); }
.photo-zoom:hover { box-shadow: var(--shadow-card-hover); }

.zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  color: var(--white);
  background: rgba(var(--ink-rgb), 0.7);
  border-radius: 50%;
  opacity: 0;
}

.zoom-icon svg { width: 22px; height: 22px; }
.photo-zoom:hover .zoom-icon, .photo-zoom:focus-visible .zoom-icon { opacity: 1; }

/* ==========================================================================
   About
   ========================================================================== */

.about-grid { display: grid; gap: var(--space-2xl); align-items: center; }

.about-photo {
  max-width: 440px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-photo);
}

.about-photo picture, .about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { max-width: 34em; margin-bottom: var(--space-md); color: var(--text-muted); }
.about-text p:first-of-type { font-size: var(--fs-lead); color: var(--text); }

/* ==========================================================================
   Reviews
   ========================================================================== */

.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-xl);
  margin-bottom: var(--space-lg);
}

.reviews-head h2 { margin-bottom: 0; }

.rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--red-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 5px;
}

.rating:hover { color: var(--red-text-dark); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars svg { width: 18px; height: 18px; }

.review-feature { max-width: 52rem; padding-top: var(--space-xl); border-top: 2px solid var(--ink); }

.review-feature blockquote {
  margin-bottom: var(--space-lg);
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.review-feature figcaption, .review-by { font-size: var(--fs-small); }
.review-name { font-weight: 700; }
.review-source { color: var(--text-muted); }
.review-source::before { content: '\00b7'; margin: 0 0.4rem; }

.review-list { display: grid; gap: 0 var(--space-3xl); margin-top: var(--space-2xl); border-top: 1px solid var(--line); }

.review {
  padding: var(--space-lg) var(--space-md) var(--space-lg) 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}

.review blockquote { margin-bottom: var(--space-xs); font-size: 1.1rem; }

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta {
  position: relative;
  isolation: isolate;
  padding-block: var(--section-pad);
  overflow: hidden;
  color: var(--white);
  background: var(--ink-deep);
}

.cta-bg { position: absolute; inset: 0; z-index: -2; }
.cta-bg picture, .cta-bg img { width: 100%; height: 100%; }
.cta-bg img { object-fit: cover; filter: blur(3px); }
.cta-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 11, 12, 0.94) 0%, rgba(10, 11, 12, 0.85) 60%, rgba(10, 11, 12, 0.7) 100%); }
.cta-inner { max-width: 620px; }
.cta-inner p { margin-bottom: var(--space-xl); font-size: var(--fs-lead); color: var(--text-on-photo); }

/* ==========================================================================
   Contact and form
   ========================================================================== */

.contact-grid { display: grid; gap: var(--space-2xl); align-items: start; }
.contact-info > p { max-width: 30em; margin-bottom: var(--space-lg); font-size: var(--fs-lead); color: var(--text-muted); }

.contact-details { border-top: 2px solid var(--ink); }
.contact-details > div { padding: var(--space-sm) 0; border-bottom: 1px solid var(--line); }
.contact-details dt { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.contact-details dd { font-size: 1.1rem; font-weight: 600; }

.contact-details a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--red-text);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.contact-details a:hover { color: var(--red-text-dark); }
.contact-socials { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); }

.contact-form-wrap {
  padding: var(--space-xl) var(--space-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), 0 20px 50px rgba(var(--ink-rgb), 0.08);
}

.form-title { margin-bottom: 0.2rem; font-size: 1.7rem; }
.form-hint { margin-bottom: var(--space-lg); font-size: var(--fs-small); color: var(--text-muted); }
.form-row { display: grid; gap: 0 var(--space-md); }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: var(--space-md); }
.form-group label { font-size: 0.97rem; font-weight: 600; }
.req { color: var(--red-text); }
.field-hint { font-size: 0.88rem; color: var(--text-muted); }

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  background: var(--white);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
}

.form-group select {
  padding-right: 2.5rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath fill='none' stroke='%2352575d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.form-group textarea { min-height: 130px; resize: vertical; }

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--red-btn);
  box-shadow: var(--focus-ring);
}

.form-group [aria-invalid="true"] { border-color: var(--error); }

.field-error { display: flex; align-items: center; gap: 0.4rem; font-size: var(--fs-small); font-weight: 600; color: var(--error); }

.field-error::before {
  content: '!';
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  background: var(--error);
  border-radius: 50%;
}

.field-error[hidden], .form-error[hidden], .form-success[hidden], .form-fields[hidden] { display: none; }

.form-privacy { margin-top: var(--space-sm); font-size: var(--fs-small); }
.form-privacy a { display: inline-block; padding-block: 0.6rem; color: var(--red-text); text-decoration-thickness: 2px; text-underline-offset: 5px; }

.form-error {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--error);
  background: var(--error-bg);
  border-left: 4px solid var(--error);
  border-radius: var(--radius-sm);
}

.form-error a { color: var(--error); }
.form-success { padding: var(--space-xl) var(--space-lg); background: var(--success-bg); border-left: 4px solid var(--success); border-radius: var(--radius-sm); }
.form-success:focus { outline: none; }
.form-success h3 { margin-bottom: var(--space-xs); }
.form-success a { font-weight: 600; color: var(--red-text); }

/* Honeypot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Legal and 404 pages
   ========================================================================== */

.legal { max-width: 760px; padding-block: calc(var(--nav-height) + var(--space-2xl)) var(--space-3xl); }
.legal h1 { margin-bottom: var(--space-xs); font-size: var(--fs-h2); }
.legal h2 { margin: var(--space-xl) 0 var(--space-sm); font-size: 1.45rem; }
.legal p, .legal li { color: var(--text-muted); }
.legal p { margin-bottom: var(--space-md); }
.legal ul { margin-bottom: var(--space-md); padding-left: 1.25rem; list-style: disc; }
.legal li { margin-bottom: var(--space-xs); }
.legal strong { color: var(--text); }
.legal a:not(.btn) { color: var(--red-text); }
.legal-updated { font-size: var(--fs-small); }

.not-found-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); margin-top: var(--space-lg); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { padding: var(--space-3xl) 0 5rem; color: var(--text-on-dark-muted); background: var(--ink-deep); }
.footer-grid { display: grid; gap: var(--space-xl); padding-bottom: var(--space-2xl); }
.logo--footer { margin-right: 0; }
.logo--footer img { width: 56px; height: 56px; }
.footer-brand p { max-width: 320px; margin-top: var(--space-md); }
.site-footer h2 { margin-bottom: var(--space-xs); font-size: 1.15rem; color: var(--white); }

.footer-nav a, .footer-contact a, .footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-contact li:not(:has(a)) { padding-block: 0.4rem; }
.footer-nav a:hover, .footer-contact a:hover, .footer-bottom a:hover { color: var(--red-glow); }

.socials { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }

.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text-on-dark);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
}

.socials a:hover { color: var(--white); background: var(--red-btn); border-color: var(--red-btn); }
.socials svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-lg);
  padding-top: var(--space-md);
  font-size: var(--fs-small);
  border-top: 1px solid var(--line-dark);
}

.footer-bottom p { display: flex; align-items: center; min-height: 44px; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 4px; }

/* ==========================================================================
   Photo lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 4.5rem var(--gutter);
  background: rgba(10, 11, 12, 0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox-figure { max-width: min(760px, 100%); }

.lightbox-img {
  width: auto;
  max-width: 100%;
  max-height: 74vh;
  margin-inline: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption { margin: var(--space-md) auto 0; font-size: var(--fs-small); color: var(--text-on-dark-muted); text-align: center; }

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-btn:hover { background: var(--red-btn); border-color: var(--red-btn); }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { top: var(--space-md); right: var(--space-md); }
.lightbox-prev, .lightbox-next { bottom: var(--space-md); }
.lightbox-prev { left: calc(50% - 56px); }
.lightbox-next { right: calc(50% - 56px); }

/* Skip rendering work for below-fold sections until needed */
#about, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 379px) {
  .logo-name { font-size: 1rem; }
  .btn-call-mobile span { display: none; }
}

@media (min-width: 480px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .contact-form-wrap { padding: var(--space-2xl) var(--space-xl); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .certs { grid-template-columns: repeat(4, 1fr); }
  .review-list { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.3fr; }
  .about-grid { grid-template-columns: 5fr 7fr; gap: var(--space-3xl); }

  .lightbox-prev, .lightbox-next { top: 50%; bottom: auto; margin-top: -24px; }
  .lightbox-prev { left: var(--space-lg); }
  .lightbox-next { right: var(--space-lg); }
}

@media (min-width: 1024px) {
  :root { --nav-height: 80px; --strip-h: 3.75rem; }

  .nav { gap: var(--space-xl); }
  .nav-toggle, .btn-call-mobile { display: none; }
  .logo img { width: 52px; height: 52px; }
  .logo-name { font-size: 1.25rem; }

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links { display: flex; gap: var(--space-lg); }
  .nav-links a { min-height: 44px; font-size: 1rem; border-bottom: 0; }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
  }

  .nav-links a:hover::after { width: 100%; }
  .nav-menu .btn-nav { width: auto; margin-top: 0; }

  /* Jordan's rule: hero, marquee and strip all on the first desktop screen */
  .hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--below-hero));
    min-height: calc(100svh - var(--below-hero));
    padding: calc(var(--nav-height) + 1.5rem) 0 2rem;
  }

  .hero-grid { grid-template-columns: 8fr 5fr; gap: var(--space-2xl); }
  .hero-content { max-width: 720px; }
  .hero-title { font-size: clamp(2.3rem, min(4.2vw, 6.6vh), 4rem); margin-bottom: var(--space-md); }
  .hero-text { max-width: 38em; margin-bottom: var(--space-lg); }
  .hero-quote { margin-top: var(--space-lg); padding-block: 0.75rem; }

  /* On load, the chat button sits inside the red strip, clear of the marquee
     and the strip's text; it drops to its usual spot once the page scrolls */
  .site-header:not(.scrolled) ~ div > #cc-chat-toggle { bottom: calc((var(--strip-h) - 53px) / 2); }
  .area-strip-inner { justify-content: flex-start; gap: var(--space-xl) 3rem; padding-right: 13rem; }
  .hero-photos { justify-self: end; width: 100%; max-height: calc(100svh - var(--below-hero) - var(--nav-height) - 4rem); aspect-ratio: 3 / 2; }
  .hero-photo { aspect-ratio: auto; }

  .area-strip { padding: 0; height: var(--strip-h); }
  .area-strip-inner { flex-wrap: nowrap; white-space: nowrap; }

  .services-layout { grid-template-columns: 1fr 2fr; gap: var(--space-3xl); }
  .services-intro { position: sticky; top: calc(var(--nav-height) + var(--space-xl)); align-self: start; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .contact-grid { grid-template-columns: 5fr 7fr; gap: var(--space-3xl); }
}

/* ==========================================================================
   Motion (only when the visitor has not asked for reduced motion)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* --- Transitions --- */
  .btn { transition: all 0.4s var(--ease-out); }
  .btn-primary:hover { transform: translateY(-3px); }
  .btn-primary:active { transform: translateY(0); }
  .text-link, .rating, .inline-link { transition: color var(--transition-fast), text-decoration-color var(--transition-fast); }
  .site-header { transition: border-color var(--transition-base), box-shadow var(--transition-base); }
  .nav-menu { transform: translateY(-6px); transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base); }
  .nav-menu.open { transform: translateY(0); }
  .nav-toggle-bar { transition: transform var(--transition-base), opacity var(--transition-fast); }
  .nav-links a { transition: color var(--transition-fast); }
  .nav-links a::after { transition: width var(--transition-base); }
  .socials a { transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
  .lightbox-btn { transition: background-color var(--transition-fast), border-color var(--transition-fast); }
  .form-group input, .form-group textarea, .form-group select { transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
  .cert { transition: border-color var(--transition-base), transform 0.5s var(--ease-out); }
  .cert:hover { transform: translateY(-6px); }

  .contact-details > div { transition: transform 0.3s ease; }
  .contact-details > div:has(a):hover { transform: translateX(8px); }
  .footer-nav a, .footer-contact a { transition: transform 0.3s ease, color var(--transition-fast); }
  .footer-nav a:hover, .footer-contact a:hover { transform: translateX(4px); }

  /* --- Scroll reveals (JS adds .visible) --- */
  .js .fade-in {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
  }

  .js .fade-in.visible { opacity: 1; transform: translateY(0); }
  .js .fade-in:nth-child(2) { transition-delay: 0.08s; }
  .js .fade-in:nth-child(3) { transition-delay: 0.16s; }
  .js .fade-in:nth-child(4) { transition-delay: 0.24s; }
  .js .fade-in:nth-child(5) { transition-delay: 0.32s; }
  .js .fade-in:nth-child(6) { transition-delay: 0.4s; }

  /* --- Services: rule draws in, accent on hover --- */
  .service { transition: padding 0.4s var(--ease-out), border-color 0.4s var(--ease-out); }
  .service:hover { padding-left: var(--space-md); border-bottom-color: var(--red); }

  /* --- Gallery: lift and zoom --- */
  .photo-zoom { transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
  .photo-zoom img { transition: transform var(--transition-slow); }
  .photo-zoom::after { transition: background-color var(--transition-base); }
  .zoom-icon { transform: scale(0.8); transition: opacity var(--transition-base), transform var(--transition-base); }
  .photo-zoom:hover { transform: translateY(-6px); }
  .photo-zoom:hover img { transform: scale(1.05); }
  .photo-zoom:hover .zoom-icon, .photo-zoom:focus-visible .zoom-icon { transform: scale(1); }

  /* --- Reviews: light lift and accent border --- */
  .review { transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), padding 0.4s var(--ease-out); }
  .review:hover { transform: translateY(-6px); padding-left: var(--space-md); border-left-color: var(--red); }

  .contact-form-wrap { transition: box-shadow 0.5s var(--ease-out); }
  .contact-form-wrap:hover { box-shadow: var(--shadow-card-hover); }

  /* --- Rating stars pop in --- */
  .reviews-head.visible .stars svg { animation: star-pop 0.3s var(--ease-out) both; }
  .reviews-head.visible .stars svg:nth-child(1) { animation-delay: 0.2s; }
  .reviews-head.visible .stars svg:nth-child(2) { animation-delay: 0.3s; }
  .reviews-head.visible .stars svg:nth-child(3) { animation-delay: 0.4s; }
  .reviews-head.visible .stars svg:nth-child(4) { animation-delay: 0.5s; }
  .reviews-head.visible .stars svg:nth-child(5) { animation-delay: 0.6s; }

  /* --- Hero --- */
  .hero-photo--main img { animation: hero-zoom-out 20s ease-out forwards; }
  .hero-photo:not(.hero-photo--main) { animation: slide-up 1s var(--ease-out) both; }
  .hero-photo:nth-child(2) { animation-delay: 0.5s; }
  .hero-photo:nth-child(3) { animation-delay: 0.7s; }
  .hero-kicker { animation: slide-down 0.8s var(--ease-out) 0.2s both; }
  .hero-text { animation: slide-up 1s var(--ease-out) 0.45s both; }
  .hero-actions { animation: slide-up 1s var(--ease-out) 0.6s both; }
  .hero-quote { animation: slide-up 1s var(--ease-out) 0.8s both; }
  .highlight { animation: gold-shimmer 4s ease 1s infinite; }
  .btn-pulse { animation: pulse-glow 2.5s ease-in-out 2s infinite; }
  .btn-nav { animation: nav-cta-pulse 2s ease-in-out infinite; }
  .btn-pulse:hover, .btn-nav:hover { animation-play-state: paused; }

  /* --- Counter --- */
  .proof-title.visible .count { animation: pop-in 0.6s var(--ease-out) both; }
  .proof-title.visible .count.bounce { animation: stat-bounce 0.9s ease; }

  /* --- About photo slow zoom --- */
  .js .about-photo img { transform: scale(1.15); }
  .js .about-photo.visible img { transform: scale(1); transition: transform 12s linear; }

  /* --- Marquee --- */
  .marquee-track { animation: scroll-marquee 8s linear infinite; }

  @media (min-width: 768px) {
    .marquee-track { animation-duration: 12s; }
  }

  /* --- Lightbox --- */
  .lightbox { transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
  .lightbox.open { transition: opacity 0.4s ease, visibility 0s; }
  .lightbox.open .lightbox-img { animation: lightbox-zoom 0.4s var(--ease-out); }

  /* --- Keyframes --- */
  @keyframes hero-zoom-out { from { transform: scale(1.15); } to { transform: scale(1); } }
  @keyframes slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes slide-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

  @keyframes gold-shimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
  }

  @keyframes pop-in {
    from { opacity: 0; transform: scale(0.5) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  @keyframes stat-bounce {
    0%, 100% { transform: translateY(0); }
    15% { transform: translateY(-10px); }
    30% { transform: translateY(0); }
    45% { transform: translateY(-5px); }
    60% { transform: translateY(0); }
    75% { transform: translateY(-2px); }
  }

  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(var(--red-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(var(--red-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  }

  @keyframes nav-cta-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(var(--red-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 4px 24px rgba(var(--red-rgb), 0.55), 0 0 0 4px rgba(var(--red-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  }

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

  @keyframes star-pop {
    0% { opacity: 0; transform: scale(0) rotate(-30deg); }
    70% { opacity: 1; transform: scale(1.2) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
  }

  @keyframes lightbox-zoom {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .strip-extra { display: none; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  #cc-chat-toggle { transition: bottom 0.4s var(--ease-out), transform 0.25s ease, box-shadow 0.25s ease; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .photo-zoom img { transform: none; }
}
