/* =========================================================
   AIRWYNN — Responsive stylesheet
   Mobile-first additions only. Desktop styles are NEVER
   overridden here — every rule in this file is either
   inside a max-width media query or targets mobile-only
   elements like .nav-hamburger and .nav-mobile-menu.
   ========================================================= */

/* ── Global overflow guard ──────────────────────────────── */
html  { overflow-x: hidden; }
body  { overflow-x: hidden; }
* { min-width: 0; }
img, video, canvas, svg { max-width: 100%; }

/* ── Safe-area utilities (iPhone notch / Dynamic Island) ── */
.safe-pad-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ── Hamburger button (hidden on desktop) ──────────────── */
.nav-hamburger {
  display:        none;
  background:     none;
  border:         none;
  cursor:         pointer;
  padding:        10px;
  min-width:      44px;
  min-height:     44px;
  align-items:    center;
  justify-content:center;
  flex-direction: column;
  gap:            5px;
  border-radius:  8px;
  margin-left:    auto;
  transition:     background .15s;
}
.nav-hamburger:hover { background: var(--surface); }
.nav-hamburger-bar {
  display:        block;
  width:          20px;
  height:         2px;
  background:     var(--text1);
  border-radius:  2px;
  transition:     transform .22s ease, opacity .22s ease, width .22s ease;
  pointer-events: none;
}
/* Animated X state when menu is open */
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu overlay ────────────────────────────────── */
.nav-mobile-menu {
  display:          none;
  position:         fixed;
  inset:            0;
  z-index:          999;
  background:       rgba(5,5,10,.97);
  backdrop-filter:  blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction:   column;
  padding:          calc(env(safe-area-inset-top, 0px) + 0px)
                    24px
                    calc(env(safe-area-inset-bottom, 0px) + 32px);
}
.nav-mobile-menu.open { display: flex; }

.nav-mobile-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          60px;
  flex-shrink:     0;
  border-bottom:   1px solid var(--border);
  margin-bottom:   8px;
}
.nav-mobile-brand {
  display:         flex;
  align-items:     center;
  gap:             9px;
  text-decoration: none;
}
.nav-mobile-brand img, .nav-mobile-brand svg { width: 24px; height: 24px; }
.nav-mobile-brand-name {
  font-size:     .875rem;
  font-weight:   700;
  letter-spacing:.14em;
  color:         #fff;
}
.nav-mobile-close {
  background:  none;
  border:      none;
  color:       var(--text2);
  cursor:      pointer;
  padding:     10px;
  min-width:   44px;
  min-height:  44px;
  display:     flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition:  color .15s;
  font-size:   1.25rem;
  line-height: 1;
}
.nav-mobile-close:hover { color: var(--text1); }

.nav-mobile-links {
  display:        flex;
  flex-direction: column;
  flex:           1;
  overflow-y:     auto;
  -webkit-overflow-scrolling: touch;
}
.nav-mobile-link {
  display:          flex;
  align-items:      center;
  font-size:        1.0625rem;
  font-weight:      500;
  color:            var(--text2);
  padding:          0 4px;
  min-height:       52px;
  text-decoration:  none;
  border-bottom:    1px solid var(--border);
  transition:       color .15s;
}
.nav-mobile-link:last-of-type { border-bottom: none; }
.nav-mobile-link:hover, .nav-mobile-link:active { color: var(--text1); }

.nav-mobile-divider {
  height:     1px;
  background: var(--border);
  margin:     16px 0;
}

.nav-mobile-cta {
  display:          flex;
  align-items:      center;
  justify-content:  center;
  min-height:       52px;
  padding:          14px 24px;
  margin-top:       20px;
  background:       var(--blue);
  color:            #fff;
  border-radius:    10px;
  font-size:        1rem;
  font-weight:      600;
  text-decoration:  none;
  text-align:       center;
  flex-shrink:      0;
  transition:       opacity .15s, transform .15s;
}
.nav-mobile-cta:hover { opacity: .9; transform: translateY(-1px); }

