/* ============================================================
   CRIMSON PEAK ROOFING — Design Tokens
   Palette inferred from subject: Oklahoma roofing/storm-restoration
   contractor. Deep brick-crimson accent (roofs, urgency, storm alerts)
   + warm stone/charcoal neutrals (shingles, limestone) + a restrained
   gold accent reserved for certifications & ratings.
   ============================================================ */

:root {
  /* ---- Type scale (fluid clamp) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* ---- 4px spacing system ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---- Radius (structural, slightly restrained for a rugged brand) ---- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 1040px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'General Sans', 'Segoe UI', system-ui, sans-serif;
}

/* ---- Light mode (default) — warm stone surfaces, crimson accent ---- */
:root,
[data-theme='light'] {
  --color-bg: #f6f1e8;
  --color-surface: #fbf7f0;
  --color-surface-2: #ffffff;
  --color-surface-offset: #eee5d5;
  --color-surface-offset-2: #e5d9c3;
  --color-surface-dynamic: #d9c9a9;
  --color-divider: #e2d4b9;
  --color-border: #d3c1a0;

  --color-text: #251d16;
  --color-text-muted: #6c5f4f;
  --color-text-faint: #a3937a;
  --color-text-inverse: #fbf5ea;

  /* Primary — Crimson Peak red */
  --color-primary: #9a1f2b;
  --color-primary-hover: #7c1620;
  --color-primary-active: #5e0f17;
  --color-primary-highlight: #f0d6d3;

  /* Gold — reserved for certifications / ratings only */
  --color-gold: #a97a1f;
  --color-gold-hover: #8c6419;
  --color-gold-active: #6f4f14;
  --color-gold-highlight: #ecdfc0;

  --color-warning: #93511f;
  --color-warning-hover: #713e17;
  --color-warning-active: #4f2b0f;
  --color-warning-highlight: #e2d0c1;

  --color-error: #9a1f2b;
  --color-error-hover: #7c1620;
  --color-error-active: #5e0f17;
  --color-error-highlight: #f0d6d3;

  --color-success: #3f6b2c;
  --color-success-hover: #2e501f;
  --color-success-active: #1f3714;
  --color-success-highlight: #d6ddc7;

  --color-blue: #2c5a75;
  --color-blue-hover: #1f4459;
  --color-blue-active: #142f3d;
  --color-blue-highlight: #cdd9de;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 40 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 40 / 0.10);
  --shadow-lg: 0 14px 36px oklch(0.2 0.02 40 / 0.16);
}

/* ---- Dark mode ---- */
[data-theme='dark'] {
  --color-bg: #17120d;
  --color-surface: #1c1611;
  --color-surface-2: #221b15;
  --color-surface-offset: #1f1912;
  --color-surface-offset-2: #261e16;
  --color-surface-dynamic: #33281c;
  --color-divider: #2b2217;
  --color-border: #3e3121;

  --color-text: #ece2d2;
  --color-text-muted: #ac9c85;
  --color-text-faint: #786a55;
  --color-text-inverse: #221b15;

  --color-primary: #e2626f;
  --color-primary-hover: #ea8189;
  --color-primary-active: #f0a0a6;
  --color-primary-highlight: #3a2224;

  --color-gold: #d9ab52;
  --color-gold-hover: #e5bd6f;
  --color-gold-active: #efce90;
  --color-gold-highlight: #3a2f1c;

  --color-warning: #cb8551;
  --color-warning-hover: #d69a6c;
  --color-warning-active: #e0af88;
  --color-warning-highlight: #45341f;

  --color-error: #e2626f;
  --color-error-hover: #ea8189;
  --color-error-active: #f0a0a6;
  --color-error-highlight: #3a2224;

  --color-success: #8fb56f;
  --color-success-hover: #a4c489;
  --color-success-active: #bad4a2;
  --color-success-highlight: #2c3624;

  --color-blue: #7ea6bd;
  --color-blue-hover: #97b8ca;
  --color-blue-active: #b0cad7;
  --color-blue-highlight: #263139;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 14px 36px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #17120d;
    --color-surface: #1c1611;
    --color-surface-2: #221b15;
    --color-surface-offset: #1f1912;
    --color-surface-offset-2: #261e16;
    --color-surface-dynamic: #33281c;
    --color-divider: #2b2217;
    --color-border: #3e3121;
    --color-text: #ece2d2;
    --color-text-muted: #ac9c85;
    --color-text-faint: #786a55;
    --color-text-inverse: #221b15;
    --color-primary: #e2626f;
    --color-primary-hover: #ea8189;
    --color-primary-active: #f0a0a6;
    --color-primary-highlight: #3a2224;
    --color-gold: #d9ab52;
    --color-gold-hover: #e5bd6f;
    --color-gold-active: #efce90;
    --color-gold-highlight: #3a2f1c;
    --color-success: #8fb56f;
    --color-blue: #7ea6bd;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 14px 36px oklch(0 0 0 / 0.5);
  }
}

