/* =====================================================
   NeuroHaven Miami — Shared site styles
   Brand palette per Brand Guidelines (2025)
   ===================================================== */

:root {
  --bone:     #F0E8D9;
  --cream:    #FAF6EC;
  --mist:     #E5DCC9;
  --sand:     #D7C7A9;
  --tan:      #AA9476;
  --sage:     #9E9E7D;
  --forest:   #41412E;
  --charcoal: #1B1B1A;
  --stone:    #5F5F4E;
  --ease:     cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bone); color: var(--charcoal); margin: 0; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }

/* ============ Typography helpers ============ */
.font-headline { font-family: "Lexend Mega", sans-serif; letter-spacing: -0.01em; font-weight: 500; }
.font-deca     { font-family: "Lexend Deca", sans-serif; }
.font-body     { font-family: "DM Sans", sans-serif; }
.h-display { font-family: "Lexend Mega", sans-serif; letter-spacing: -0.025em; line-height: 0.98; font-weight: 500; }
.h-section { font-family: "Lexend Mega", sans-serif; letter-spacing: -0.015em; line-height: 1.05; font-weight: 500; }
.tag {
  font-family: "Lexend Deca", sans-serif;
  letter-spacing: 0.18em;
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 400;
}

/* Anchor offset for fixed nav */
section[id] { scroll-margin-top: 90px; }

/* ============ Site nav ============ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(240, 232, 217, 0.78);
  border-bottom: 1px solid rgba(65, 65, 46, 0.08);
  transition: padding .25s var(--ease);
  /* promote to its own layer: kills the 1px backdrop-filter seam at the top edge in Chrome */
  transform: translateZ(0);
  will-change: transform;
}
.site-nav.scrolled { background: rgba(240, 232, 217, 0.92); }
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) { .nav-inner { padding: 0 32px; height: 76px; } }

.nav-links { display: none; }
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-left: 48px;
    flex: 1;
  }
}
.nav-link {
  position: relative;
  font-family: "Lexend Deca", sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  text-decoration: none;
  padding: 4px 0;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--forest); }

.nav-cta {
  display: none;
  font-family: "Lexend Deca", sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--charcoal);
  color: var(--cream);
  text-decoration: none;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
