/* Isolated homepage hero experiment. Shared typography, background rendering,
   metric hover effects, navigation layers and phone layout remain unchanged. */
.hero-centered-v2 .hero-services-cta { display: none; }

/* The content order is experimental; the section surfaces are not. Keep the
   original plain → topographic alternation tied to the page slots rather than
   to the content component that now occupies each slot. */
body[data-page="home"] .section-surface-plain {
  background: rgba(4, 5, 6, .97) !important;
  box-shadow: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body[data-page="home"] .section-surface-plain::before { display: none; }

/* Keep the result value visually distinct from the surrounding display heading. */
body[data-page="home"] .rs-quote-led .big-num { font-style: italic; }
body[data-page="home"] .rs-quote-led .big-num-white { opacity: .9; }

body[data-page="home"] .section-surface-lined {
  position: relative;
  overflow: hidden;
  background: rgba(8, 10, 12, .97);
  box-shadow: 0 -30px 60px rgba(0, 0, 0, .9);
}

body[data-page="home"] .section-surface-lined::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(143, 179, 204, .22) 15%,
    rgba(143, 179, 204, .4) 50%,
    rgba(143, 179, 204, .22) 85%,
    transparent 100%);
}

body[data-page="home"] .section-surface-lined > canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: blur(.4px) contrast(1.1);
  pointer-events: none;
}

body[data-page="home"] .section-surface-lined > .why-inner {
  position: relative;
  z-index: 3;
}

