/* Pixel tuning pass against the generated AppsGet desktop/mobile references.
   Kept isolated until the screenshot pass is approved. */

/* The source artwork already contains the correct phone/background composition.
   Desktop must be scaled by height, not stretched to the viewport width. */
@media (min-width: 901px) {
  .home-page .reference-hero-art { background: #091019 !important; }
  .home-page .reference-hero-art img {
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: right center !important;
    transform: none !important;
    animation: none !important;
  }
  .home-page .reference-hero-art::after {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg,#091019 0%,#091019 13%,rgba(9,16,25,.95) 18%,rgba(9,16,25,.62) 27%,rgba(9,16,25,.16) 36%,rgba(9,16,25,0) 43%);
  }
}

@media (min-width: 1401px) {
  .home-page .redesigned-topbar .brand { font-size: 31px !important; }
  .home-page .redesigned-topbar .brand i { width: 37px; height: 37px; flex-basis: 37px; }
  .home-page .redesigned-topbar .navbtn.primary { width: 176px; padding-left: 22px; padding-right: 22px; }
  .home-page .reference-hero { height: clamp(760px, 48.12vw, 870px); }
}

/* 1312-class desktop: match the compact generated reference without wrapping CTAs. */
@media (min-width: 901px) and (max-width: 1400px) {
  .home-page .redesigned-topbar {
    width: calc(100% - 12.6vw);
    min-height: 72px;
    padding: 14px 0 12px;
  }
  .home-page .redesigned-topbar .brand {
    margin-right: 48px;
    font-size: 26px !important;
  }
  .home-page .redesigned-topbar .brand i {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    margin-right: 12px;
  }
  .home-page .site-nav { gap: 31px; }
  .home-page .site-nav a { font-size: 12px; }
  .home-page .redesigned-nav-actions { gap: 10px; }
  .home-page .header-search-trigger { width: 250px; height: 44px; }
  .home-page .header-search-trigger span { font-size: 12px; }
  .home-page .header-cart-trigger { width: 46px; height: 44px; }
  .home-page .redesigned-topbar .navbtn.primary {
    width: 132px;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 12px;
  }

  .home-page .reference-hero { height: clamp(620px,48.12vw,690px); }
  .home-page .reference-hero .signal-hero-copy {
    left: max(28px,6.3vw);
    top: 82px;
    width: min(600px,48vw);
  }
  .home-page .reference-eyebrow {
    margin-bottom: 17px;
    padding: 7px 12px;
    font-size: 9px;
  }
  .home-page .reference-hero-title {
    max-width: 575px !important;
    font-size: clamp(54px,4.75vw,64px) !important;
    line-height: .915 !important;
  }
  .home-page .reference-hero .signal-hero-lead {
    max-width: 500px;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.44;
  }
  .home-page .reference-hero .hero-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin-top: 15px;
    gap: 11px;
    width: auto !important;
  }
  .home-page .reference-hero .hero-primary,
  .home-page .reference-hero .hero-secondary {
    height: 51px;
    min-height: 51px;
    border-radius: 13px;
    padding-left: 17px;
    padding-right: 17px;
    font-size: 14px;
  }
  .home-page .reference-hero .hero-primary { width: 241px; flex: 0 0 241px; }
  .home-page .reference-hero .hero-secondary { width: 215px; flex: 0 0 215px; }
  .home-page .secondary-play { width: 28px; height: 28px; margin-right: 9px; }
  .home-page .hero-benefits { gap: 25px; margin-top: 20px; }
  .home-page .hero-benefits > div { gap: 9px; font-size: 11px; }
  .home-page .benefit-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  .home-page .benefit-icon svg { width: 20px; height: 20px; }

  .home-page .hero-stats {
    left: max(28px,6.3vw);
    right: max(28px,6.3vw);
    bottom: 20px;
    min-height: 82px;
    padding: 0 22px;
    border-radius: 19px;
  }
  .home-page .hero-stats > div { min-height: 50px; gap: 12px; padding: 0 20px; }
  .home-page .hero-stats b { font-size: 18px; }
  .home-page .hero-stats small { font-size: 9px; }
  .home-page .stat-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
  .home-page .stat-icon svg { width: 21px; height: 21px; }
  .home-page .hero-stats .stat-last a { width: 42px; height: 42px; }

  /* Catalog geometry is intentionally close to the 1312 reference. */
  .home-page .catalog-inner { width: min(1190px, calc(100% - 120px)); }
  .home-page .catalog-surface .tools {
    width: min(1048px, 80vw);
    transform: translateY(-8px);
    padding: 10px 12px 9px;
    border-radius: 22px;
  }
  .home-page .catalog-surface .search { min-height: 52px; }
  .home-page .catalog-search-submit { height: 52px; }
  .home-page .catalog-surface .chips { justify-content: center; padding-top: 8px; }
  .home-page .catalog-surface .chip { min-height: 30px; padding: 6px 11px; font-size: 10px; }
  .home-page .catalog-heading { margin-top: 26px; }
  .home-page .catalog-heading h2 { font-size: 36px; }
  .home-page .catalog-heading p { font-size: 12px; }
  .home-page .catalog-subhead h3 { font-size: 14px; }
  .home-page .catalog-surface .app {
    min-height: 212px;
    padding: 13px;
    border-radius: 16px;
  }
  .home-page .catalog-surface .icon { width: 54px; height: 54px; flex-basis: 54px; border-radius: 14px; }
  .home-page .catalog-surface .name { font-size: 12px; }
  .home-page .catalog-surface .app-category { font-size: 8px; }
  .home-page .catalog-surface .app-description { font-size: 9px; line-height: 1.35; }
  .home-page .catalog-surface .catalog-availability { font-size: 9px; }
  .home-page .catalog-surface .catalog-price { font-size: 15px; }
  .home-page .catalog-surface .app-action-icon { width: 36px; height: 36px; }
}

/* Mobile uses the desktop artwork as a crop: keep the whole phone readable and
   fade the source image into the diagonal backing so there is no hard seam. */
@media (max-width: 900px) {
  .home-page .reference-hero { min-height: clamp(800px,195vw,840px); }
  .home-page .reference-hero-art {
    top: 158px;
    background: linear-gradient(90deg,#091019 0%,#091019 43%,#303b4c 55%,#c9d1dc 69%,#f3f6f9 82%,#f5f7fa 100%) !important;
  }
  .home-page .reference-hero-art img {
    top: 220px !important;
    right: auto !important;
    bottom: auto !important;
    left: -54vw !important;
    width: 165vw !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    animation: none !important;
    filter: brightness(1.05) saturate(1.02);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.35) 5%, #000 15%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.35) 5%, #000 15%, #000 100%);
  }
  .home-page .hero-art-note { top: 53%; right: 7%; }
  .home-page .hero-stats { bottom: 12px; }
}

@media (max-width: 430px) {
  .home-page .reference-hero { min-height: 820px; }
}
