/* =====================================================================
   GLOBAL.CSS — R3 Medispa Theme
   Loaded on EVERY template (front-page, page, single, archive, 404...).
   Scope discipline: only reset, design tokens, base typography, layout
   containers, buttons, main nav + mobile drawer, footer, floating
   WhatsApp button, and the sitewide .reveal scroll-in utility belong
   here. Anything scoped to one template (hero, therapy grid, quiz,
   testimonials...) goes in that template's own CSS file instead — see
   home.css, single-treatment.css, archive-treatment.css.
   Every byte in this file loads on every page view — keep it lean.
   Ported from mockup v25 (1230pm_0708_R3_homepage_v25.html) 2026-07-24.
   ===================================================================== */

/* ===================================================
   ADMIN-ONLY PLACEHOLDER NOTICE
   Shown only to logged-in admins (current_user_can check happens in
   PHP) when a Customizer-driven image/video hasn't been set yet, so
   real visitors never see a broken-looking empty box. Reused across
   several homepage sections — see story.php, corporate-video.php, etc.
=================================================== */
.r3-admin-placeholder {
  border: 2px dashed rgba(0,0,0,.15);
  background: var(--forest-50, #f3f6f4);
  color: var(--muted);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  font-size: .8rem;
  line-height: 1.6;
}

/* ===================================================
   RESET & BASE
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ===================================================
   DESIGN TOKENS
=================================================== */
:root {
  /* Forest Green — Primary Brand */
  --forest-900: #0f2318;
  --forest-800: #1a3a28;
  --forest-700: #25533a;
  --forest-600: #2e6447;
  --forest-500: #3a7a56;   /* main brand green */
  --forest-400: #5a9970;
  --forest-300: #86b997;
  --forest-200: #b8d8c4;
  --forest-100: #dceee4;
  --forest-50:  #f0f8f3;

  /* Terracotta — CTAs only */
  --terra-700: #8b3a2a;
  --terra-600: #a8452f;
  --terra-500: #c4532e;   /* main CTA */
  --terra-400: #d4704f;
  --terra-100: #f9ece8;

  /* Neutrals */
  --cream:     #f8f5f0;
  --warm-white:#fdfcfa;
  --sand-100:  #f2ede6;
  --sand-200:  #e4dbd1;
  --sand-400:  #c4b4a0;
  --charcoal:  #1c2320;
  --mid:       #3d4a42;
  --muted:     #6b7d72;

  /* Typography */
  --serif: 'Fraunces', serif;
  --sans:  'DM Sans', sans-serif;

  /* Spacing scale */
  --sp-xs:   8px;
  --sp-sm:   16px;
  --sp-md:   32px;
  --sp-lg:   64px;
  --sp-xl:   96px;
  --sp-2xl:  128px;
  --sp-3xl:  160px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-pill:999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 8px 32px rgba(0,0,0,.10);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.14);

  /* Transitions */
  --ease: all .32s cubic-bezier(.22,.68,0,1.1);
}

/* ===================================================
   TYPOGRAPHY
=================================================== */
body {
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--warm-white);
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5 { font-family: var(--serif); font-weight: 300; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(2rem,   3.8vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem);   }
h4 { font-size: clamp(1.1rem, 1.6vw, 1.35rem);}
p  { line-height: 1.8; color: var(--mid); }
em { font-style: italic; color: var(--forest-400); }

/* Label / eyebrow */
.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--forest-500);
}
.eyebrow--light { color: var(--forest-300); }

/* ===================================================
   LAYOUT
=================================================== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.container-nomax { margin: 0 auto; padding: 0 40px; }
@media(max-width:600px) { .container { padding: 0 20px; } }

/* Section vertical rhythm — generous */
.section { padding: var(--sp-3xl) 0; }
.section--xl { padding: 180px 0; }
@media(max-width:900px) {
  .section { padding: var(--sp-2xl) 0; }
  .section--xl { padding: 120px 0; }
}
@media(max-width:600px) {
  .section { padding: var(--sp-xl) 0; }
  .section--xl { padding: 80px 0; }
}

