/*
 * Alpine Reinheit — Desktop Header + Hero
 * Rebuilt from approved mockup (1440 × 900 reference frame)
 * Header 9% · Hero 44% · Text column 43%
 */

@media (min-width: 901px) {
  :root {
    --d-header-h: 76px;
    --d-hero-h: 388px;
    --d-hero-rail-h: 34px;
    --d-hero-stage-h: calc(var(--d-hero-h) - var(--d-hero-rail-h));
    --d-copy-w: 46%;
    --d-fade-w: 24%;
    --d-navy: #0F2A44;
    --d-ice: #6FAED9;
    --d-mist: #E6F2FB;
    --shell: 1360px;
  }

  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  section[id] {
    scroll-margin-top: calc(var(--d-header-h) + 8px);
  }

  /* ── Header ── */
  .d-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid rgba(13, 24, 42, 0.07);
  }

  .d-header__inner {
    display: grid;
    grid-template-columns: minmax(168px, 1fr) auto minmax(168px, 1fr);
    align-items: center;
    min-height: var(--d-header-h);
  }

  .d-header__logo {
    justify-self: start;
    display: inline-flex;
    align-items: center;
  }

  .d-header__logo img {
    display: block;
    width: 172px;
    height: auto;
    max-height: 32px;
    object-fit: contain;
    object-position: left center;
  }

  .d-header__nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .d-header__nav a {
    padding: 6px 0;
    color: var(--d-navy);
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .d-header__nav a:hover {
    color: #3d5c7a;
  }

  .d-header__cta {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 17px;
    border: 0;
    border-radius: 10px;
    background: var(--d-navy);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(13, 24, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .d-header__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(13, 24, 42, 0.18);
  }

  .d-header__cta-plus {
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
  }

  .d-header .menu-button {
    display: none;
  }

  /* ── Hero ── */
  .d-hero {
    position: relative;
    height: var(--d-hero-h);
    overflow: hidden;
    background: var(--d-mist);
  }

  .d-hero__stage {
    position: absolute;
    inset: 0 0 var(--d-hero-rail-h);
    overflow: hidden;
    pointer-events: none;
  }

  .d-hero__art {
    position: absolute;
    inset: 0;
    background-color: var(--d-mist);
    background-image: url("assets/hero/hero-desktop-approved.webp");
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: 100% 48%;
  }

  .d-hero__fade {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--d-fade-w);
    z-index: 2;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.58) 0%,
      rgba(255, 255, 255, 0.36) 46%,
      rgba(255, 255, 255, 0.08) 70%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .d-hero__inner {
    position: relative;
    z-index: 3;
    height: calc(var(--d-hero-h) - var(--d-hero-rail-h));
    display: flex;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 4px;
  }

  .d-hero__copy--desktop {
    display: block;
  }

  .d-hero__inner > .d-hero__copy--mobile,
  .d-hero .d-hero__cta {
    display: none !important;
  }

  .d-hero__copy {
    width: var(--d-copy-w);
    max-width: 560px;
    margin-left: 32px;
  }

  .d-hero__copy h1 {
    margin: 0 0 11px;
    color: var(--d-navy);
    font-family: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
    font-size: 94px;
    font-weight: 400;
    line-height: 0.88;
    letter-spacing: 0.002em;
  }

  .d-hero__star {
    display: inline-block;
    margin-left: 0.06em;
    color: var(--d-ice);
    font-family: Montserrat, sans-serif;
    font-size: 0.34em;
    font-weight: 400;
    vertical-align: 0.55em;
    line-height: 1;
  }

  .d-hero__lead {
    max-width: 470px;
    margin: 0 0 12px;
    color: var(--d-navy);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.34;
    letter-spacing: 0.028em;
    text-transform: uppercase;
  }

  .d-hero__benefits {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    color: var(--d-navy);
    font-family: Montserrat, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
  }

  .d-hero__benefit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  .d-hero__benefit-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    color: var(--d-navy);
    stroke-width: 1.35;
    fill: none;
  }

  .d-hero__geo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--d-navy);
    font-family: Montserrat, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.065em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .d-hero__geo .swiss-flag {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    align-self: center;
  }

  .d-hero__rail {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    height: var(--d-hero-rail-h);
    border-top: 1px solid rgba(13, 24, 42, 0.08);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
  }

  .d-hero__rail .shell {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .d-hero__rail span {
    color: var(--d-ice);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
  }

  /* ── Services (compact reference composition) ── */
  .d-hero + .services-section {
    padding: 0 0 32px;
    background: var(--d-mist);
  }

  .d-hero + .services-section > .shell {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .d-hero + .services-section .section-heading {
    order: 3;
    max-width: 860px;
    margin: 28px 0 0;
    padding-top: 8px;
  }

  .d-hero + .services-section .section-heading .eyebrow {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .d-hero + .services-section .service-grid {
    order: 1;
    margin: 0;
    padding-top: 0;
    gap: 8px;
  }

  .d-hero + .services-section .services-more-wrap {
    order: 2;
    display: flex;
    justify-content: center;
    margin: 10px 0 0;
  }

  .d-hero + .services-section .services-more {
    min-width: 336px;
    min-height: 48px;
    padding: 13px 44px;
    font-size: 0.72rem;
    letter-spacing: 0.075em;
    background: var(--d-navy);
    box-shadow: 0 3px 10px rgba(15, 42, 68, 0.08);
  }

  .d-hero + .services-section .service-card {
    min-height: 168px;
    aspect-ratio: 2.12 / 1;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(9, 20, 38, 0.06);
  }

  .d-hero + .services-section .service-card img {
    filter: saturate(1.02) brightness(1.08) contrast(1.01);
  }

  .d-hero + .services-section .service-card:nth-child(n + 4) img {
    filter: saturate(1.04) brightness(1.13) contrast(1.03);
  }

  .d-hero + .services-section .service-card:nth-child(5) img {
    filter: saturate(1.05) brightness(1.17) contrast(1.04);
  }

  .d-hero + .services-section .service-shade {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.56) 0%,
      rgba(255, 255, 255, 0.3) 11%,
      rgba(230, 242, 251, 0.07) 22%,
      rgba(255, 255, 255, 0) 38%
    );
  }

  .d-hero + .services-section .service-card::after {
    border-color: rgba(15, 42, 68, 0.1);
  }

  .d-hero + .services-section .service-index {
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--d-navy);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(15, 42, 68, 0.14);
  }

  .d-hero + .services-section .service-copy {
    top: 10px;
    bottom: auto;
    left: 40px;
    right: 44px;
  }

  .d-hero + .services-section .service-copy h3 {
    margin: 0;
    color: var(--d-navy);
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.88rem, 1.15vw, 1.12rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .d-hero + .services-section .service-copy p {
    display: none;
  }

  .d-hero + .services-section .service-arrow {
    top: 8px;
    bottom: auto;
    right: 10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1.5px solid rgba(15, 42, 68, 0.52);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.62);
    color: var(--d-navy);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
  }

  .d-hero + .services-section .service-card:hover .service-arrow {
    background: #fff;
    border-color: var(--d-navy);
    color: var(--d-navy);
  }
}

