/* ==========================================
   STAGGERED MENU — Kenstack (Gold + Outfit)
   ========================================== */

/* ── Wrapper ── */
.staggered-menu-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  z-index: 1000;
}

/* ── Header Bar ── */
.staggered-menu-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  z-index: 1020;
  transition: padding 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.staggered-menu-header.scrolled {
  padding: 10px 32px;
  background: rgba(255,255,255,1);
  box-shadow: 0 4px 25px rgba(0,0,0,0.08);
}

/* ── Logo ── */
.sm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  text-decoration: none;
}

.sm-logo-img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sm-logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

/* ── Desktop Nav ── */
.sm-desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.sm-desktop-nav a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
  position: relative;
}

.sm-desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.sm-desktop-nav a:hover { color: var(--text-dark); }
.sm-desktop-nav a:hover::after { width: 100%; }

/* ── Header Right ── */
.sm-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sm-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--text-dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.sm-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  background: #1a1a1a;
}

/* ── Toggle Button ── */
.sm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  padding: 8px 4px;
  z-index: 1025;
  transition: color 0.3s ease;
}

.sm-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Text cycling */
.sm-toggle-textWrap {
  position: relative;
  display: inline-block;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
  min-width: 38px;
}

.sm-toggle-textInner {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.sm-toggle-line {
  display: block;
  height: 1em;
  line-height: 1;
}

/* Plus / X icon */
.sm-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.sm-icon-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.sm-icon-line-v {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ── Pre-layers (curtain sweep) ── */
.sm-prelayers {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(300px, 42vw, 480px);
  pointer-events: none;
  z-index: 1005;
  /* NOTE: opacity and xPercent controlled entirely by GSAP */
}

[data-position='left'] .sm-prelayers {
  right: auto;
  left: 0;
}

.sm-prelayer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  /* NOTE: opacity and xPercent controlled entirely by GSAP */
}

/* ── Panel ── */
.staggered-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(300px, 42vw, 480px);
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 120px 48px 48px 48px;
  overflow-y: auto;
  z-index: 1010;
  /* NOTE: xPercent and opacity controlled entirely by GSAP — do NOT set them here */
  box-shadow: -8px 0 60px rgba(0,0,0,0.08);
}

[data-position='left'] .staggered-menu-panel {
  right: auto;
  left: 0;
  box-shadow: 8px 0 60px rgba(0,0,0,0.08);
}

/* ── Panel Inner ── */
.sm-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Menu List ── */
.sm-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.sm-panel-item {
  position: relative;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  cursor: pointer;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  text-decoration: none;
  padding: 6px 0;
  padding-right: 2em;
  /* pointer-events MUST be auto so clicks register */
  pointer-events: auto;
  transition: color 0.25s ease;
}

.sm-panel-item:hover {
  color: var(--sm-accent, #D4AF37);
}

.sm-panel-itemLabel {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 100%;
  /* pointer-events pass-through to parent <a> */
  pointer-events: none;
}

/* Numbering */
.sm-panel-list[data-numbering] {
  counter-reset: smItem;
}

.sm-panel-list[data-numbering] .sm-panel-item::after {
  counter-increment: smItem;
  content: counter(smItem, decimal-leading-zero);
  position: absolute;
  top: 0.2em;
  right: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--sm-accent, #D4AF37);
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
  opacity: var(--sm-num-opacity, 0);
}

/* ── Socials ── */
.sm-socials {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sm-socials-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sm-accent, #D4AF37);
}

.sm-socials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sm-socials-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  padding: 2px 0;
  display: inline-block;
  pointer-events: auto;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.sm-socials-list:hover .sm-socials-link { opacity: 0.3; }
.sm-socials-list:hover .sm-socials-link:hover {
  opacity: 1;
  color: var(--sm-accent, #D4AF37);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .sm-desktop-nav { display: none; }
  .sm-cta-btn { display: none; }

  .staggered-menu-panel {
    width: 100%;
    left: 0;
    right: 0;
  }

  .sm-prelayers {
    width: 100%;
  }

  .staggered-menu-header { padding: 16px 20px; }
  .staggered-menu-header.scrolled { padding: 12px 20px; }
}

@media (max-width: 640px) {
  .staggered-menu-panel {
    padding: 100px 28px 36px 28px;
  }

  .sm-panel-item {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .sm-logo-img { height: 32px; }
  .sm-logo-text { font-size: 1.1rem; }
}
@media (max-width: 380px) {

  .sm-logo-text { font-size: 0.8rem; }
}