/* ============================================================
   AQUEN — mobile responsive layer + custom "vent-fin" menu
   Loaded LAST so it overrides the base section styles.

   Below 860px the header collapses into a full-screen overlay.
   The toggle is not a generic 3-bar hamburger: it echoes the
   bottle's sculpted vent fins (graduated-width bars) and ripples
   into an X inside a water-ripple ring when the menu opens.
   ============================================================ */

/* ---- Toggle hidden on desktop; overlay inert until opened ---- */
.nav-toggle { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 6vh, 64px);
  padding: clamp(104px, 17vh, 168px) var(--hero-pad) clamp(40px, 7vh, 72px);
  background: #0a0a0a;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  transition: opacity .45s var(--ease-out),
              clip-path .6s var(--ease-out),
              visibility 0s linear .6s;
}
.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transition: opacity .4s var(--ease-out), clip-path .65s var(--ease-out);
}

.mobile-menu-links { display: flex; flex-direction: column; gap: clamp(4px, 1.2vh, 12px); }
.mm-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.mm-index {
  font-size: var(--t-12);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--soni-orange);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.mm-mask { display: inline-block; overflow: hidden; padding-bottom: 0.06em; }
.mm-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 12vw, 72px);
  line-height: 1.0;
  letter-spacing: var(--tr-tight);
  transform: translateY(112%);
  transition: transform .6s var(--ease-out), color .25s var(--ease-out);
}
.mm-row:active .mm-label,
.mm-row:hover .mm-label { color: var(--soni-orange); }

.mobile-menu.is-open .mm-label { transform: translateY(0); }
.mobile-menu.is-open .mm-index { opacity: 1; transform: none; }

/* staggered reveal of the rows */
.mobile-menu-links .mm-row:nth-child(1) .mm-label,
.mobile-menu-links .mm-row:nth-child(1) .mm-index { transition-delay: .05s; }
.mobile-menu-links .mm-row:nth-child(2) .mm-label,
.mobile-menu-links .mm-row:nth-child(2) .mm-index { transition-delay: .10s; }
.mobile-menu-links .mm-row:nth-child(3) .mm-label,
.mobile-menu-links .mm-row:nth-child(3) .mm-index { transition-delay: .15s; }
.mobile-menu-links .mm-row:nth-child(4) .mm-label,
.mobile-menu-links .mm-row:nth-child(4) .mm-index { transition-delay: .20s; }
.mobile-menu-links .mm-row:nth-child(5) .mm-label,
.mobile-menu-links .mm-row:nth-child(5) .mm-index { transition-delay: .25s; }
.mobile-menu-links .mm-row:nth-child(6) .mm-label,
.mobile-menu-links .mm-row:nth-child(6) .mm-index { transition-delay: .30s; }
.mobile-menu-links .mm-row:nth-child(7) .mm-label,
.mobile-menu-links .mm-row:nth-child(7) .mm-index { transition-delay: .35s; }

.mm-foot {
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.mobile-menu.is-open .mm-foot { opacity: 1; transform: none; transition-delay: .42s; }
.mm-cta { align-self: flex-start; }
.mm-tag {
  font-size: var(--t-14);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: var(--tr-base);
  color: rgba(255, 255, 255, 0.55);
  max-width: 280px;
}

/* ============================================================
   <= 860px — header becomes the vent-fin toggle + overlay
   ============================================================ */
@media (max-width: 860px) {
  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .nav-links,
  .nav-cta-wrap { display: none; }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -10px;           /* optical: pull X to the edge */
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle-fins { position: relative; width: 26px; height: 16px; }
  .nav-toggle-fins i {
    position: absolute;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform-origin: center;
    transition: width .4s var(--ease-out),
                transform .45s var(--ease-out),
                top .4s var(--ease-out),
                opacity .25s var(--ease-out),
                background .3s var(--ease-out);
  }
  /* graduated widths = the sculpted vent, not a flat hamburger */
  .nav-toggle-fins i:nth-child(1) { top: 0;   width: 26px; }
  .nav-toggle-fins i:nth-child(2) { top: 7px;  width: 15px; }
  .nav-toggle-fins i:nth-child(3) { top: 14px; width: 21px; }

  /* water-ripple ring that blooms on open */
  .nav-toggle::after {
    content: "";
    position: absolute;
    inset: 1px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    transform: scale(0.5);
    opacity: 0;
    transition: transform .55s var(--ease-out), opacity .4s var(--ease-out), border-color .3s var(--ease-out);
  }

  /* solid (scrolled) header → dark fins on white bar */
  .nav.nav-solid .nav-toggle-fins i { background: #000; }
  .nav.nav-solid .nav-toggle::after { border-color: rgba(0, 0, 0, 0.4); }

  /* OPEN — keep header clear over the dark overlay, morph to X */
  .nav.menu-open {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: none;
  }
  .nav.menu-open .brand { color: #fff; }
  .nav.menu-open .brand img { filter: invert(1); }
  .nav.menu-open .nav-toggle-fins i { background: #fff; }
  .nav.menu-open .nav-toggle-fins i:nth-child(1) { top: 7px; right: 1px; width: 24px; transform: rotate(45deg); }
  .nav.menu-open .nav-toggle-fins i:nth-child(2) { width: 24px; opacity: 0; transform: translateX(12px); }
  .nav.menu-open .nav-toggle-fins i:nth-child(3) { top: 7px; right: 1px; width: 24px; transform: rotate(-45deg); }
  .nav.menu-open .nav-toggle::after { transform: scale(1); opacity: 1; border-color: rgba(255, 255, 255, 0.45); }

  /* ---- Hero headline: scale with the viewport so nothing clips ---- */
  .headline { transform: translateY(-2vh); }
  .headline .word { font-size: clamp(64px, 18vw, 150px); }
  .line-1 { padding-left: 0; }
  .line-2 { margin-top: 0; padding: 0 0 0 6vw; }
  .caption-block { max-width: min(78vw, 320px); gap: 18px; }
  .caption-rule { width: 150px; }
}

/* prevent background scroll while the overlay is open */
html.menu-lock { overflow: hidden; }

/* ============================================================
   Phone-level polish for the rest of the page
   ============================================================ */
@media (max-width: 640px) {
  /* Retention chart: let tabs scroll, let bars regain proportion */
  .retention-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .retention-tabs::-webkit-scrollbar { display: none; }
  .retention-tabs span { white-space: nowrap; }
  .retention-bar { min-width: 150px; gap: 10px; padding: 0 12px; }
  .retention-bar strong { font-size: var(--t-12); }
  .retention-bar span { font-size: var(--t-12); }

  /* Craft caption: flow under the image instead of covering it */
  .craft-caption {
    position: static;
    max-width: none;
    margin-top: 2px;
  }
}

@media (max-width: 560px) {
  .systems-meta { flex-direction: column; align-items: flex-start; gap: 20px; }
  .systems-specs { text-align: left; }
  .systems-specs div { justify-content: flex-start; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .headline .word { font-size: clamp(56px, 19vw, 112px); }
  .caption-block p { font-size: var(--t-16); }
}

/* ---- Respect reduced motion: no slide/ripple, just fade ---- */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mm-label,
  .mm-index,
  .mm-foot,
  .nav-toggle-fins i,
  .nav-toggle::after { transition: opacity .2s linear; }
  .mm-label { transform: none; }
  .mm-index { transform: none; }
  .mm-foot { transform: none; }
}
