/* v31 desktop preview: preserve the approved phone layout unchanged. */
@media (min-width: 721px) {
  /* Keep the quieter landscape from the user's latest desktop direction. */
  body.v31-calibrated.v30-preview.v20-home[data-page="home"] .hero::before {
    filter: saturate(.78);
  }

  /* A lightly blurred white surface, with less edge and shadow weight. */
  body.v31-calibrated.v30-preview.v20-home[data-page="home"] .hero-stage {
    border: 4px solid rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 42px rgba(31, 63, 51, .13),
                inset 0 0 0 1px rgba(229, 239, 235, .68);
  }

  body.v31-calibrated.v30-preview.v20-home[data-page="home"] .hero-stage:hover {
    border-color: rgba(255, 255, 255, .96);
  }

  /* Raise the contrast and size of the card's supporting copy. */
  body.v31-calibrated.v20-home .stage-state > p:not(.slide-kicker),
  body.v31-calibrated.v20-home .stage-slide > p:not(.slide-kicker) {
    color: #3d4c47;
    font-size: 15px;
  }

  body.v31-calibrated.v20-home .stage-state > small {
    color: #4d5b56;
    font-size: 11px;
  }

  body.v31-calibrated.v20-home .stage-top {
    color: #495851;
    font-size: 10px;
  }

  body.v31-calibrated.v20-home .slide-index {
    color: #4e5d58;
    font-size: 12px;
  }

  body.v31-calibrated.v20-home .slide-kicker {
    color: #3c6254;
    font-size: 12px;
  }
}

/* Desktop preview: give the landscape room to travel, and reveal the frame below it. */
@media (min-width: 1121px) {
  body.v31-calibrated.v20-home[data-page="home"] {
    --polish-frame-bottom: 10px;
    --polish-meter-bottom: -6px;
  }

  body.v31-calibrated.v30-preview.v20-home[data-page="home"] .hero::before {
    transform: translate3d(
      var(--polish-bg-x, 0px),
      var(--polish-bg-y, 0px),
      0
    ) scale(1.035);
  }

  body.v31-calibrated[data-page="home"] .v31-viewport-frame {
    bottom: var(--polish-frame-bottom);
    border-radius: 30px 30px 46px 46px;
  }

  /* Keep the original progress animation inside the white frame, away from the artwork. */
  body.v31-calibrated.v20-home[data-page="home"] .hero > .v21-scroll-meter {
    opacity: 0;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v31-viewport-frame .v21-scroll-meter {
    position: absolute;
    left: 46px;
    right: 46px;
    bottom: var(--polish-meter-bottom);
    height: 4px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v31-viewport-frame .v21-scroll-meter b {
    background: #2f7844;
    border-radius: 999px;
    box-shadow: none;
  }

  /* Small actions need legibility over the halftone field, not a new accent block. */
  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue {
    color: #244833;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .08em;
    gap: 0;
    text-shadow: 0 1px 4px rgba(255, 255, 255, .7);
    transition: color .2s ease;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue i {
    display: none;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue span {
    transition: transform .2s ease;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue:is(:hover, :focus-visible) {
    color: #143a27;
  }

  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue:is(:hover, :focus-visible) span {
    transform: translateX(3px);
  }

  body.v31-calibrated.v20-home[data-page="home"] .contact-line .copy-email {
    padding: 5px 10px;
    background: rgba(255, 255, 255, .7);
    box-shadow: inset 0 0 0 1px rgba(41, 89, 53, .2);
    color: #244432;
    font-size: 11px;
    font-weight: 650;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease;
  }

  body.v31-calibrated.v20-home[data-page="home"] .contact-line .copy-email:hover {
    background: rgba(255, 255, 255, .9);
    box-shadow: inset 0 0 0 1px rgba(41, 89, 53, .38);
  }

  body.v31-calibrated.v20-home[data-page="home"] .v20-scroll-cue:focus-visible,
  body.v31-calibrated.v20-home[data-page="home"] .contact-line .copy-email:focus-visible {
    outline: 2px solid #397e4f;
    outline-offset: 4px;
  }
}

/* On a short desktop window, leave just enough white edge to keep the card visible. */
@media (min-width: 1121px) and (max-height: 739px) {
  body.v31-calibrated.v20-home[data-page="home"] {
    --polish-frame-bottom: 6px;
    --polish-meter-bottom: -5px;
  }
}