/* Section intro block */
.section-intro { max-width: 620px; }
.section-intro.centered { margin: 0 auto; text-align: center; }
.section-intro h2 { margin: 16px 0 20px; }
/*.section-intro p { font-size: 1.05rem; } hidden because of membership*/ 

/* ===================================================
   BUTTONS — prominent, rounded, consistent
=================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 16px 36px;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--ease);
  white-space: nowrap;
  line-height: 1;
}
/* Primary CTA — Terracotta */
.btn-cta {
  background: var(--terra-500);
  color: #fff;
  border-color: var(--terra-500);
}
.btn-cta:hover {
  background: var(--terra-700);
  border-color: var(--terra-700);
  transform: translateY(-2px);
}
/* Secondary — Forest green outline */
.btn-ghost {
  background: transparent;
  color: var(--forest-500);
  border-color: var(--forest-500);
}
.btn-ghost:hover {
  background: var(--forest-500);
  color: #fff;
  transform: translateY(-2px);
}
/* Ghost on dark */
.btn-ghost-light {
  background: transparent;
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.45);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.7);
  transform: translateY(-2px);
}
/* White fill (on dark sections) */
.btn-white {
  background: #fff;
  color: var(--forest-800);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--forest-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
/* Small variant */
.btn-sm { padding: 12px 24px; font-size: .8rem; border-radius: var(--r-sm); }

/* ===================================================
   NAVIGATION
=================================================== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px;
  height: 112px;
  background: rgba(10,26,18,.0);
  backdrop-filter: blur(0px) saturate(1);
  -webkit-backdrop-filter: blur(0px) saturate(1);
  border-bottom: 1px solid transparent;
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease, box-shadow .4s ease;
}
#nav.scrolled {
  background: rgba(253,252,250,.93);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--forest-100);
  box-shadow: 0 2px 28px rgba(0,0,0,.07);
}

/* Logo — 3× more prominent */
.nav-logo {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 96px;
  width: auto;
  object-fit: contain;
  transition: opacity .2s;
}
.nav-logo img:hover { opacity: .85; }

.nav-links {
  display: flex; gap: 36px; list-style: none; align-items: center;
}
.nav-links a {
  font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.75); transition: color .2s;
}
.nav-links a:hover { color: var(--forest-300); }
#nav.scrolled .nav-links a { color: var(--mid); }
#nav.scrolled .nav-links a:hover { color: var(--forest-600); }

.nav-end {
  display: flex; align-items: center; gap: 16px; flex-shrink: 0;
}
.nav-phone {
  font-size: .78rem; font-weight: 500; color: rgba(255,255,255,.55);
  display: flex; align-items: center; gap: 6px;
  transition: color .4s;
}
#nav.scrolled .nav-phone { color: var(--muted); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 6px; background: none; border: none;
}
.hamburger span {
  width: 24px; height: 2px; background: rgba(255,255,255,.85);
  border-radius: 2px; transition: var(--ease);
  display: block;
}
#nav.scrolled .hamburger span { background: var(--charcoal); }
@media(max-width:980px) {
  .nav-links, .nav-phone { display: none; }
  .hamburger { display: flex; }
}

/* Mobile drawer */
.drawer {
  position: fixed; top: 0; right: -100%;
  width: min(360px,90vw); height: 100vh;
  background: var(--forest-900);
  z-index: 9999;
  display: flex; flex-direction: column;
  padding: 32px 28px 48px;
  gap: 40px;
  transition: right .42s cubic-bezier(.77,0,.18,1);
  overflow-y: auto;
}
.drawer.open { right: 0; }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 250; display: none;
}
.drawer-overlay.show { display: block; }
.drawer-top {
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-logo img {
  height: 52px; width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0,0,0,.3));
}
.drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--forest-300); font-size: 1.8rem; line-height: 1;
  font-family: var(--serif);
  padding: 4px;
}
.drawer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.drawer .nav-menu .menu-link,
.drawer ul li a {
  display: block; padding: 14px 0;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 300;
  color: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: color .2s, padding-left .2s;
}
.drawer .nav-menu .menu-link:hover,
.drawer ul li a:hover { color: var(--forest-300); padding-left: 8px; }
.drawer-cta { display: flex; flex-direction: column; gap: 12px; }
.drawer-contact {
  font-size: .8rem; color: var(--forest-300);
  display: flex; flex-direction: column; gap: 6px;
}