/* ============================================================
   BASE LAYOUT UTILITIES
   ============================================================ */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container-narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

a {
  text-decoration: none;
  color: inherit;
}
.faq-answer a,
.lead-success a,
.footer-contact-item a {
  text-decoration: underline;
  color: var(--color-primary);
  text-decoration-color: oklch(from var(--color-primary) l c h / 0.4);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  display: inline-block;
  border-radius: var(--radius-full);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
}
h3 {
  font-size: var(--text-lg);
  letter-spacing: -0.005em;
}

p {
  color: var(--color-text-muted);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  z-index: 200;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  min-height: 44px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff8f6;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.18);
}
.btn-secondary:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
}
.btn-ghost:hover {
  background: var(--color-surface-offset);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 36px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-mark {
  width: 34px;
  height: 34px;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-mark .peak-fill {
  fill: var(--color-primary);
}
.logo-word span {
  color: var(--color-primary);
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-primary a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.nav-primary a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.phone-chip {
  display: none;
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-md);
}

@media (max-width: 900px) {
  .nav-primary {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
}

@media (max-width: 480px) {
  .header-actions .btn-primary {
    display: none;
  }
  .logo {
    font-size: var(--text-sm);
  }
  .header-actions {
    gap: var(--space-2);
  }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-4) var(--space-5) var(--space-6);
  gap: var(--space-1);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-md);
}
.mobile-nav a:hover {
  background: var(--color-surface-offset);
}
.mobile-nav .btn {
  margin-top: var(--space-3);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20)) clamp(var(--space-16), 8vw, var(--space-24));
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-12);
  align-items: center;
}
.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.02;
  margin-bottom: var(--space-5);
}
.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.hero-sub {
  font-size: var(--text-lg);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.hero-stat {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.hero-stat svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.hero-stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.hero-stat-text strong {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hero-stat-text span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.hero-media {
  position: relative;
}
.hero-media img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.hero-float-card {
  position: absolute;
  bottom: calc(var(--space-8) * -1);
  left: calc(var(--space-6) * -1);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid var(--color-divider);
}
.hero-float-card .rating {
  display: flex;
  color: var(--color-gold);
  gap: 1px;
}
.hero-float-card .rating svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.hero-float-card strong {
  display: block;
  font-size: var(--text-lg);
  font-family: var(--font-display);
  line-height: 1;
}
.hero-float-card span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
  .hero-float-card {
    left: var(--space-4);
    bottom: calc(var(--space-6) * -1);
  }
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  padding-block: var(--space-8);
  background: var(--color-surface-offset);
  border-block: 1px solid var(--color-divider);
}
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.service-feature {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  margin-bottom: var(--space-6);
  isolation: isolate;
}
.service-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.service-feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0.15 0.02 40 / 0.92) 5%, oklch(0.15 0.02 40 / 0.15) 75%);
  z-index: -1;
}
.service-feature-content {
  position: relative;
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  max-width: 640px;
}
.service-feature-content .badge {
  color: #f0d6d3;
}
.service-feature-content h3 {
  color: #fff;
  font-size: var(--text-xl);
  margin-block: var(--space-3);
}
.service-feature-content p {
  color: oklch(0.95 0 0 / 0.85);
  margin-bottom: var(--space-5);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.badge svg {
  width: 16px;
  height: 16px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-6);
}
.service-primary {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.service-primary img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.service-primary-body {
  padding: var(--space-8);
}
.service-primary-body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}
.service-primary-body p {
  margin-bottom: var(--space-5);
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: space-between;
  height: 100%;
}
.service-row {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  gap: var(--space-4);
}
.service-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--color-primary);
}
.service-row h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.service-row p {
  font-size: var(--text-sm);
  margin: 0;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-list {
    flex-direction: column;
  }
}

/* ============================================================
   FINANCING CALCULATOR
   ============================================================ */
.calc-section {
  background: var(--color-surface-offset);
}
.calc-card {
  background: var(--color-surface-2);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.calc-inputs {
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  border-right: 1px solid var(--color-divider);
}
.calc-results {
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  background: var(--color-surface-offset);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-step-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
  display: block;
}
.calc-field {
  margin-bottom: var(--space-8);
}
.calc-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-3);
}
.calc-field-head label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.calc-field-head .calc-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-base);
}
input[type='range'] {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-dynamic);
  appearance: none;
  cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
input[type='range']::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-surface-2);
  cursor: pointer;
}
.range-scale {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pill {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  min-height: 44px;
}
.pill:hover {
  border-color: var(--color-primary);
}
.pill[aria-pressed='true'] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff8f6;
}

