/* ============================================================
   STAGGERED MENU — vanilla port of the React StaggeredMenu
   Slides in from the right with layered prelayers + numbered items
   ============================================================ */
.sm-scope {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1500;
  pointer-events: none;
  --sm-accent: #5d7a51;
}
.sm-scope[data-open] { pointer-events: auto; }
.sm-scope .staggered-menu-wrapper {
  position: relative; width: 100%; height: 100%;
  pointer-events: none;
}

/* Prelayers (decorative slide-in panels behind the main panel) */
.sm-scope .sm-prelayers {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: clamp(280px, 38vw, 440px);
  pointer-events: none; z-index: 5;
}
.sm-scope[data-position="left"] .sm-prelayers { right: auto; left: 0; }
.sm-scope .sm-prelayer {
  position: absolute; top: 0; right: 0;
  height: 100%; width: 100%;
  transform: translateX(100%);
}
.sm-scope[data-position="left"] .sm-prelayer { right: auto; left: 0; transform: translateX(-100%); }

/* Main panel */
.sm-scope .staggered-menu-panel {
  position: absolute; top: 0; right: 0;
  width: clamp(280px, 38vw, 440px);
  height: 100%;
  background: #ffffff;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column;
  padding: clamp(72px, 9vh, 110px) clamp(28px, 3vw, 48px) clamp(28px, 3vw, 48px);
  overflow-y: auto;
  z-index: 10;
  transform: translateX(100%);
  pointer-events: auto;
}
.sm-scope[data-position="left"] .staggered-menu-panel {
  right: auto; left: 0;
  transform: translateX(-100%);
}

.sm-scope .sm-panel-inner {
  flex: 1; display: flex; flex-direction: column;
  gap: 1.4rem;
}

/* Close button — top-right inside the panel */
.sm-scope .sm-close {
  position: absolute;
  top: clamp(18px, 2.4vh, 28px);
  right: clamp(18px, 2vw, 28px);
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(28,36,25,0.06);
  color: #1f3a2e;
  border: 1px solid rgba(28,36,25,0.10);
  cursor: pointer;
  z-index: 20;
  opacity: 0; transform: scale(0.9);
  transition: opacity 0.35s 0.2s ease, transform 0.35s 0.2s cubic-bezier(0.22,1,0.36,1),
              background 0.22s, color 0.22s, border-color 0.22s, rotate 0.3s;
}
.sm-scope[data-open] .sm-close { opacity: 1; transform: scale(1); }
.sm-scope .sm-close:hover {
  background: #1f3a2e; color: #fff; border-color: #1f3a2e;
  rotate: 90deg;
}

/* Menu items list — breathing space between each link */
.sm-scope .sm-panel-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: clamp(0.85rem, 2.2vh, 1.4rem);
}
.sm-scope .sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1.05;
  padding: 4px 0;
}
.sm-scope .sm-panel-item {
  position: relative;
  display: inline-block;
  color: #0a0a0a;
  font-family: var(--font, 'Switzer', sans-serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding-right: 1.4em;
  transition: color 0.25s ease;
  cursor: pointer;
}
.sm-scope .sm-panel-itemLabel {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform;
}
.sm-scope .sm-panel-item:hover,
.sm-scope .sm-panel-item.is-active { color: var(--sm-accent); }

/* Numbered items */
.sm-scope .sm-panel-list[data-numbering] { counter-reset: smItem; }
.sm-scope .sm-panel-list[data-numbering] .sm-panel-item::after {
  counter-increment: smItem;
  content: counter(smItem, decimal-leading-zero);
  position: absolute;
  top: 0.15em; right: 0;
  font-size: 14px; font-weight: 500;
  color: var(--sm-accent);
  letter-spacing: 0.04em;
  pointer-events: none; user-select: none;
  opacity: var(--sm-num-opacity, 0);
}

/* Socials at the bottom */
.sm-scope .sm-socials {
  margin-top: auto;
  padding-top: 2rem;
  display: flex; flex-direction: column;
  gap: 0.8rem;
}
.sm-scope .sm-socials-title {
  margin: 0;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--sm-accent);
  opacity: 0;
}
.sm-scope .sm-socials-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 1.2rem;
}
.sm-scope .sm-socials-link {
  font-size: 1rem; font-weight: 500;
  color: #111; text-decoration: none;
  padding: 2px 0;
  transition: color 0.3s, opacity 0.3s;
  opacity: 0;
}
.sm-scope .sm-socials-list:hover .sm-socials-link:not(:hover) { opacity: 0.4 !important; }
.sm-scope .sm-socials-link:hover { color: var(--sm-accent); }

