/* iPhone visibility and overlap fixes for live static bundle */

:root {
  --ios-safe-top: env(safe-area-inset-top, 0px);
  --ios-safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: calc(var(--ios-safe-top) + 5.75rem);
  }

  /* Keep sticky header clear of the notch/status area and improve legibility over content */
  header.sticky.top-0.z-50 {
    top: 0;
    z-index: 70;
    padding-top: calc(var(--ios-safe-top) + 0.35rem);
    padding-bottom: 0.35rem;
    background: linear-gradient(
      180deg,
      rgba(243, 247, 251, 0.98) 0%,
      rgba(243, 247, 251, 0.88) 56%,
      rgba(243, 247, 251, 0) 100%
    );
  }

  header.sticky.top-0.z-50 > .container > .brand-surface {
    background-color: rgba(255, 255, 255, 0.97);
    border-color: rgba(21, 60, 84, 0.12);
    box-shadow: 0 14px 34px -24px rgba(15, 84, 132, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Increase tap target size for menu button on iPhone */
  header button[aria-label="Toggle menu"] {
    width: 44px;
    height: 44px;
  }

  /* Improve readability of dense card labels on narrow screens */
  .brand-card p[class*="tracking-[0.22em]"],
  .brand-card p[class*="tracking-[0.16em]"] {
    letter-spacing: 0.14em;
    font-size: 0.72rem;
  }

  .brand-card .section-copy,
  .brand-card p.text-sm.leading-relaxed,
  .brand-card p.text-base.leading-relaxed {
    line-height: 1.65;
  }

  /* Preserve breathing room above content that appears directly below sticky nav */
  main {
    padding-top: 0.25rem;
    padding-bottom: max(0.25rem, var(--ios-safe-bottom));
  }
}