@media (min-width: 768px) { .nav-cta { display: inline-flex; } }
.nav-cta:hover { transform: translateY(-1px); background: #000; }

/* Mobile menu */
.menu-toggle { display: inline-flex; background: none; border: 0; padding: 8px; cursor: pointer; }
@media (min-width: 768px) { .menu-toggle { display: none; } }
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--charcoal);
  border-radius: 999px;
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.menu-toggle span + span { margin-top: 6px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 64px 0 auto 0;
  background: var(--bone);
  border-bottom: 1px solid rgba(65, 65, 46, 0.08);
  padding: 24px 20px 32px;
  /* hide fully above the viewport regardless of item count (clears the 64px top offset too) */
  transform: translateY(calc(-100% - 72px));
  transition: transform .45s var(--ease);
  z-index: 49;
}
.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a {
  display: block;
  font-family: "Lexend Mega", sans-serif;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(65, 65, 46, 0.08);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ============ Layout container ============ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ============ Header v3 — clean single line, one unified breakpoint ============ */
.site-nav-home .nav-inner {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.site-nav-home .nav-logo { grid-column: 1; justify-self: start; display: flex; align-items: center; }
.site-nav-home .nav-pill {
  grid-column: 2;
  position: static !important; left: auto !important; right: auto !important; transform: none !important;
  justify-self: center;
  display: flex; align-items: center; gap: 2px;
  padding: 6px 6px 6px 10px;
  background: rgba(250, 246, 236, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(65, 65, 46, 0.10);
  border-radius: 999px;
  box-shadow: 0 12px 30px -16px rgba(65, 65, 46, 0.35);
  white-space: nowrap;
}
.site-nav-home .nav-pill .nav-link { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.site-nav-home .nav-pill .nav-cta-pill { margin-left: 6px; }
.site-nav-home .nav-right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; }

/* one breakpoint for the whole header: pill on desktop, hamburger below */
.site-nav-home .menu-toggle { display: none !important; }
.site-nav-home .nav-wa-mobile { display: none !important; }
@media (max-width: 1024px) {
  .site-nav-home .nav-pill { display: none !important; }
  .site-nav-home .menu-toggle { display: inline-flex !important; }
  .site-nav-home .nav-wa-mobile { display: inline-flex !important; }
}
/* mobile dropdown sits flush below the nav at every width it can appear */
@media (min-width: 768px) { .mobile-menu { top: 76px; } }
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Lexend Deca", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease), background .25s var(--ease), color .25s var(--ease);
  border: 0;
}
.btn-primary { background: var(--charcoal); color: var(--cream); }
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-cream { background: var(--cream); color: var(--charcoal); }
.btn-cream:hover { background: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--cream); }

/* ============ Cards ============ */
.soft-card {
  background: linear-gradient(180deg, #FAF6EC 0%, #F3EBDB 100%);
  border: 1px solid rgba(65, 65, 46, 0.10);
  border-radius: 24px;
  box-shadow: 0 1px 0 rgba(27, 27, 26, 0.02), 0 20px 40px -28px rgba(65, 65, 46, 0.18);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.soft-card.is-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(27, 27, 26, 0.02), 0 32px 60px -28px rgba(65, 65, 46, 0.30);
}

/* Program gradients */
.grad-focus { background: linear-gradient(150deg, #D7C7A9 0%, #AA9476 100%); color: var(--charcoal); }
.grad-sleep { background: linear-gradient(150deg, #41412E 0%, #1B1B1A 100%); color: var(--bone); }
.grad-calm  { background: linear-gradient(150deg, #C7C7A8 0%, #9E9E7D 100%); color: var(--charcoal); }
.grad-all   { background: linear-gradient(150deg, #41412E 0%, #1B1B1A 100%); color: var(--bone); }

/* ============ Hero ambient glow ============ */
.hero-glow {
  position: absolute;
  inset: -10% -5% auto -5%;
  height: 130%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(48% 42% at 78% 20%, rgba(158, 158, 125, 0.35), transparent 65%),
    radial-gradient(52% 42% at 15% 65%, rgba(170, 148, 118, 0.30), transparent 65%),
    radial-gradient(58% 50% at 75% 90%, rgba(215, 199, 169, 0.40), transparent 70%);
  filter: blur(28px);
  animation: glow-drift 18s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04); }
}

/* ============ Marquee ============ */
.marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
.marquee span {
  font-family: "Lexend Mega", sans-serif;
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee span::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ Reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-stagger.in > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2) { opacity: 1; transform: none; transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { opacity: 1; transform: none; transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { opacity: 1; transform: none; transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { opacity: 1; transform: none; transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { opacity: 1; transform: none; transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(7) { opacity: 1; transform: none; transition-delay: .48s; }
.reveal-stagger.in > *:nth-child(8) { opacity: 1; transform: none; transition-delay: .56s; }
.reveal-stagger.in > *:nth-child(9) { opacity: 1; transform: none; transition-delay: .64s; }
.reveal-stagger.in > *:nth-child(10) { opacity: 1; transform: none; transition-delay: .72s; }
.reveal-stagger.in > *:nth-child(11) { opacity: 1; transform: none; transition-delay: .80s; }
.reveal-stagger.in > *:nth-child(12) { opacity: 1; transform: none; transition-delay: .88s; }
/* safety net: any child beyond the explicit list still reveals (never leaves an empty cell) */
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* Word reveal (hero) */
.word-reveal { display: inline-block; overflow: hidden; vertical-align: top; }
.word-reveal > .w {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  animation: word-up 1.05s var(--ease) forwards;
}
@keyframes word-up {
  to { transform: translateY(0); opacity: 1; }
}

/* ============ Footer ============ */
.site-footer {
  margin-top: 80px;
  padding: 56px 0 48px;
  border-top: 1px solid rgba(65, 65, 46, 0.10);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
}
.footer-col h4 {
  font-family: "Lexend Deca", sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--stone);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-family: "Lexend Deca", sans-serif;
  font-size: 14px;
  color: var(--charcoal);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--forest); }

/* ============ Safe area ============ */
.safe-bottom { padding-bottom: max(20px, env(safe-area-inset-bottom)); }

/* ============ Utilities ============ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 65, 46, 0.15), transparent);
  border: 0;
  margin: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ============ Sticky WhatsApp button ============ */
.wa-fab { position:fixed; right:22px; bottom:22px; z-index:60; display:flex; align-items:center; height:58px; background:#25D366; color:#fff; border-radius:999px; text-decoration:none; box-shadow:0 12px 30px -8px rgba(37,211,102,0.55); overflow:hidden; transition:background .25s var(--ease), box-shadow .25s var(--ease); animation:waPop .5s var(--ease) .9s both; }
.wa-fab-ico { width:58px; height:58px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.wa-fab-label { white-space:nowrap; font-family:"Lexend Deca",sans-serif; font-size:14px; font-weight:500; max-width:0; opacity:0; transition:max-width .35s var(--ease), opacity .25s var(--ease), padding-right .35s var(--ease); }
.wa-fab:hover { background:#1ebe5d; box-shadow:0 16px 36px -8px rgba(37,211,102,0.6); }
@media (hover:hover){ .wa-fab:hover .wa-fab-label { max-width:190px; opacity:1; padding-right:22px; } }
@media (max-width:600px){ .wa-fab { right:16px; bottom:16px; height:54px; } .wa-fab-ico { width:54px; height:54px; } .wa-fab-label { display:none; } }
@keyframes waPop { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }
@media (prefers-reduced-motion:reduce){ .wa-fab { animation:none; } }

/* ============ WhatsApp help message bubble (mobile) ============ */
.wa-fab.wa-nudge { animation: waPulse 1.8s var(--ease) infinite; }
@keyframes waPulse { 0%,100%{ box-shadow:0 12px 30px -8px rgba(37,211,102,0.55), 0 0 0 0 rgba(37,211,102,0.45); } 50%{ box-shadow:0 12px 30px -8px rgba(37,211,102,0.55), 0 0 0 12px rgba(37,211,102,0); } }
.wa-msg { position:fixed; right:16px; bottom:82px; z-index:60; width:min(264px, calc(100vw - 88px)); background:#fff; border:1px solid rgba(65,65,46,0.12); border-radius:16px 16px 4px 16px; box-shadow:0 18px 44px -12px rgba(27,27,26,0.4); padding:12px 14px 14px; transform:translateY(14px) scale(0.92); opacity:0; pointer-events:none; transform-origin:bottom right; transition:transform .4s var(--ease), opacity .35s var(--ease); }
.wa-msg.show { transform:translateY(0) scale(1); opacity:1; pointer-events:auto; }
.wa-msg-x { position:absolute; top:5px; right:8px; width:22px; height:22px; border:0; background:none; color:var(--stone); font-size:18px; line-height:1; cursor:pointer; opacity:0.55; padding:0; }
.wa-msg-x:hover { opacity:1; }
.wa-msg-head { display:flex; align-items:center; gap:9px; margin-bottom:9px; }
.wa-msg-av { width:28px; height:28px; border-radius:50%; background:#25D366; color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.wa-msg-name { font-family:"Lexend Deca",sans-serif; font-size:12.5px; font-weight:500; color:var(--charcoal); line-height:1.2; }
.wa-msg-name small { display:block; font-size:10px; font-weight:400; color:#25D366; margin-top:1px; }
.wa-msg-body { display:block; text-decoration:none; }
.wa-msg-text { display:none; font-family:"Lexend Deca",sans-serif; font-size:13.5px; line-height:1.5; color:var(--charcoal); }
.wa-msg-typing { display:flex; gap:5px; padding:6px 2px; }
.wa-msg-typing span { width:7px; height:7px; border-radius:50%; background:var(--sage); animation:waType 1.1s infinite; }
.wa-msg-typing span:nth-child(2){ animation-delay:.18s; } .wa-msg-typing span:nth-child(3){ animation-delay:.36s; }
@keyframes waType { 0%,60%,100%{ transform:translateY(0); opacity:.45; } 30%{ transform:translateY(-4px); opacity:1; } }
.wa-msg.said .wa-msg-typing { display:none; } .wa-msg.said .wa-msg-text { display:block; }
@media (min-width:901px){ .wa-msg { display:none !important; } }
@media (prefers-reduced-motion:reduce){ .wa-fab.wa-nudge { animation:none; } .wa-msg-typing span { animation:none; } }

/* ============ Learn dropdown (nav pill) ============ */
.nav-drop { position:relative; }
.nav-drop-btn { background:none; border:0; cursor:pointer; display:inline-flex; align-items:center; gap:6px; font-family:"Lexend Deca",sans-serif; font-size:13px; letter-spacing:0.04em; color:var(--charcoal); padding:8px 12px; }
.nav-drop-btn::after { content:''; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg) translate(-1px,-1px); transition:transform .25s var(--ease); }
.nav-drop:hover .nav-drop-btn::after, .nav-drop:focus-within .nav-drop-btn::after { transform:rotate(225deg) translate(-1px,-1px); }
.nav-drop-menu { position:absolute; top:100%; left:50%; transform:translateX(-50%); padding-top:12px; opacity:0; visibility:hidden; transition:opacity .25s var(--ease), visibility .25s; z-index:70; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { opacity:1; visibility:visible; }
.nav-drop-panel { background:rgba(250,246,236,0.97); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border:1px solid rgba(65,65,46,0.1); border-radius:14px; box-shadow:0 18px 40px -18px rgba(65,65,46,0.45); padding:8px; min-width:188px; }
.nav-drop-panel a { display:block; padding:9px 14px; font-family:"Lexend Deca",sans-serif; font-size:13px; color:var(--charcoal); text-decoration:none; border-radius:9px; white-space:nowrap; }
.nav-drop-panel a:hover { background:rgba(158,158,125,0.14); color:var(--forest); }
