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

html {
  scroll-behavior: smooth;
}

/* Hash links to in-page sections (e.g. #contact-form, #faq, #services)
   should land below the fixed navbar instead of behind it. The navbar is
   clamp(56px, 7vh, 68px) tall plus a 1px border, so 6rem (~96px) gives a
   comfortable buffer at any viewport size. */
.idx main section[id] {
  scroll-margin-top: 6rem;
}

body.idx {
  margin: 0;
  min-height: 100vh;
  font-family: var(--idx-font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--idx-ink);
  background: var(--idx-bg);
  /* Avoid horizontal page scroll / rubber-band when the nav is wider than the text column */
  overflow-x: clip;
  overscroll-behavior-x: none;
}

.idx a:not(.cta-primary):not(.submit-button):not(.service-card-link):not(.cta-button) {
  color: var(--idx-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.idx a:not(.cta-primary):not(.submit-button):not(.service-card-link):not(.cta-button):hover {
  text-decoration-thickness: 2px;
}

/* Skip link: fully hidden until keyboard focus (no off-screen sliver) */
.idx .skip-link {
  position: fixed;
  z-index: 100000;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  background: var(--idx-accent);
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

.idx .skip-link:focus {
  clip-path: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 0.85rem;
  left: var(--idx-gutter);
  top: var(--idx-gutter);
  overflow: visible;
  white-space: normal;
  border-radius: 4px;
  outline: 2px solid var(--idx-ink);
  outline-offset: 3px;
}

/* The video container and the video itself are aggressively pinned to their
   own GPU compositor layer. Without this, swapping <main> (which can change
   body height and trigger paint cycles) can cause Chromium to re-rasterize
   the video texture for a frame, which the user sees as a black flash. */
.idx .video-background {
  position: fixed;
  inset: 0;
  z-index: var(--idx-z-video);
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.idx .background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.05) saturate(1.05);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* Isolate <main> for layout/style so DOM changes inside it (e.g. soft-nav
   content swap) don't invalidate layout on the persistent shell. We avoid
   `contain: paint` because it creates a containing block for fixed
   descendants like #reviewModal, which would break the modal positioning. */
.idx main {
  contain: layout style;
}

.idx .background-overlay {
  position: absolute;
  inset: 0;
  background:
    /* Top layer: vertical scrim — anchors navbar at top, CTA at bottom */
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.20) 0%,
      rgba(0, 0, 0, 0.0) 35%,
      rgba(0, 0, 0, 0.0) 60%,
      rgba(0, 0, 0, 0.26) 100%
    ),
    /* Bottom layer: radial vignette — focal anchor on hero, darker corners */
    radial-gradient(
      ellipse 110% 85% at 50% 25%,
      rgba(7, 7, 8, 0.10) 0%,
      rgba(7, 7, 8, 0.26) 40%,
      rgba(7, 7, 8, 0.46) 78%,
      rgba(7, 7, 8, 0.56) 100%
    );
}

/* ─── Text legibility over the fixed video background ───────────
   The video sits behind the entire page, so muted body copy in
   ANY section (not just the hero) competes with mid-tone footage.
   Two surgical, low-impact techniques:

   (1) Override --idx-muted ONLY inside main. Custom properties
       cascade, so every `color: var(--idx-muted)` rule in any
       descendant automatically picks up the brighter value. Nav
       and footer keep the original warm grey design intent.

   (2) text-shadow inherits, so applying it once on .idx main
       gives every text element a dark local halo. On true dark
       card surfaces (rgba(16,16,18,0.55+), --idx-bg, etc.) the
       shadow is invisible — black on near-black. Over the video
       it provides per-glyph contrast that doesn't depend on
       global dimming. */
.idx main {
  --idx-muted: #c4c1bb;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 3px 12px rgba(0, 0, 0, 0.55);
}

/* Cancel inherited text-shadow on elements with dark text on
   bright/accent backgrounds — a dark shadow under dark text on
   yellow looks smudgy/embossed. Buttons and form controls have
   their own surface so legibility is not at risk anyway. */
.idx main .cta-primary,
.idx main .cta-button,
.idx main .submit-button,
.idx main button,
.idx main input,
.idx main select,
.idx main textarea {
  text-shadow: none;
}

/* Hero gets a slightly stronger shadow because its text is the
   largest and most prominent — the heading especially benefits
   from a more pronounced halo. */
.idx section.hero .idx-kicker,
.idx section.hero .idx-h1,
.idx section.hero .idx-lead,
.idx section.hero .idx-trust,
.idx section.hero .idx-trust li,
.idx section.hero .idx-actions .idx-muted,
.idx section.hero .idx-phone-inline {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 3px 14px rgba(0, 0, 0, 0.65);
}

.idx section.hero .idx-trust li {
  border-left-color: rgba(255, 255, 255, 0.55);
}

.idx #main-content {
  position: relative;
  z-index: var(--idx-z-base);
  /* Room for fixed bar + logo that extends below the bar only */
  padding: clamp(5.75rem, 12vh, 6.75rem) var(--idx-gutter) 2.5rem;
}