.calc-result-block {
  margin-bottom: var(--space-8);
}
.calc-result-block:last-child {
  margin-bottom: 0;
}
.calc-result-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.calc-result-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.calc-result-value.accent {
  color: var(--color-primary);
}
.calc-result-sub {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}
.calc-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-inputs {
    border-right: none;
    border-bottom: 1px solid var(--color-divider);
  }
}

/* ============================================================
   GUARANTEES (numbered narrative)
   ============================================================ */
.guarantee-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-16);
  align-items: center;
}
.guarantee-media img {
  border-radius: var(--radius-xl);
  aspect-ratio: 4/5;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}
.guarantee-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.guarantee-item {
  display: flex;
  gap: var(--space-5);
}
.guarantee-num {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary-highlight);
  -webkit-text-stroke: 1.5px var(--color-primary);
  flex-shrink: 0;
  width: 2ch;
}
.guarantee-item h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.guarantee-item p {
  font-size: var(--text-sm);
  margin: 0;
}

@media (max-width: 900px) {
  .guarantee-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .guarantee-media img {
    aspect-ratio: 16/9;
  }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section {
  background: var(--color-surface-offset);
}
.testimonial-rating-summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.testimonial-rating-summary .rating {
  display: flex;
  color: var(--color-gold);
}
.testimonial-rating-summary .rating svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.testimonial-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}
.testimonial-card .rating {
  display: flex;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}
.testimonial-card .rating svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.testimonial-card p {
  color: var(--color-text);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
  flex: 1;
}
.testimonial-person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.avatar-initial {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.testimonial-person strong {
  font-size: var(--text-sm);
  display: block;
}
.testimonial-person span {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

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

/* ============================================================
   SERVICE AREAS
   ============================================================ */
.areas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}
.area-map {
  background: var(--color-surface-offset);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  place-items: center;
}
.area-map svg {
  width: 100%;
  max-width: 440px;
}
.area-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.area-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.area-col h4 svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}
.area-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.area-col li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-4);
  position: relative;
}
.area-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

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

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list {
  border-top: 1px solid var(--color-divider);
}
.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-1);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
}
.faq-item[data-open='true'] .faq-question svg {
  transform: rotate(45deg);
  color: var(--color-primary);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-interactive);
}
.faq-answer p {
  padding: 0 var(--space-1) var(--space-6);
  font-size: var(--text-sm);
  max-width: 65ch;
}

/* ============================================================
   LEAD CTA + FORM
   ============================================================ */
.lead-section {
  background: var(--color-primary);
  color: #fff8f6;
  position: relative;
  overflow: hidden;
}
.lead-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('#grain-pattern');
  opacity: 0.5;
}
.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  min-width: 0;
}
.lead-grid > * {
  min-width: 0;
  position: relative;
}
.lead-copy .eyebrow {
  color: #fbd9d9;
}
.lead-copy .eyebrow::before {
  background: #fbd9d9;
}
.lead-copy h2 {
  color: #fff;
}
.lead-copy p {
  color: oklch(0.97 0 0 / 0.82);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}
.lead-copy .hero-stats {
  gap: var(--space-6);
}
.lead-copy .hero-stat svg {
  color: #fbd9d9;
}
.lead-copy .hero-stat-text strong {
  color: #fff;
}
.lead-copy .hero-stat-text span {
  color: oklch(0.97 0 0 / 0.65);
}

.lead-card {
  background: var(--color-surface-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
}
.lead-card h3 {
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.lead-card > p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.form-row label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.form-row input,
.form-row select {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-base);
  min-height: 44px;
  color: var(--color-text);
}
.form-row input:focus,
.form-row select:focus {
  border-color: var(--color-primary);
}
.form-row-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1em;
  display: none;
}
.form-error.show {
  display: block;
}
.lead-success {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-2);
}
.lead-success.show {
  display: block;
}
.lead-success svg {
  width: 44px;
  height: 44px;
  color: var(--color-success);
  margin: 0 auto var(--space-4);
}
.lead-success h3 {
  margin-bottom: var(--space-2);
}
.lead-form.hide {
  display: none;
}

@media (max-width: 900px) {
  .lead-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .form-row-pair {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface-offset-2);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-16) var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr 1fr 1.15fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}
