/* PCBA Partner homepage first-screen composition — 2026-08-13 v1 */

/*
 * Desktop only: keep the message, complete 3:1 product image, and proof row in
 * one coherent composition. Mobile retains its existing reading order.
 */
@media (min-width: 769px) {
  html.white-apple-theme.page-home body #hero.hero {
    min-height: 0 !important;
    height: auto !important;
    padding: clamp(24px, 3.4vh, 38px) 48px clamp(44px, 5.5vh, 60px) !important;
    align-items: flex-start !important;
    overflow: visible !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-container {
    width: 100% !important;
    max-width: 1440px !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-content {
    order: 1 !important;
    width: 100% !important;
    max-width: 1180px !important;
    height: auto !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-badge {
    width: auto !important;
    max-width: 100% !important;
    margin: 0 0 10px !important;
    font-size: clamp(13px, 1.05vw, 17px) !important;
    line-height: 1.3 !important;
  }

  html.white-apple-theme.page-home body #hero.hero h1 {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 !important;
    font-size: clamp(44px, 3.45vw, 60px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.04em !important;
    white-space: normal !important;
    text-wrap: balance !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-desc {
    width: 100% !important;
    max-width: 860px !important;
    margin: 12px auto 0 !important;
    font-size: clamp(16px, 1.12vw, 18px) !important;
    line-height: 1.42 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-buttons {
    width: auto !important;
    margin: 16px auto 0 !important;
    gap: 28px !important;
    justify-content: center !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-commitments {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px 18px !important;
    max-width: 980px !important;
    margin: 12px auto 0 !important;
    color: #6e6e73 !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-commitments span {
    position: relative;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-commitments span + span::before {
    content: "\00b7";
    position: absolute;
    left: -11px;
    color: #16877d;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-visual {
    order: 2 !important;
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 16px auto 0 !important;
    padding: 0 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-img-main {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 1 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-img-main picture,
  html.white-apple-theme.page-home body #hero.hero .hero-img-main img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-img-main img {
    /* Render the real oblique-view source without synthetic sharpening or filters. */
    image-rendering: auto !important;
    filter: none !important;
    transform: none !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-stats {
    width: calc(100% - 56px) !important;
    margin: 16px 28px 20px !important;
    gap: 10px !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-stats .stat,
  html.white-apple-theme.page-home body #hero.hero .hero-stats .stat:nth-child(n) {
    min-height: 96px !important;
    padding: 10px !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-stats .wa-metric-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-stats .stat-value {
    margin-top: 5px !important;
    font-size: 20px !important;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  html.white-apple-theme.page-home body #hero.hero {
    padding-right: 28px !important;
    padding-left: 28px !important;
  }

  html.white-apple-theme.page-home body #hero.hero h1 {
    max-width: 940px !important;
    font-size: clamp(40px, 5vw, 54px) !important;
  }
}

/* Mobile hero density — 20260814-home-mobile-spacing-v1
 * The unified header is sticky and already occupies document flow. Remove the
 * old fixed-header allowance so the opening message enters the first screen.
 */
@media (max-width: 768px) {
  html.white-apple-theme.page-home body #hero.hero {
    padding-top: 28px !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-commitments {
    display: grid !important;
    order: 5 !important;
    gap: 5px !important;
    margin: 14px 0 0 !important;
    color: #6e6e73 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  html.white-apple-theme.page-home body #hero.hero .hero-commitments span::before {
    content: "\2713" !important;
    position: static !important;
    margin-right: 7px;
    color: #36d1c4;
  }
}

/* Mobile service cards — 20260814-home-service-card-v1
 * Use an open editorial composition instead of nested card, image, badge, and
 * icon frames. The full card remains the link; copy, imagery, and order stay
 * unchanged.
 */
@media (max-width: 768px) {
  html.white-apple-theme.page-home body
  #services .services-grid.mobile-card-rail {
    align-items: flex-start !important;
  }

  html.white-apple-theme.page-home body
  #services .services-grid.mobile-card-rail > .service-card:nth-child(n) {
    height: auto !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html.white-apple-theme.page-home body
  #services .service-card > .service-card-img.img-placeholder {
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 2 !important;
    border: 0 !important;
    border-radius: 20px !important;
    background: transparent !important;
    overflow: hidden !important;
  }

  html.white-apple-theme.page-home body
  #services .service-card-img > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html.white-apple-theme.page-home body
  #services .service-card-body {
    flex: 0 0 auto !important;
    align-items: flex-start !important;
    padding: 18px 4px 8px !important;
    gap: 0 !important;
  }

  html.white-apple-theme.page-home body
  #services .service-badge {
    place-self: auto !important;
    align-self: flex-start !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--wa-accent) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.08em !important;
  }

  html.white-apple-theme.page-home body
  #services .service-badge i {
    width: 12px !important;
    height: 12px !important;
  }

  html.white-apple-theme.page-home body
  #services .service-icon {
    display: none !important;
  }

  html.white-apple-theme.page-home body
  #services .service-card h3 {
    margin: 0 0 10px !important;
    font-size: 19px !important;
    line-height: 1.22 !important;
    letter-spacing: -0.015em !important;
  }

  html.white-apple-theme.page-home body
  #services .service-card p {
    margin: 0 !important;
  }

  html.white-apple-theme.page-home body
  #services .service-list {
    margin: 18px 0 0 !important;
    gap: 8px !important;
  }
}
