/* ---------- Hero: mobile / tablet first (stacked) ---------- */
.hero {
  position: relative;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--color-page), #fff);
  overflow: hidden;
}

.hero__content {
  order: 1;
  padding: 1.75rem var(--page-gutter) 2.5rem;
}

.hero__eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem clamp(.45rem, 1.6vw, .7rem);
  font-size: clamp(.75rem, 2.9vw, 1rem); font-weight: 600;
  letter-spacing: clamp(.08em, .6vw, .13em); text-transform: uppercase; color: var(--color-navy);
}
.hero__eyebrow .dot {
  width: .42em; height: .42em; border-radius: 50%; background: var(--color-orange);
}
/* Phones: spread the four words across the full content width */
@container page (max-width: 699px) {
  .hero__eyebrow { flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .hero__eyebrow span:last-child { margin-right: calc(-1 * clamp(.08em, .6vw, .13em)); } /* cancel trailing letter-spacing */
}
/* Phones: the H1 keyword line stays on one line, sized to fill the content width exactly
   (12px+ on phones 375px and wider; a little smaller only on the narrowest phones) */
@container page (max-width: 699px) {
  /* text sized to fit, then letter-spacing (not empty gaps) fills any spare width, so the line spreads evenly */
  h1.hero__eyebrow {
    justify-content: flex-start; gap: 0;
    font-size: min(13px, calc((100cqi - 2 * var(--page-gutter)) / 27.2));
    letter-spacing: clamp(0px, calc(((100cqi - 2 * var(--page-gutter)) - 26.95em) / 39), .2em);
  }
  h1.hero__eyebrow .dot { flex: none; margin: 0 .6em; }
  h1.hero__eyebrow span { white-space: nowrap; }
  h1.hero__eyebrow span:last-child { margin-right: 0; }
}
@container page (max-width: 340px) {
  .hero__eyebrow { letter-spacing: .05em; }
  .hero__eyebrow span:last-child { margin-right: -.05em; }
}

.hero__title {
  margin-top: .9rem;
  font-size: clamp(2.6rem, 11vw, 4.6rem);
  font-weight: 800; font-style: italic;
  line-height: .9; letter-spacing: -.025em;
  color: var(--color-navy);
}
.hero__title-line { display: block; }
.br-desktop { display: none; }
.hero__title-line--accent { position: relative; width: fit-content; color: var(--color-orange); padding-bottom: .22em; }
.hero__swoosh {
  position: absolute; left: 56%; bottom: 0;
  width: 40%; height: .2em;
  color: var(--color-orange);
}
/* "The Prime Standard of Service." — "Prime" in orange with the swoosh under it, like the logo.
   The inline-block's bottom margin opens a gap below its line so the swoosh never touches the next line. */
.hero__prime { position: relative; display: inline-block; margin-bottom: .22em; color: var(--color-orange); }
.hero__prime .hero__swoosh { left: 2%; right: -6%; bottom: -.22em; width: auto; height: .3em; }
.br-mobile { display: none; }
/* Phones/tablets: keep "The Prime Standard" on one line like desktop. That line is ~9.9em wide, so the
   font is capped at (available width ÷ 10) — it shrinks smoothly on narrow phones and never wraps. */
.hero__title { font-size: min(clamp(2.6rem, 11vw, 4.6rem), calc((100cqi - 2 * var(--page-gutter)) / 10)); }

.hero__lead {
  margin-top: 1.1rem; max-width: 32rem;
  font-size: clamp(1rem, 3.6vw, 1.25rem); line-height: 1.35;
  color: var(--color-text-muted);
}

.service-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem; margin-top: 1.5rem;
}
.service-card {
  display: flex; align-items: center; gap: clamp(.45rem, 2vw, .7rem);
  min-height: 4.25rem; padding: .7rem clamp(.6rem, 2.5vw, .9rem);
  background: #fff; border: 1px solid rgba(216, 225, 236, .7);
  border-radius: 14px; box-shadow: var(--shadow-card);
}
.service-card__icon { flex: none; width: 2.4rem; height: 2.4rem; color: var(--color-orange); }
.service-card__label {
  font-size: clamp(.84rem, 3.4vw, .95rem); font-weight: 600; line-height: 1.22; color: var(--color-navy);
  letter-spacing: -.02em;
}
/* Very small phones (under 360px): icon above the label, so long words like "Installations" fit inside the card */
@container page (max-width: 359px) {
  .service-card { flex-direction: column; justify-content: center; gap: .35rem; padding-block: .75rem; text-align: center; }
  .service-card__icon { width: 2.1rem; height: 2.1rem; }
}