@media (min-width: 901px) {
  /* Keep the services introduction on the same left-hand axis as the
     interactive panel beneath it. */
  body[data-page="home"] #services .gs-head {
    max-width: 920px;
    margin-inline: 0;
    text-align: left;
  }

  body[data-page="home"] #services .gs-head .eye {
    justify-content: flex-start;
  }

  body[data-page="home"] #services .gs-head > .gs-copy {
    margin-inline: 0 !important;
  }

  /* The service selector is intentionally a stronger UI label than the
     surrounding metadata. Increase both parts together so the icon-to-label
     relationship remains balanced. */
  body[data-page="home"] #services .v-rail .tab-btn {
    grid-template-columns: minmax(30px, auto) minmax(0, 1fr) !important;
  }

  body[data-page="home"] #services .v-rail .tb-icon {
    width: auto !important;
    font-size: clamp(26.45px, 2.3vw, 31.05px) !important;
  }

  body[data-page="home"] #services .v-rail .tb-lbl {
    font-size: calc(clamp(.86rem, 1.28vw, 1.04rem) * var(--desktop-type-scale) * 1.15);
  }

  /* The approach is supporting body copy, exactly one pixel below the main
     panel paragraph instead of a separate small-text role. */
  body[data-page="home"] #services .p-appro-txt {
    font-size: calc(var(--body-copy-size) - 1px);
  }

  body[data-page="home"] #about .about-v3-body-grid {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  }

  /* The shared metric component normally preserves a fixed cell width. In this
     55/45 composition that left an empty strip at the right edge, making the
     visible two-column unit look off-centre. Fill the allocated 45% track so
     the first text edge and final metric edge balance within the section. */
  body[data-page="home"] #about .about-b-stats {
    width: 100% !important;
  }

  @media (hover: hover) and (pointer: fine) {
    body[data-page="home"] .whyus-live-section .wy-row:hover .wy-row-t {
      color: rgba(255, 255, 255, .9);
    }

    body[data-page="home"] .whyus-live-section .wy-row:hover :is(.wy-row-idx, .wy-chevron) {
      color: rgba(143, 179, 204, .92);
    }
  }

  body[data-page="home"] #consultation-form .consult-process li {
    align-items: center;
  }

  body[data-page="home"] #consultation-form .consult-process li > span {
    align-self: center;
    font-size: calc(clamp(1.1rem, 1.6vw, 1.45rem) * var(--desktop-type-scale));
    line-height: 1;
    letter-spacing: .06em;
  }

  body[data-page="home"] .site-nav .logo {
    font-size: calc(var(--type-brand) * 1.15);
  }

  body[data-page="home"] .footer-brand-mark {
    font-size: calc(var(--type-brand) * 1.18);
  }

  body[data-page="home"] .hero-centered-v2 {
    padding: 0;
    align-items: flex-start;
  }

  body[data-page="home"] .hero-centered-v2 .hero-content {
    height: calc(100dvh - var(--hero-marquee-height));
    max-width: var(--shell);
    padding: clamp(86px, 11dvh, 126px) var(--shell-pad) 44px;
  }

  .hero-centered-v2 .hero-grid {
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(24px, 4dvh, 54px);
    text-align: center;
  }

  .hero-centered-v2 .hero-left {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    align-self: center;
    justify-items: center;
    min-width: 0;
  }

  .hero-centered-v2 :is(.hero-eye, .hero-h1, .hero-copy) {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }

  .hero-centered-v2 .hero-eye {
    justify-content: center;
    margin-bottom: clamp(18px, 2.6dvh, 30px);
  }

  .hero-centered-v2 .hero-h1 {
    margin-bottom: clamp(17px, 2.8dvh, 32px);
  }

  .hero-centered-v2 .hero-h1 > span:not(.accent-line) {
    display: inline;
  }

  body[data-page="home"] .hero-centered-v2 .hero-h1 .accent-line {
    display: block;
    font-size: 1.2em;
  }

  .hero-centered-v2 .hero-copy {
    max-width: min(100%, 66ch);
    margin: 0 auto clamp(24px, 4dvh, 42px);
    text-wrap: balance;
  }

  .hero-centered-v2 .hero-left > .btn-p {
    justify-self: end;
    margin: 0;
  }

  body[data-page="home"] .hero-centered-v2 .hero-services-cta {
    display: inline-flex;
    justify-self: start;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border-h);
    box-shadow: none;
  }

  .hero-centered-v2 .hero-services-cta:hover {
    border-color: var(--acc);
  }

  .hero-centered-v2 .hero-services-cta:focus-visible {
    outline: 2px solid var(--acc);
    outline-offset: 5px;
  }

  .hero-centered-v2 .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border-left: 0;
    border: 0;
    transform: translateY(-14px);
  }

  .hero-centered-v2 .hero-stats .rs-stat {
    min-width: 0;
    padding: clamp(14px, 2dvh, 24px) 16px;
    text-align: center;
    transition: transform 760ms cubic-bezier(.16, 1, .3, 1);
  }

  .hero-centered-v2 .hero-stats .rs-stat + .rs-stat { border-left: 0; }

  .hero-centered-v2 .hero-stats .rs-n {
    transition: color 680ms ease, opacity 680ms ease,
      text-shadow 760ms cubic-bezier(.16, 1, .3, 1);
  }

  .hero-centered-v2 .hero-stats .rs-l {
    transition: color 680ms ease;
  }

  @media (hover: hover) and (pointer: fine) {
    body[data-page="home"] .hero-centered-v2 .hero-stats .rs-stat:hover {
      transform: translateY(-1px);
    }

    body[data-page="home"] .hero-centered-v2 .hero-stats .rs-stat:hover .rs-n {
      transform: none;
      opacity: .88;
      text-shadow: 0 0 20px rgba(255,255,255,.08),
        0 0 30px rgba(143,179,204,.07);
    }

    body[data-page="home"] .hero-centered-v2 .hero-stats .rs-stat:hover .rs-l {
      color: rgba(215,221,228,.74);
    }
  }
}

/* Preserve natural scrolling in short desktop windows and at browser zoom.
   Do not shrink type or clip the content just to force it into one screen. */
@media (min-width: 901px) and (max-height: 659px) {
  body[data-page="home"] .hero-centered-v2 {
    position: relative;
    height: auto;
    min-height: calc(100svh - var(--hero-marquee-height));
  }

  body[data-page="home"] .hero-centered-v2 .hero-content {
    height: auto;
    padding-top: 96px;
  }

  .hero-centered-v2 .hero-grid { grid-template-rows: auto auto; }
  body[data-page="home"] .content-overlay { margin-top: 0; }
}
