/* SomaLofi responsive pass: shared nav + layout guardrails */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.nav-lock {
  overflow: hidden;
}

main,
section,
footer,
.wrap,
.section,
.hero,
.hero-frame {
  max-width: 100%;
}

.nav {
  min-height: 72px;
}

.nav-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong, rgba(200,200,215,0.18));
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(207,150,90,0.16), transparent 60%),
    rgba(8,11,17,0.68);
  color: var(--ink, var(--text, #e9e5dd));
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.nav-menu-toggle:hover,
.nav-menu-toggle:focus-visible {
  border-color: var(--bronze, #cf965a);
  background:
    radial-gradient(circle at 50% 0%, rgba(207,150,90,0.24), transparent 60%),
    rgba(14,17,23,0.84);
}

.nav-menu-toggle:focus-visible,
.mobile-menu a:focus-visible {
  outline: 2px solid var(--teal, #4fb6c4);
  outline-offset: 3px;
}

.nav-menu-toggle span,
.nav-menu-toggle::before,
.nav-menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  border-radius: 999px;
  transition: transform .25s ease, opacity .2s ease;
}

.nav-menu-toggle {
  gap: 5px;
  flex-direction: column;
}

.nav.nav-open .nav-menu-toggle span {
  opacity: 0;
}

.nav.nav-open .nav-menu-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

.nav.nav-open .nav-menu-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: calc(var(--nav-height, 72px) + 10px);
  right: var(--gutter, clamp(20px, 4vw, 56px));
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--nav-height, 72px) - 28px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border-strong, rgba(200,200,215,0.18));
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18,26,37,0.96), rgba(8,11,17,0.98)),
    radial-gradient(420px 240px at 100% 0%, rgba(207,150,90,0.12), transparent 65%),
    radial-gradient(360px 260px at 0% 100%, rgba(79,182,196,0.10), transparent 65%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}

.nav.nav-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mobile-menu::before {
  content: "SomaLofi";
  display: block;
  padding: 6px 10px 12px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted, #7e7b75);
  border-bottom: 1px solid var(--border, rgba(180,180,190,0.10));
}

.mobile-menu-list,
.mobile-menu-actions {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink-dim, var(--text-dim, #b6b0a5));
  font-size: 15px;
  line-height: 1.2;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mobile-menu a:hover,
.mobile-menu a.current,
.mobile-menu a.is-current {
  color: var(--ink, var(--text, #e9e5dd));
  background: rgba(255,255,255,0.045);
}

.mobile-menu-actions {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border, rgba(180,180,190,0.10));
}

.mobile-menu-actions a {
  justify-content: center;
  border: 1px solid var(--border-strong, rgba(200,200,215,0.18));
  text-align: center;
}

.mobile-menu-actions .mobile-start {
  background: var(--bronze, #cf965a);
  border-color: var(--bronze, #cf965a);
  color: #1A1105;
  font-weight: 600;
  box-shadow: 0 12px 34px -18px rgba(207,150,90,0.9);
}

@media (max-width: 1240px) {
  :root {
    --gutter: clamp(18px, 4vw, 36px);
  }

  .nav {
    gap: 14px;
    padding-block: 14px;
  }

  .nav-links,
  .nav-cta {
    display: none !important;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  section,
  .section {
    padding-block: clamp(64px, 9vh, 110px);
  }

  .hero,
  .listen-hero,
  .p-hero,
  .gloss-hero,
  .am-hero {
    padding-top: clamp(72px, 10vh, 112px) !important;
  }

  .display,
  .hook-promise {
    font-size: clamp(42px, 10vw, 76px);
  }

  .display-2,
  .os-headline {
    font-size: clamp(32px, 7vw, 56px);
  }

  .hook {
    min-height: auto;
  }

  .hero-inner,
  .hook-inner,
  .threeam-inner,
  .breath-embed-inner,
  .faq-wrap,
  .split-grid,
  .spiral-stage,
  .listen-row,
  .gloss-hero-inner,
  .am-hero-inner,
  .featured,
  .partner-card,
  .compound-pull {
    grid-template-columns: 1fr !important;
  }

  .os-loop-grid,
  .states-grid,
  .plan-grid,
  .journey-grid,
  .mirror-grid,
  .entry-grid,
  .artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hook-card,
  .hero-visual,
  .featured-art,
  .clock,
  .pacer,
  .spiral {
    max-width: min(100%, 520px);
  }

  .foot,
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 18px;
  }

  .nav {
    min-height: 64px;
    padding: 10px var(--gutter);
  }

  .wordmark {
    min-width: 0;
    font-size: 15px;
  }

  .wordmark span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wordmark .wm-mark,
  .wm-mark {
    width: 30px;
    height: 30px;
  }

  .mobile-menu {
    top: calc(var(--nav-height, 64px) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    border-radius: 16px;
  }

  section,
  .section {
    padding-block: 56px;
  }

  .hero,
  .listen-hero,
  .p-hero,
  .gloss-hero,
  .am-hero {
    padding-top: 58px !important;
  }

  .display,
  .hook-promise {
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1.04;
  }

  .display-2,
  .os-headline {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.08;
  }

  .lede,
  .section-lede,
  .hook-problem,
  .os-lede {
    font-size: 16px;
    line-height: 1.65;
  }

  .eyebrow,
  .hook-eyebrow,
  .section-tag,
  .now-pill {
    max-width: 100%;
    letter-spacing: .14em;
  }

  .hook-actions,
  .hero-actions,
  .cta-actions,
  .action-row {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .btn,
  .btn-lg,
  .btn.lg,
  .btn.xl,
  .hook-actions .btn,
  .hero-actions .btn,
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .filter-row {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .filter-row button {
    flex: 0 0 auto;
  }

  .os-loop-grid,
  .states-grid,
  .plan-grid,
  .journey-grid,
  .mirror-grid,
  .entry-grid,
  .artifact-grid,
  .lib-grid,
  .principles-grid,
  .sa-phases,
  .voices-grid,
  .ct-cards,
  .fomo-grid,
  .chem-grid,
  .breath-facts,
  .cta-metrics {
    grid-template-columns: 1fr !important;
  }

  .hook-pillars {
    grid-template-columns: 1fr !important;
  }

  .featured,
  .plan,
  .lib-card,
  .state-card,
  .partner-card,
  .entry-card,
  .mirror-card,
  .hero-frame {
    padding: clamp(22px, 6vw, 32px);
  }

  .featured-art,
  .clock,
  .pacer,
  .pacer-orb {
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 1;
    margin-inline: auto;
  }

  .now-pill {
    display: grid !important;
    grid-template-columns: auto 1fr;
    border-radius: 16px;
    white-space: normal;
  }

  .now-pill .np-sep {
    display: none;
  }

  .footer-top,
  .footer-cols,
  .foot {
    grid-template-columns: 1fr !important;
  }

  .footer-bot,
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}