/* ============================================================
   MOBILE DRAWER — NAV LIST
   The drawer's <ul class="nav-menu"> is NOT inside #nav, so it
   gets none of the #nav-scoped mobile rules above. This is its
   own explicit ruleset — keep it separate, don't remove the
   #nav prefix above to "fix" this, that will re-break desktop.
   ============================================================ */
.drawer .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: static;
    margin: 20px 0 28px;
    padding: 0;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    background: transparent;
}

.drawer .nav-menu .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.drawer .nav-menu .menu-item:last-child {
    border-bottom: none;
}

.drawer .nav-menu .menu-link {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--cream);
    text-decoration: none;
    letter-spacing: 0;
    white-space: normal;
}

.drawer .nav-menu .menu-link:hover,
.drawer .nav-menu .menu-link:focus,
.drawer .nav-menu .current-menu-item > .menu-link {
    color: var(--terra);
}

.drawer .nav-menu .menu-link:hover,
.drawer .nav-menu .menu-link:focus,
.drawer .nav-menu .current-menu-item > .menu-link {
    color: var(--terra);
}

.drawer.open .nav-menu .menu-link:hover,
.drawer.open .nav-menu .menu-link:focus,
.drawer.open .nav-menu .current-menu-item > .menu-link {
    color: var(--forest-300);
}

/* If any drawer item ever gets children (sub-menu), keep them
   collapsed by default — mirrors the #nav accordion behavior */
.drawer .nav-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
}

.drawer .nav-menu .menu-item.is-open > .sub-menu {
    display: block;
}



/* ===================================================
   FOOTER
=================================================== */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.45);
  padding: 88px 0 44px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px; margin-bottom: 72px;
}
.footer-logo img {
  height: 56px; width: auto;
  filter: brightness(0) invert(1) opacity(.8);
  margin-bottom: 24px;
}
.footer-brand-desc { font-size: .875rem; line-height: 1.85; max-width: 280px; }
.footer-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.footer-col h5 {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--forest-400); margin-bottom: 22px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { font-size: .85rem; color: rgba(255,255,255,.45); transition: color .2s; }
.footer-col ul a:hover { color: rgba(255,255,255,.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: .75rem;
}
.footer-bottom a { color: rgba(255,255,255,.35); text-decoration: underline; text-underline-offset: 3px; }

@media(max-width:900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===================================================
   FLOATING WHATSAPP
=================================================== */
.wa-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  background: #25d366; color: #fff;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 14px 24px; border-radius: var(--r-pill);
  box-shadow: 0 8px 32px rgba(37,211,102,.3);
  transition: var(--ease);
}
.wa-fab:hover { transform: translateY(-3px); box-shadow: 0 14px 42px rgba(37,211,102,.38); }
.wa-fab svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ===================================================
   SCROLL REVEAL
=================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s cubic-bezier(.22,.68,0,1), transform .65s cubic-bezier(.22,.68,0,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* Stagger children */
.reveal-group > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s, transform .5s;
}
.reveal-group.visible > *:nth-child(1) { opacity:1;transform:none;transition-delay:.05s }
.reveal-group.visible > *:nth-child(2) { opacity:1;transform:none;transition-delay:.12s }
.reveal-group.visible > *:nth-child(3) { opacity:1;transform:none;transition-delay:.19s }
.reveal-group.visible > *:nth-child(4) { opacity:1;transform:none;transition-delay:.26s }
.reveal-group.visible > *:nth-child(5) { opacity:1;transform:none;transition-delay:.33s }
.reveal-group.visible > *:nth-child(6) { opacity:1;transform:none;transition-delay:.40s }
.reveal-group.visible > *:nth-child(7) { opacity:1;transform:none;transition-delay:.47s }
.reveal-group.visible > *:nth-child(8) { opacity:1;transform:none;transition-delay:.54s }
.reveal-group.visible > *:nth-child(9) { opacity:1;transform:none;transition-delay:.54s }
.reveal-group.visible > *:nth-child(10) { opacity:1;transform:none;transition-delay:.54s }