.idx .idx-flow {
  max-width: var(--idx-measure);
  margin: 0 auto;
}

.idx main > section:not(.hero) {
  margin-top: 3rem;
}

.idx .idx-rule {
  border: 0;
  border-top: 1px solid var(--idx-line);
  margin: 3.5rem 0;
}

.idx .idx-kicker {
  display: block;
  font-family: var(--idx-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--idx-muted);
  margin-bottom: 0.75rem;
}

.idx .idx-h1 {
  font-family: var(--idx-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.idx .idx-h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--idx-accent);
}

.idx .idx-lead {
  font-size: 1.12rem;
  color: var(--idx-muted);
  margin: 0 0 1.75rem;
}

.idx .idx-muted {
  color: var(--idx-muted);
  font-size: 0.95rem;
}

.idx .idx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.idx .cta-primary {
  display: inline-block;
  font-family: var(--idx-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  background: var(--idx-accent);
  color: #0a0a0b;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid rgba(10, 10, 11, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.idx .cta-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.idx .cta-primary:focus-visible {
  outline: 2px solid var(--idx-ink);
  outline-offset: 3px;
}

.idx .idx-phone-inline {
  color: var(--idx-ink);
  font-weight: 600;
  text-decoration: none;
}

.idx .idx-phone-inline:hover {
  color: var(--idx-accent);
}

.idx .idx-trust {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--idx-muted);
  font-size: 0.92rem;
}

.idx .idx-trust li {
  margin-bottom: 0.35rem;
  padding-left: 1rem;
  border-left: 2px solid var(--idx-line-strong);
}

.idx .idx-h2 {
  font-family: var(--idx-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.idx .idx-prose p {
  margin: 0 0 1rem;
  color: var(--idx-muted);
}

.idx .idx-prose p:last-child {
  margin-bottom: 0;
}

.idx .idx-prose a:not(.cta-primary):not(.cta-button) {
  color: var(--idx-accent);
}

.idx .idx-prose a.cta-primary {
  color: #0a0a0b;
  text-decoration: none;
}

.idx .video-section .video-intro {
  margin: 0 0 1.25rem;
  color: var(--idx-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 56ch;
}

.idx .video-section .idx-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--idx-surface);
  border: 1px solid var(--idx-line);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 237, 0, 0.06) inset;
}

.idx .video-section iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.idx .services-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--idx-line);
}

.idx .service-card {
  display: block;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--idx-line);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.idx .service-card:hover {
  background: rgba(255, 237, 0, 0.04);
  padding-left: 0.35rem;
}

.idx .service-card h3 {
  font-family: var(--idx-display);
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--idx-ink);
}

.idx .service-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--idx-muted);
}

.idx .service-cta-card {
  cursor: default;
}

.idx .service-cta-card:hover {
  padding-left: 0;
  background: transparent;
}

.idx .service-cta-card .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--idx-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--idx-accent);
  text-decoration: none;
}

.idx .service-cta-card .cta-button:hover {
  text-decoration: underline;
}

.idx .awards-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--idx-line);
}

.idx .awards-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--idx-line);
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
}

@media (max-width: 520px) {
  .idx .awards-list li {
    grid-template-columns: 1fr;
  }
}

.idx .award-year {
  font-family: var(--idx-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--idx-accent);
}

.idx .award-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--idx-ink);
}

.idx .award-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--idx-muted);
}

.idx .award-recipient {
  margin-top: 0.35rem !important;
  font-size: 0.88rem !important;
  color: var(--idx-ink) !important;
}

.idx .faq-cta-p {
  margin-top: 1.5rem;
  color: var(--idx-muted);
}

.idx address {
  font-style: normal;
}