/* ── Mobile (preserved) ── */
@media (max-width: 900px) {
  .d-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(13, 24, 42, 0.08);
  }

  .d-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    gap: 12px;
  }

  .d-header__logo img {
    width: 136px;
    height: auto;
    max-height: 36px;
    object-fit: contain;
  }

  .d-header__nav,
  .d-header__cta {
    display: none;
  }

  .d-header .menu-button {
    display: grid;
  }

  .d-hero__copy--desktop {
    display: none;
  }

  .d-hero__copy--mobile {
    display: block;
  }

  .d-hero {
    position: relative;
    min-height: 0;
    height: auto;
    overflow: hidden;
    padding-bottom: 40px;
    background: #f2f5f8;
  }

  .d-hero__stage {
    position: absolute;
    inset: 0 0 40px;
  }

  .d-hero__art {
    position: absolute;
    inset: 0;
    background-color: #f2f5f8;
    background-image: url("assets/hero/hero-desktop-approved.webp");
    background-repeat: no-repeat;
    background-size: 125% auto;
    background-position: 74% 58%;
  }

  .d-hero__fade {
    position: absolute;
    inset: 0;
    width: auto;
    z-index: 2;
    background: linear-gradient(
      90deg,
      rgba(242, 245, 248, 0.96) 0%,
      rgba(242, 245, 248, 0.82) 42%,
      rgba(242, 245, 248, 0.18) 72%,
      transparent 100%
    );
  }

  .d-hero__inner {
    position: relative;
    z-index: 3;
    min-height: 288px;
    height: auto;
    padding: 28px 0 16px;
    display: flex;
    align-items: flex-start;
  }

  .d-hero__copy {
    width: auto;
    max-width: none;
  }

  .d-hero__copy h1 {
    margin-bottom: 12px;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(2.4rem, 9.5vw, 3.2rem);
    line-height: 0.9;
    color: #0F2A44;
  }

  .d-hero__lead {
    margin-bottom: 12px;
    font-size: clamp(0.68rem, 3vw, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    color: #0F2A44;
  }

  .d-hero__benefits {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
    font-size: clamp(0.5rem, 2.3vw, 0.56rem);
    color: #0F2A44;
  }

  .d-hero__benefit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .d-hero__benefit-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    stroke: currentColor;
    fill: none;
  }

  .d-hero__geo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #0F2A44;
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.58rem, 2.6vw, 0.64rem);
    font-weight: 700;
    letter-spacing: 0.065em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .d-hero__geo .swiss-flag {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
  }

  .d-hero__rail {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    height: 40px;
    border-top: 1px solid rgba(13, 24, 42, 0.08);
    background: #fff;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .d-hero__rail .shell {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .d-hero__rail span {
    color: #6FAED9;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
  }
}