.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem;
  margin-top: 1.6rem;
}
.hero__cta { padding: 1rem 1.9rem; font-size: 1.2rem; }
.location-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.5rem; border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  font-size: 1rem; font-weight: 600; color: var(--color-navy);
}
.location-badge svg { width: 1.4em; height: 1.4em; color: var(--color-orange); }
.location-badge__pre { display: none; }

/* Phones: full-width primary CTA, location as a quiet centred line (not a second button) */
@container page (max-width: 699px) {
  .hero__actions { flex-direction: column; align-items: stretch; gap: .85rem; }
  .hero__cta { justify-content: center; width: 100%; }
  .location-badge {
    justify-content: center; gap: .4rem; padding: 0;
    background: none; border-radius: 0;
    font-size: .95rem; font-weight: 500; color: var(--color-text-muted);
  }
  .location-badge svg { width: 1.15em; height: 1.15em; }
  .location-badge__pre { display: inline; }
}

.trust {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; margin-top: 1.6rem;
}
.trust__item {
  display: flex; align-items: center; gap: .6rem;
  font-size: .9rem; line-height: 1.25; color: var(--color-navy);
}
.trust__item svg { flex: none; width: 2rem; height: 2rem; color: var(--color-navy); }
/* Phones: balanced 2×2 grid — icon above centred label, thin cross dividers */
@container page (max-width: 699px) {
  .trust { gap: 0; margin-top: 1.75rem; }
  .trust__item {
    flex-direction: column; justify-content: flex-start; gap: .5rem;
    padding: 1rem .5rem; text-align: center;
  }
  .trust__item:nth-child(odd) { border-right: 1px solid var(--color-border); }
  .trust__item:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
  .trust__item svg { width: 1.9rem; height: 1.9rem; color: var(--color-orange); }
}

/* Visual panel (stacked under the copy on small screens) */
.hero__visual {
  order: 2;
  position: relative;
  height: clamp(380px, 100vw, 620px);
  isolation: isolate;
}
.hero__shapes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__portrait {
  position: absolute; left: 50%; bottom: -6%;
  height: 102%; width: auto; max-width: none;
  transform: translateX(-46%);
  object-fit: contain;
}

