/* One crisp homepage-style header at every route and screen size. */
body[data-replica-page] [data-shared-mobile-header] { display: none; }
@media (min-width: 761px) {
  /* Keep the original header's layout slot so page sections do not move. */
  body[data-replica-page] [data-original-mobile-header],
  body[data-replica-page] [data-original-mobile-header] * {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] {
    --green: #7bd631;
    --green-bright: #a5f24b;
    box-sizing: border-box;
    position: absolute;
    z-index: 10000;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    min-width: 0;
    height: auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 2.1vw, 40px);
    padding: 8px 24px 8px 12px;
    border: 1px solid rgba(153,241,68,.78);
    border-radius: 50px;
    background: rgba(12,18,10,.58);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #f4f6f1;
    font: 16px/1.5 Arial, Helvetica, sans-serif;
    letter-spacing: normal;
    text-align: left;
    transition: .3s ease;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header].is-scrolled {
    position: fixed;
    top: 14px;
    background: rgba(6,10,6,.9);
    box-shadow: 0 12px 40px rgba(0,0,0,.24);
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] * { box-sizing: border-box; }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] a { text-decoration: none; }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 clamp(182px, 13.05vw, 240px);
    width: clamp(182px, 13.05vw, 240px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .brand img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 68px;
    height: auto;
    object-fit: contain;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .menu-toggle { display: none; }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav {
    position: static;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2.1vw, 40px);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: clamp(11px, 1.12vw, 16px);
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: .04em;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a {
    position: relative;
    min-width: 0;
    padding: 8px 0;
    color: var(--green);
    font-size: var(--header-label-size, inherit) !important;
    line-height: 1.5 !important;
    white-space: nowrap;
    transition: color .25s ease, transform .25s ease;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--green-bright);
    transition: right .25s ease;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a:hover,
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a.active { color: #c9ff87; transform: translateY(-1px); }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a:hover::after,
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav a.active::after { right: 0; }

  /* The hero follows the existing services container's left edge. */
  /* Reserve the previous 37px visual offset in normal layout, so the stats
     border cannot be clipped by the hero's overflow at wider viewports. */
  .home-page .hero { padding-block: 74px 16px; }
  .home-page .hero-content.section-inner { width: min(1420px, calc(100% - 92px)); margin-top: 54px; transform: none; }
}
@media (min-width: 761px) and (max-width: 1120px) {
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] {
    width: calc(100% - 28px);
    gap: 14px;
    padding-right: 16px;
  }
  body:is(.home-page, [data-replica-page]) [data-shared-mobile-header] .main-nav { gap: 10px; font-size: clamp(8px, .98vw, 10px); }
}
@media (max-width: 760px) {
  body[data-replica-page] [data-original-mobile-header] { display: none !important; }
  body[data-replica-page] [data-shared-mobile-header] {
    --green: #7bd631;
    --green-bright: #a5f24b;
    --line: rgba(129,224,49,.45);
    box-sizing: border-box;
    position: absolute;
    z-index: 10000;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    min-width: 0;
    height: auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid rgba(153,241,68,.78);
    border-radius: 38px;
    background: rgba(12,18,10,.58);
    backdrop-filter: blur(12px);
    color: #f4f6f1;
    font: 16px/1.5 Arial, Helvetica, sans-serif;
    letter-spacing: normal;
    text-align: left;
    transition: .3s ease;
  }
  body[data-replica-page] [data-shared-mobile-header].is-scrolled {
    position: fixed;
    top: 8px;
    background: rgba(6,10,6,.9);
    box-shadow: 0 12px 40px rgba(0,0,0,.24);
  }
  body[data-replica-page] [data-shared-mobile-header] * { box-sizing: border-box; }
  body[data-replica-page] [data-shared-mobile-header] a { color: inherit; text-decoration: none; }
  body[data-replica-page] [data-shared-mobile-header] .brand {
    display: inline-flex;
    align-items: center;
    width: 182px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body[data-replica-page] [data-shared-mobile-header] .brand img {
    width: 100%;
    max-width: 100%;
    max-height: 52px;
    height: auto;
    object-fit: contain;
    display: block;
  }
  body[data-replica-page] [data-shared-mobile-header] .menu-toggle {
    display: block;
    width: 44px;
    height: 44px;
    padding: 8px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #000;
    font: inherit;
    cursor: pointer;
  }
  body[data-replica-page] [data-shared-mobile-header] .menu-toggle span:not(.sr-only) {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--green);
  }
  body[data-replica-page] [data-shared-mobile-header] .sr-only {
    position: absolute;
    inset: auto;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: grid;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 8px 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(5,8,5,.96);
    color: #f4f6f1;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav a {
    position: relative;
    padding: 13px 4px;
    border-bottom: 1px solid rgba(123,214,49,.13);
    color: var(--green);
    white-space: nowrap;
    transition: color .25s ease, transform .25s ease;
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav a:last-child { border-bottom: 0; }
  body[data-replica-page] [data-shared-mobile-header] .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--green-bright);
    transition: right .25s ease;
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav a:hover,
  body[data-replica-page] [data-shared-mobile-header] .main-nav a.active {
    color: #c9ff87;
    transform: translateY(-1px);
  }
  body[data-replica-page] [data-shared-mobile-header] .main-nav a:hover::after,
  body[data-replica-page] [data-shared-mobile-header] .main-nav a.active::after { right: 0; }
}
@media (max-width: 760px) {
  .home-page [data-shared-mobile-header] .main-nav {
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Compact only the phone homepage; keep the shared header untouched. */
  .home-page .hero {
    min-height: 0;
    align-items: flex-start;
    padding: 112px 0 28px;
  }
  .home-page .hero-content.section-inner {
    width: calc(100% - 38px);
    margin: 0 auto;
    transform: none;
  }
  .home-page .hero .eyebrow { font-size: 11px; line-height: 1.4; letter-spacing: .1em; }
  .home-page .hero h1 { margin: 10px 0 8px; font-size: clamp(42px, 13vw, 60px); line-height: .94; }
  .home-page .hero-subtitle { max-width: none; font-size: 15px; line-height: 1.25; }
  .home-page .hero-rule { width: 72px; height: 2px; margin: 14px 0 12px; }
  .home-page .hero-lead { max-width: 260px; font-size: 14px; line-height: 1.3; }
  .home-page .hero-actions { gap: 10px; margin-top: 24px; flex-wrap: nowrap; }
  .home-page .hero-actions .button { min-width: 0; min-height: 44px; padding: 0 16px; font-size: 13px; text-align: center; }
  .home-page .hero-stats { width: 100%; max-width: 360px; margin-top: 24px; padding: 6px 14px; border-radius: 18px; }
  .home-page .stat { gap: 12px; padding: 9px 0; }
  .home-page .stat-icon { width: 48px; height: 48px; }
  .home-page .stat-icon svg { width: 30px; height: 30px; }
  .home-page .stat strong { font-size: 26px; }
  .home-page .stat small { margin-top: 3px; font-size: 10.5px; }
}
@media (max-width: 480px) {
  .home-page .hero h1 span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-replica-page] [data-shared-mobile-header],
  body[data-replica-page] [data-shared-mobile-header] * { transition-duration: .01ms !important; }
}