/* ── Tablet hero stack (769–900px) ── */
@media (min-width: 769px) and (max-width: 900px) {
  .d-hero__inner {
    padding: 28px 14px 16px 18px;
  }

  .d-hero__copy--mobile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .d-hero__copy--mobile .d-hero__geo {
    display: flex;
    max-width: none;
    margin: 0 0 12px;
  }

  .d-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: #0F2A44;
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 42, 68, 0.12);
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.62rem, 2.65vw, 0.71rem);
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
  }

  .d-hero__cta span {
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 0.82em;
    font-weight: 400;
    line-height: 1;
  }

  .d-hero__cta:focus-visible {
    outline: 3px solid rgba(111, 174, 217, 0.45);
    outline-offset: 3px;
  }
}

/* ── Mobile refinement (≤768px only) ── */
@media (max-width: 768px) {
  .d-hero__stage {
    max-width: 100%;
    overflow: hidden;
    background-color: #f2f5f8;
  }

  .d-hero__inner {
    min-height: 300px;
    padding: 28px 14px 14px 18px;
  }

  .d-hero__copy--mobile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .d-hero__eyebrow {
    max-width: 72%;
    margin: 0 0 10px;
    color: #6FAED9;
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.54rem, 2.3vw, 0.62rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .d-hero__eyebrow-star {
    color: #6FAED9;
    font-family: Montserrat, sans-serif;
    font-size: 0.72em;
    font-weight: 400;
    letter-spacing: 0;
  }

  .d-hero__copy--mobile h1 {
    max-width: 78%;
    margin: 0 0 18px;
    padding-right: 0;
    color: #0F2A44;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: clamp(2rem, 9vw, 2.65rem);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 0;
    overflow-wrap: break-word;
  }

  .d-hero__copy--mobile .d-hero__lead {
    max-width: 68%;
    margin: 0 0 18px;
    color: #0F2A44;
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.68rem, 3vw, 0.8rem);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-transform: none;
    overflow-wrap: break-word;
  }

  .d-hero__services {
    max-width: 74%;
    margin: 0 0 18px;
    color: #4A6275;
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.58rem, 2.5vw, 0.68rem);
    font-weight: 600;
    line-height: 1.42;
    letter-spacing: 0.015em;
    overflow-wrap: break-word;
  }

  .d-hero__copy--mobile .d-hero__geo {
    max-width: 70%;
    margin: 0 0 12px;
  }

  .d-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: #0F2A44;
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 42, 68, 0.12);
    font-family: Montserrat, sans-serif;
    font-size: clamp(0.62rem, 2.65vw, 0.71rem);
    font-weight: 700;
    letter-spacing: 0.07em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
  }

  .d-hero__cta span {
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 0.82em;
    font-weight: 400;
    line-height: 1;
  }

  .d-hero__cta:focus-visible {
    outline: 3px solid rgba(111, 174, 217, 0.45);
    outline-offset: 3px;
  }

  .d-hero__fade {
    background: linear-gradient(
      90deg,
      rgba(242, 245, 248, 0.96) 0%,
      rgba(242, 245, 248, 0.82) 42%,
      rgba(242, 245, 248, 0.18) 72%,
      transparent 100%
    );
  }

  .d-hero__art {
    inset: 0 -28px -58px -8px;
    background-color: #f2f5f8;
    background-size: 148% auto;
    background-position: 77% 68%;
  }
}
