/* Bray & Co — The Work desktop fidelity fix v2.3
   Loaded AFTER shared-header.css so WordPress/shared styles cannot override it.
   Desktop dimensions are capped to the original Codex composition instead of
   continuing to scale with viewport width. */

@media (min-width: 761px) {
  .site-header {
    position: fixed !important;
    top: 0 !important;
    height: 60px !important;
    padding: 0 max(54px, calc((100vw - 1240px) / 2 + 54px)) !important;
    background: #020B1D !important;
  }
  .site-header .logo { width: 78px !important; }
  .site-header .desktop-nav { gap: 32px !important; }
  .site-header .desktop-nav a,
  .site-header .header-cta {
    font-size: 10px !important;
    letter-spacing: .085em !important;
  }
  .site-header .header-cta {
    padding: 7px 13px !important;
  }

  .work-stage {
    min-height: 100svh !important;
    height: 100svh !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: start !important;
    padding: 113px 54px 16px !important;
  }

  .work-stage__heading {
    padding-top: 0 !important;
    text-align: center !important;
  }
  .work-stage__heading h1 {
    width: min(100%, 800px) !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    font-size: 56px !important;
    line-height: 1.02 !important;
    letter-spacing: -0.072em !important;
    transform: none !important;
  }
  .work-stage__heading h1 em { font-size: 1.14em !important; }
  .work-stage__subtitle {
    display: block !important;
    visibility: visible !important;
    margin: 25px 0 0 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    letter-spacing: .075em !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .case-carousel {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    height: auto !important;
    margin: 69px auto 0 !important;
    grid-template-columns: 48px 1fr 48px !important;
    perspective: none !important;
  }
  .case-carousel__viewport {
    height: 246px !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .case-carousel .case-card {
    width: 365px !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
  .carousel-arrow {
    width: 48px !important;
    height: 72px !important;
    font-size: 56px !important;
  }

  .case-summary {
    max-width: 800px !important;
    margin: 48px auto 0 !important;
  }
  .case-summary__title {
    margin: 0 !important;
    font-size: 39px !important;
    line-height: .95 !important;
  }
  .case-summary__description {
    margin: 11px auto 0 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }
  .work-stage__footer {
    padding-top: 22px !important;
    font-size: 10px !important;
  }
  .carousel-status {
    min-width: 100px !important;
    gap: 10px !important;
    font-size: 9px !important;
  }
  .carousel-status__line { width: 48px !important; }

  /* Do not let the WordPress admin toolbar alter the composition. */
  body.admin-bar .site-header { top: 32px !important; }
  body.admin-bar .work-stage {
    min-height: calc(100svh - 32px) !important;
    height: calc(100svh - 32px) !important;
  }
}

/* Ensure the supporting line never disappears because of the entrance state. */
@media (prefers-reduced-motion: no-preference) {
  body:not(.is-ready) .work-stage__subtitle,
  body.is-ready .work-stage__subtitle {
    opacity: 1 !important;
  }
}