/* ── Show hamburger, hide desktop links on mobile ── */
@media (max-width: 640px) {
  .nav-hamburger { display: flex; margin-left: 0; }
  .nav-links     { display: none !important; }
  /* Get Started stays inside the mobile menu only (avoids crowding the
     header); Log In now appears directly in the header, next to the
     hamburger, so signing in never requires opening the menu. */
  .nav-cta:not(.nav-login) { display: none !important; }
  .nav           {
    top: 0 !important;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* Pushes [Log In][hamburger] as a pair to the right edge, leaving the
     logo alone on the left with generous space between the two groups. */
  .nav-cta-group {
    display: flex; align-items: center; gap: 10px;
    margin-left: auto; margin-right: 10px;
  }
  .nav-login {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 16px; font-size: .8125rem;
  }
  /* Mouse hover is JS-driven (onmouseenter/onmouseleave, desktop-only in
     effect since touch has no hover) — :active gives touch a visible
     press state of its own. */
  .nav-login:active { background: var(--surface) !important; }
}

/* ── Container padding tightening on small screens ── */
@media (max-width: 480px) {
  .container,
  .container-sm { padding: 0 16px; }
}
@media (max-width: 360px) {
  .container,
  .container-sm { padding: 0 12px; }
}

/* ── Hero section ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 100px 20px 64px; }
  .hero-headline { font-size: clamp(1.8rem, 7vw, 3rem); }
}
@media (max-width: 480px) {
  .hero { padding: 80px 16px 52px; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    justify-content: center;
    width: 100%;
  }
  .hero-trust { font-size: .75rem; }
  .hero-badge { font-size: .75rem; padding: 4px 10px; }
}
@media (max-width: 375px) {
  .hero { padding: 72px 12px 44px; }
  .hero-headline { font-size: clamp(1.6rem, 9vw, 2.5rem); }
  .hero-sub { font-size: .9375rem; }
}

/* Prevent hero orbs from causing horizontal scroll */
.hero { overflow-x: hidden; }
.hero-bg { overflow: hidden; }
@media (max-width: 480px) {
  .hero-orb-1 { width: min(560px, 100vw); height: min(560px, 100vw); }
  .hero-orb-2 { width: min(380px, 80vw); height: min(380px, 80vw); }
}

/* ── Product window ────────────────────────────────────── */
@media (max-width: 640px) {
  .product-window { border-radius: 12px; }
  .pw-body { height: 220px; }
}
@media (max-width: 420px) {
  .pw-body { height: 180px; }
  .pw-navitem { display: none; }
  .pw-navitem:first-child, .pw-navitem.on { display: block; }
}
@media (max-width: 360px) {
  .pw-body { height: 150px; }
  .pw-statusbar { overflow: hidden; }
}

/* ── Buttons — touch-friendly minimum ─────────────────── */
@media (max-width: 768px) {
  .btn-primary, .btn-ghost {
    min-height: 44px;
    padding: 12px 20px;
  }
}

/* ── Proof strip ───────────────────────────────────────── */
@media (max-width: 480px) {
  .proof-strip { padding: 20px 0; }
  .proof-inner {
    gap: 14px;
    padding: 0 16px;
    justify-content: flex-start;
  }
  .proof-item { font-size: .8125rem; }
}

/* ── Section headings ─────────────────────────────────── */
@media (max-width: 480px) {
  .section-header { margin-bottom: 32px; }
  .section-header p {
    font-size: .9375rem;
    padding: 0 4px;
  }
}

/* ── Workflow overflow fix on 320px ───────────────────── */
@media (max-width: 340px) {
  .workflow-steps { grid-template-columns: 1fr; gap: 20px; }
}

/* ── Film section ─────────────────────────────────────── */
@media (max-width: 640px) {
  .film-stage { margin-top: 28px; }
  .film-frame { border-radius: 12px; }
}
@media (max-width: 480px) {
  .film-play-icon { width: 52px; height: 52px; }
}

/* ── AI section — prevent 700px pseudo-element overflow ── */
.ai-section { overflow: hidden; }

/* AI card row on very small screens */
@media (max-width: 420px) {
  .ai-card { padding: 18px 14px; }
  .ai-explain-row { flex-direction: column; gap: 2px; }
  .ai-explain-val { text-align: left; }
  .ai-conf-wrap { justify-content: flex-start; }
  .ai-conf-bar  { width: 60px; }
  .ai-card-actions { flex-direction: column; }
  .ai-action-btn { flex: none; }
}

/* ── Mission-critical grid (mc-grid) ─────────────────── */
@media (max-width: 400px) {
  .mc-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .mc-card  { padding: 18px 14px; }
}

/* ── Closing statement (mc-closing) ──────────────────── */
@media (max-width: 480px) {
  .mc-statement { font-size: .9375rem; }
  .mc-cta { padding: 11px 20px; font-size: .875rem; }
}

/* ── Industries section (already has breakpoints, gap fill) */
@media (max-width: 360px) {
  .industry-grid { grid-template-columns: 1fr; }
}

/* ── Footer ───────────────────────────────────────────── */
@media (max-width: 480px) {
  footer {
    padding: 36px 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-brand-desc { max-width: 100%; }
}

/* ── Forms (contact/access section) ─────────────────── */
@media (max-width: 480px) {
  .form-card { padding: 24px 16px; }
}

/* ── Showcase panels already hide at 700px, gap fill ── */
@media (max-width: 480px) {
  .showcase-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* ── Section spacing tighten on mobile ─────────────── */
@media (max-width: 480px) {
  .section    { padding: 48px 0; }
  .section-sm { padding: 36px 0; }
}

/* ── Floating fp-ring overflow fix ─────────────────── */
.fp-wrap { overflow: hidden; }

/* ── Experience cards (Interactive Demo / Enterprise Workspace) ─ */
@media (max-width: 480px) {
  .experience-card { padding: 24px 20px; gap: 20px; }
}