/* Tablet (700–1099): 2×2 service cards, half-width CTA + location, divided trust row */
@container page (min-width: 700px) and (max-width: 1099px) {
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .trust__item { justify-content: center; gap: .5rem; padding-inline: .4rem; font-size: .85rem; }
  .trust__item span { white-space: nowrap; }
  .trust__item svg { width: 1.75rem; height: 1.75rem; }
  .trust__item + .trust__item { border-left: 1px solid var(--color-border); }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hero__cta, .location-badge { justify-content: center; width: 100%; height: 3.6rem; padding-block: 0; }
}
@container page (min-width: 900px) and (max-width: 1099px) {
  .service-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Desktop: faithful reproduction of the 1536×768 reference ---------- */
@container page (min-width: 1100px) {
  .hero {
    --u: clamp(0.716px, 100cqw / 1536, 1.25px);
    display: block;
    width: calc(1536 * var(--u)); height: calc(768 * var(--u));
    margin-inline: auto;
    background:
      radial-gradient(ellipse 60% 70% at 25% 45%, #fff 0%, rgba(255,255,255,0) 70%),
      linear-gradient(180deg, #F6F8FC, #F8FAFD 60%, #F3F6FA);
  }

  .hero__visual {
    position: absolute; left: calc(785 * var(--u)); top: 0;
    width: calc(751 * var(--u)); height: 100%;
  }
  .hero__portrait {
    left: calc(130 * var(--u)); top: calc(70 * var(--u)); bottom: auto;
    width: calc(515 * var(--u)); height: auto;
    transform: none;
  }

  .hero__content {
    position: absolute; left: calc(84 * var(--u)); top: 0;
    width: calc(740 * var(--u));
    padding: calc(141 * var(--u)) 0 0;
  }

  .hero__eyebrow {
    gap: 0; font-size: calc(21.5 * var(--u)); line-height: 1.3;
    letter-spacing: .14em;
  }
  .hero__eyebrow .dot { width: calc(8 * var(--u)); height: calc(8 * var(--u)); margin: 0 calc(24 * var(--u)) 0 calc(20 * var(--u)); }

  .hero__title {
    margin-top: calc(19 * var(--u));
    font-size: calc(85 * var(--u)); line-height: .845; letter-spacing: -.022em;
    margin-left: calc(-4 * var(--u));
  }
  .hero__title-line--accent { padding-bottom: 0; }
  .br-desktop { display: inline; }
  /* the new title is longer than "Our Expertise.", so it is set a little smaller and on two lines */
  .hero__title { font-size: calc(68 * var(--u)); line-height: .9; }
  .br-mobile { display: none; }
  .hero__prime .hero__swoosh { left: 2%; right: -6%; bottom: -.22em; width: auto; height: .3em; }
  .hero__swoosh {
    left: calc(336 * var(--u)); bottom: calc(-34 * var(--u));
    width: calc(250 * var(--u)); height: calc(20 * var(--u));
  }

  .hero__lead {
    margin-top: calc(34 * var(--u)); max-width: calc(610 * var(--u));
    font-size: calc(21.5 * var(--u)); line-height: calc(27 * var(--u));
    letter-spacing: -.022em;
  }

  .service-cards {
    display: flex; gap: calc(10 * var(--u));   /* tighter than the reference so the last card stays clear of the navy shape */
    margin: calc(26 * var(--u)) 0 0 calc(-5 * var(--u));
  }
  .service-card {
    min-height: 0; height: calc(73 * var(--u));
    padding: 0 calc(11 * var(--u)) 0 calc(10 * var(--u));
    gap: calc(10 * var(--u)); border-radius: calc(15 * var(--u));
  }
  .service-card__icon { width: calc(44 * var(--u)); height: calc(44 * var(--u)); }
  .service-card__label { font-size: calc(16.5 * var(--u)); line-height: calc(21 * var(--u)); letter-spacing: -.035em; }

  .hero__actions { margin: calc(36 * var(--u)) 0 0 calc(-5 * var(--u)); gap: calc(30 * var(--u)); flex-wrap: nowrap; }
  .hero__cta {
    width: calc(325 * var(--u)); height: calc(63 * var(--u)); padding: 0;
    font-size: calc(23 * var(--u)); gap: calc(14 * var(--u)); letter-spacing: -.02em;
  }
  .location-badge {
    width: calc(294 * var(--u)); height: calc(63 * var(--u)); padding: 0;
    justify-content: center; gap: calc(12 * var(--u));
    font-size: calc(18.5 * var(--u)); letter-spacing: -.025em;
  }
  .location-badge svg { width: calc(28 * var(--u)); height: calc(28 * var(--u)); }

  .trust {
    display: flex; gap: 0;
    margin: calc(29 * var(--u)) 0 0 calc(-2 * var(--u));
  }
  .trust__item {
    gap: calc(13 * var(--u));
    padding-right: calc(24 * var(--u));
    font-size: calc(15.5 * var(--u)); line-height: calc(20 * var(--u));
    letter-spacing: -.03em; white-space: nowrap;
  }
  .trust__item + .trust__item { padding-left: calc(24 * var(--u)); border-left: 1.5px solid #C9D3E0; }
  .trust__item svg { width: calc(33 * var(--u)); height: calc(33 * var(--u)); }

  .service-card { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
}

@media (prefers-reduced-motion: no-preference) {
  .service-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 46, 82, .14); }
}