/* Body scroll lock when open */
body.sm-open { overflow: hidden; }

/* ── Open state (CSS owns the basic slide-in; GSAP enhances inside) ── */
.sm-scope .staggered-menu-panel,
.sm-scope .sm-prelayer { transition: transform 0.55s cubic-bezier(0.22,1,0.36,1); }
.sm-scope[data-open] .staggered-menu-panel { transform: translateX(0) !important; }
.sm-scope[data-open] .sm-prelayer { transform: translateX(0) !important; }
.sm-scope[data-position="left"][data-open] .staggered-menu-panel,
.sm-scope[data-position="left"][data-open] .sm-prelayer { transform: translateX(0) !important; }
/* Reveal item labels / numbers / socials when open (GSAP staggers them if available) */
.sm-scope[data-open] .sm-panel-itemLabel { transform: none; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.sm-scope[data-open] .sm-panel-item { --sm-num-opacity: 1; }
.sm-scope[data-open] .sm-socials-title { opacity: 1; transition: opacity 0.5s 0.3s; }
.sm-scope[data-open] .sm-socials-link { opacity: 1; transform: none; transition: opacity 0.5s 0.4s, transform 0.5s 0.4s; }

/* Responsive — full-width panel on small screens */
@media (max-width: 1024px) {
  .sm-scope .staggered-menu-panel,
  .sm-scope .sm-prelayers { width: 100%; }
  .sm-scope .sm-panel-item { font-size: clamp(2rem, 8vw, 3rem); }
}


/* ================================================================
   EXPANDABLE SUB-MENU — Assessment → 4 paths (mobile)
   Lets users access the desktop Assessment dropdown from the
   mobile slide-in menu.
   ================================================================ */
/* Toggle behaves identically to other .sm-panel-item — matches white panel */
.sm-scope .sm-panel-item-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 17px 4px;
  background: transparent;
  border: 0;
  color: #0a0a0a;
  font-family: var(--font, 'Switzer', sans-serif);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease;
}
.sm-scope .sm-panel-item-toggle:hover { color: var(--sm-accent); }
.sm-scope .sm-panel-item-toggle.is-active { color: var(--sm-accent); }
.sm-scope .sm-panel-itemWrap.has-sub { position: relative; overflow: visible; }

/* Caret rotates when sub is open */
.sm-scope .sm-panel-caret {
  flex-shrink: 0;
  margin-left: 12px;
  opacity: 0.5;
  color: currentColor;
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1), opacity 0.22s ease;
}
.sm-scope .sm-panel-item-toggle:hover .sm-panel-caret { opacity: 1; }
.sm-scope .sm-panel-item-toggle[aria-expanded="true"] {
  color: var(--sm-accent);
}
.sm-scope .sm-panel-item-toggle[aria-expanded="true"] .sm-panel-caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* Sub-menu container — opens below the toggle */
.sm-scope .sm-panel-sub {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0 14px;
  margin-top: 6px;
  border-top: 1px solid rgba(10,10,10,0.08);
  animation: smSubIn 0.4s cubic-bezier(0.22,1,0.36,1);
}
.sm-scope .sm-panel-sub[hidden] { display: none; }
@keyframes smSubIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sub-item rows */
.sm-scope .sm-panel-sub-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 8px;
  text-decoration: none;
  color: rgba(10,10,10,0.78);
  border-radius: 12px;
  transition: background 0.22s ease, color 0.22s ease, padding-left 0.28s cubic-bezier(0.22,1,0.36,1);
}
.sm-scope .sm-panel-sub-item:hover {
  background: rgba(138,170,124,0.10);
  color: #0a0a0a;
  padding-left: 14px;
}
.sm-scope .sm-panel-sub-ic {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  font-size: 15px;
  color: var(--sm-accent);
  background: rgba(138,170,124,0.12);
  border: 1px solid rgba(138,170,124,0.24);
}
.sm-scope .sm-panel-sub-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.35; }
.sm-scope .sm-panel-sub-tx b {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  color: inherit;
  text-transform: none;
}
.sm-scope .sm-panel-sub-tx small {
  font-size: 12px;
  color: rgba(10,10,10,0.50);
  line-height: 1.45;
}

