/* Desktop viewport rhythm and normal standalone-PWA behavior. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body,
main {
  min-height: 100%;
}

main > section,
main > header,
#aiera-company-contact,
footer {
  width: 100%;
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

@media (min-width: 1100px) {
  :root { --aiera-desktop-header: 92px; }

  #top.hero {
    height: calc(100svh - var(--aiera-desktop-header)) !important;
    min-height: 620px !important;
    max-height: 900px !important;
  }

  #top .hero-photo,
  #top .hero-shade {
    height: 100% !important;
  }

  #top .hero-content {
    height: 100% !important;
  }

  #top .hero-label { margin-bottom: 1.25rem !important; }
  #top .hero-content > p { margin-block: 1.15rem 1.45rem !important; }
  #top .hero-orbit { max-width: min(38vw, 440px); max-height: min(38vw, 440px); }
  #top .orbit-one { right: -4rem !important; }
  #top .orbit-two { right: 17rem !important; }

  .problems.section,
  .owner-story.section,
  .platform.section,
  .outcomes.section,
  .continuity.section,
  .roadmap.section,
  .final-cta.section {
    padding-block: clamp(3.4rem, 7vh, 4.8rem) !important;
  }

  .problems.section,
  .owner-story.section,
  .outcomes.section,
  .continuity.section,
  .roadmap.section,
  .final-cta.section,
  #aiera-company-contact {
    min-height: calc(100svh - var(--aiera-desktop-header));
  }

  .section-intro,
  .platform-head,
  .roadmap-head {
    gap: clamp(2rem, 5vw, 4rem) !important;
  }

  .problem-grid article {
    padding: clamp(1.25rem, 1.8vw, 1.7rem) !important;
  }

  .owner-photo {
    height: min(63vh, 560px) !important;
  }

  .delivery-story {
    padding-block: clamp(3.5rem, 7vh, 4.8rem) !important;
  }

  .delivery-story .ds-shell {
    width: min(1380px, calc(100% - 5rem)) !important;
  }

  .delivery-story .ds-head {
    margin-bottom: 1.4rem !important;
  }

  .delivery-story .ds-title {
    font-size: clamp(2.65rem, 4.1vw, 3.9rem) !important;
    line-height: 1.02 !important;
  }

  .delivery-story .ds-frame,
  .delivery-story .ds-media,
  .delivery-story .ds-content {
    height: 480px !important;
    min-height: 480px !important;
  }

  .delivery-story .ds-content {
    padding: clamp(2rem, 3.2vw, 2.75rem) !important;
  }

  .delivery-story .ds-track {
    height: 82px !important;
    margin-top: 1.1rem !important;
  }

  #platform .platform-head {
    margin-bottom: 2rem !important;
  }

  #platform .platform-shell {
    min-height: 555px !important;
  }

  #platform .area-nav,
  #platform .area-content {
    min-height: 555px !important;
  }

  #platform .area-nav { padding: .65rem !important; }
  #platform .area-nav button { padding: .72rem .78rem !important; }
  #platform .area-content .area-copy { padding: clamp(1.7rem, 2.8vw, 2.5rem) !important; }
  #platform .feature-list > div { padding-block: .72rem !important; }
  #platform .platform-note { margin-top: 1rem !important; }

  #enterprise-depth {
    padding: clamp(3.5rem, 7vh, 4.8rem) clamp(1.2rem, 4vw, 4rem) !important;
  }

  #enterprise-depth .ed-orbit--one {
    width: 30rem;
    height: 30rem;
    top: -21rem;
    right: -2rem;
  }

  #enterprise-depth .ed-orbit--two {
    left: -7rem;
  }

  #enterprise-depth .ed-head {
    grid-template-columns: minmax(0, 1.32fr) minmax(280px, .68fr) !important;
    gap: clamp(2.5rem, 5vw, 5rem) !important;
  }

  #enterprise-depth .ed-head h2 {
    max-width: 17ch !important;
    font-size: clamp(2.8rem, 4.45vw, 4.8rem) !important;
    line-height: 1 !important;
  }

  #enterprise-depth .ed-head > p {
    font-size: clamp(.95rem, .8rem + .25vw, 1.08rem) !important;
    line-height: 1.65 !important;
  }

  #enterprise-depth .ed-proof {
    margin: 1.45rem 0 1rem !important;
  }

  #enterprise-depth .ed-explorer {
    min-height: 0 !important;
  }

  #enterprise-depth .ed-tabs {
    padding: .7rem !important;
  }

  #enterprise-depth .ed-tabs button {
    padding: .82rem .72rem !important;
  }

  #enterprise-depth .ed-panel {
    padding: clamp(2rem, 3vw, 2.7rem) !important;
  }

  #enterprise-depth .ed-panel-top {
    gap: 1rem !important;
  }

  #enterprise-depth .ed-panel h3 {
    max-width: 25ch !important;
    font-size: clamp(2.1rem, 3.1vw, 3.25rem) !important;
    line-height: 1.04 !important;
  }

  #enterprise-depth .ed-panel-number {
    font-size: clamp(2.5rem, 4vw, 4.2rem) !important;
  }

  #enterprise-depth .ed-intro {
    margin: .95rem 0 1rem !important;
    font-size: .92rem !important;
    line-height: 1.62 !important;
  }

  #enterprise-depth .ed-result {
    margin-bottom: 1rem !important;
    padding: .75rem .9rem !important;
  }

  #enterprise-depth .ed-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: .7rem !important;
  }

  #enterprise-depth .ed-feature,
  #enterprise-depth .ed-feature:last-child:nth-child(odd) {
    grid-column: auto !important;
    min-height: 0 !important;
    padding: .95rem !important;
  }

  #enterprise-depth .ed-feature h4 {
    font-size: .94rem !important;
    line-height: 1.28 !important;
  }

  #enterprise-depth .ed-feature p {
    font-size: .82rem !important;
    line-height: 1.55 !important;
  }

  .outcomes .outcome-grid {
    margin-top: clamp(1.5rem, 4vh, 2.7rem) !important;
  }

  #roadmap .roadmap-grid {
    margin-top: clamp(1.5rem, 4vh, 2.7rem) !important;
  }

  #contact.final-cta {
    min-height: calc(100svh - var(--aiera-desktop-header)) !important;
  }

  #aiera-company-contact {
    display: flex;
    align-items: center;
    padding-block: clamp(3.4rem, 7vh, 4.8rem) !important;
  }
}

@media (min-width: 1100px) and (max-height: 760px) {
  :root { --aiera-desktop-header: 84px; }

  .site-header { min-height: 84px !important; }

  #top.hero {
    min-height: 610px !important;
  }

  #top h1 {
    font-size: clamp(4rem, 6.2vw, 4.75rem) !important;
  }

  .problems.section,
  .owner-story.section,
  .platform.section,
  .outcomes.section,
  .continuity.section,
  .roadmap.section,
  .final-cta.section,
  .delivery-story,
  #enterprise-depth,
  #aiera-company-contact {
    padding-block: 3.25rem !important;
  }
}

@media (max-width: 1099px) {
  main > section,
  #aiera-company-contact {
    min-height: auto;
  }

  #top.hero {
    max-width: 100%;
    overflow: hidden;
  }

  #enterprise-depth .ed-feature p {
    font-size: .86rem !important;
    line-height: 1.58 !important;
  }
}

@media (display-mode: standalone) {
  html { background: #082b33; }

  body {
    min-height: 100svh;
    overscroll-behavior-y: auto;
  }

  .site-header {
    min-height: calc(92px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom)) !important;
  }

  a,
  button {
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}