.footer-address-block {
  margin-bottom: var(--space-4);
}
.footer-address-block:last-child {
  margin-bottom: 0;
}
.footer-address-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.footer-address-block address {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: normal;
  line-height: 1.5;
}
.footer-brand p {
  font-size: var(--text-sm);
  margin-block: var(--space-4) 0;
  max-width: 32ch;
}
.footer-col h5 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a,
.footer-col address {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: normal;
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-contact-item {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}
.footer-bottom {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-locations {
    grid-column: span 2;
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-locations {
    grid-column: span 1;
  }
}

/* ============================================================
   LIVE CHAT WIDGET
   ============================================================ */
.chat-launcher {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff8f6;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 150;
}
.chat-launcher:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
}
.chat-launcher svg {
  width: 26px;
  height: 26px;
}
.chat-launcher .icon-close {
  display: none;
}
.chat-launcher.open .icon-chat {
  display: none;
}
.chat-launcher.open .icon-close {
  display: block;
}
.chat-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-surface-2);
}

.chat-panel {
  position: fixed;
  bottom: calc(var(--space-6) + 74px);
  right: var(--space-6);
  width: min(380px, calc(100vw - 2 * var(--space-4)));
  max-height: min(560px, calc(100dvh - 160px));
  background: var(--color-surface-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-divider);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 150;
}
.chat-panel.open {
  display: flex;
}
.chat-header {
  background: var(--color-primary);
  color: #fff8f6;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: oklch(1 0 0 / 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chat-header-avatar svg {
  width: 20px;
  height: 20px;
}
.chat-header-text strong {
  display: block;
  font-size: var(--text-sm);
}
.chat-header-text span {
  font-size: var(--text-xs);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-header-text span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ed08a;
  display: inline-block;
}
.chat-close {
  margin-left: auto;
  color: #fff8f6;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
}
.chat-close:hover {
  background: oklch(1 0 0 / 0.15);
}
.chat-close svg {
  width: 18px;
  height: 18px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
}
.chat-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.chat-msg.bot {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
  color: var(--color-text);
}
.chat-msg.user {
  background: var(--color-primary);
  color: #fff8f6;
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}
.chat-msg a {
  color: inherit;
  text-decoration: underline;
}
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0 var(--space-5) var(--space-4);
  background: var(--color-surface);
}
.chat-chip {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface-2);
}
.chat-chip:hover {
  background: var(--color-primary-highlight);
  border-color: var(--color-primary);
}
.chat-typing {
  display: flex;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
  align-self: flex-start;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-faint);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.chat-input-row {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface-2);
}
.chat-input-row input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  background: var(--color-surface);
  color: var(--color-text);
  min-height: 44px;
}
.chat-input-row input:focus {
  border-color: var(--color-primary);
}
.chat-send {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff8f6;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.chat-send:hover {
  background: var(--color-primary-hover);
}
.chat-send svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .chat-panel {
    right: var(--space-4);
    bottom: calc(var(--space-4) + 74px);
  }
  .chat-launcher {
    right: var(--space-4);
    bottom: var(--space-4);
  }
}

/* ============================================================
   MISC
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   APPLICATION PAGES (Careers + Subcontractors)
   ============================================================ */
.app-hero {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20)) var(--space-8);
}
.app-hero-inner {
  max-width: 760px;
}
.app-hero p.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.app-hero-crosslink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.app-hero-crosslink a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: oklch(from var(--color-primary) l c h / 0.4);
}

.app-form-section {
  padding-block: 0 clamp(var(--space-16), 8vw, var(--space-24));
}
.app-form-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-12));
  max-width: 920px;
  margin-inline: auto;
}

.form-block {
  margin-bottom: var(--space-12);
}
.form-block:last-of-type {
  margin-bottom: var(--space-8);
}
.form-block-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.form-block-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
}
.form-block-head h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}
.form-block-head span {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.form-row-trio {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: var(--space-4);
}
.form-row textarea {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text);
  min-height: 96px;
  resize: vertical;
}
.form-row textarea:focus {
  border-color: var(--color-primary);
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.required-mark {
  color: var(--color-primary);
  margin-left: 2px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2) var(--space-4);
}
.check-option,
.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}
.check-option input,
.radio-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.toggle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.toggle-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.toggle-pill.is-checked,
.toggle-pill:has(input:checked) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff8f6;
}
.toggle-pill:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.conditional-block {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  border: 1px dashed var(--color-border);
}
.conditional-block[hidden] {
  display: none;
}

.repeat-group {
  display: grid;
  gap: var(--space-6);
}
.repeat-item {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
}
.repeat-item-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.form-block-full {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.cert-block {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-divider);
  margin-bottom: var(--space-6);
}
.cert-block .check-option {
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.cert-block .check-option input {
  margin-top: 3px;
}

.app-success {
  display: none;
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.app-success.show {
  display: block;
}
.app-success svg {
  width: 48px;
  height: 48px;
  color: var(--color-success);
  margin: 0 auto var(--space-4);
}
.app-success h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}
.app-success p {
  max-width: 52ch;
  margin-inline: auto;
}
.app-form.hide {
  display: none;
}

@media (max-width: 900px) {
  .form-row-trio {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .toggle-pill {
    min-width: 72px;
  }
}