/* "View all assessments" footer link */
.sm-scope .sm-panel-sub-all {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 4px;
  padding: 12px 8px 4px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sm-accent);
  text-decoration: none;
  border-top: 1px solid rgba(10,10,10,0.05);
  transition: gap 0.25s cubic-bezier(0.22,1,0.36,1), color 0.22s ease;
}
.sm-scope .sm-panel-sub-all:hover { gap: 11px; color: #0a0a0a; }

/* Toggle skip the auto-numbering counter (only static .sm-panel-item gets a number) */
.sm-scope .sm-panel-item-toggle::after { content: none !important; }

/* ================================================================
   MOBILE MENU CTA — Sign in / Get Started / Dashboard
   Visible at the bottom of the slide-in panel.
   ================================================================ */
.sm-scope .sm-cta {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: clamp(20px, 4vh, 36px);
  padding-top: clamp(16px, 3vh, 26px);
  border-top: 1px solid rgba(10,10,10,0.08);
}
.sm-scope .sm-cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 100px;
  background: #1f3a2e;
  color: #ffffff;
  border: 1.5px solid #1f3a2e;
  font-family: 'Switzer', 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
}
.sm-scope .sm-cta-btn:hover {
  background: #16291f;
  border-color: #16291f;
  transform: translateY(-1px);
}
.sm-scope .sm-cta-btn--ghost {
  background: transparent;
  color: #1f3a2e;
  border-color: rgba(28,36,25,0.20);
}
.sm-scope .sm-cta-btn--ghost:hover {
  background: rgba(28,36,25,0.04);
  border-color: #1f3a2e;
  color: #1f3a2e;
}
.sm-scope .sm-cta-btn svg { transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); }
.sm-scope .sm-cta-btn:hover svg { transform: translateX(3px); }

/* ================================================================
   ASSESSMENT ROW — split into text link + caret toggle
   Click on the label → navigates to /assessment
   Click on the caret → opens/closes the dropdown
   ================================================================ */
.sm-scope .sm-panel-itemWrap.has-sub { overflow: visible; }
.sm-scope .sm-panel-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.sm-scope .sm-panel-row .sm-panel-item {
  flex: 1;
  padding-right: 0.4em;
}
.sm-scope .sm-panel-caret-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(28,36,25,0.04);
  border: 1px solid rgba(28,36,25,0.08);
  color: #0a0a0a;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1), border-color 0.22s ease;
}
.sm-scope .sm-panel-caret-btn:hover {
  background: rgba(138,170,124,0.14);
  border-color: rgba(138,170,124,0.40);
}
.sm-scope .sm-panel-caret-btn[aria-expanded="true"] {
  background: var(--sm-accent);
  border-color: var(--sm-accent);
  color: #ffffff;
}
.sm-scope .sm-panel-caret-btn .sm-panel-caret {
  transition: transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.sm-scope .sm-panel-caret-btn[aria-expanded="true"] .sm-panel-caret {
  transform: rotate(180deg);
}

/* ================================================================
   MOBILE MENU WATERMARK — small brand SVG, bottom-right, 50% opacity
   ================================================================ */
.sm-scope .sm-panel-watermark {
  position: absolute;
  bottom: clamp(14px, 2vh, 22px);
  right: clamp(14px, 2vw, 22px);
  width: 56px; height: auto;
  max-width: 14vw;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
@media (max-width: 420px) {
  .sm-scope .sm-panel-watermark { width: 44px; }
}