/* ═══════════════════════════════════════════════════════════
 * STAGGERED MENU COMPONENT CSS (React Bits)
 * High-end Staggered Layered Panel Navigation with GSAP
 * ═══════════════════════════════════════════════════════════ */

:root {
  --sm-accent: hsl(223, 100%, 58%);
}

.staggered-menu-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
}

.staggered-menu-wrapper.fixed-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  overflow: hidden;
  pointer-events: none;
}

.staggered-menu-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 2.2rem;
  background: transparent;
  pointer-events: none;
  z-index: 20;
}

.staggered-menu-header > * {
  pointer-events: auto;
}

.sm-logo {
  display: flex;
  align-items: center;
  user-select: none;
}

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

/* Toggle Trigger Button (Generous Touch & Click Target for Mobile & Laptop) */
.sm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 64px;
  padding: 0.55rem 0.95rem;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font-display, 'Syne', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: none;
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.25s ease, background-color 0.25s ease;
  pointer-events: auto;
  user-select: none;
  z-index: 250;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

/* Invisible hit-area expansion for effortless clicking/tapping across laptop and mobile */
.sm-toggle::before {
  content: '';
  position: absolute;
  inset: -10px -14px;
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .sm-toggle:hover {
    transform: translateY(-1px);
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
  }
}

.sm-toggle:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.12);
}

.sm-toggle:focus-visible {
  outline: 2px solid var(--sm-accent, #2764ff);
  outline-offset: 3px;
  border-radius: 999px;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

/* Rolling Text Slot Animation */
.sm-toggle-textWrap {
  position: relative;
  display: inline-block;
  height: 1.25em;
  overflow: hidden;
  white-space: nowrap;
  min-width: auto;
  text-align: right;
}

.sm-toggle-textInner {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-family: var(--font-display, 'Syne', -apple-system, BlinkMacSystemFont, sans-serif);
  font-weight: 700;
}

.sm-toggle-line {
  display: block;
  height: 1.25em;
  line-height: 1.25;
  font-size: inherit;
  font-weight: 700;
  text-transform: lowercase;
}

/* Plus/Cross Icon (Hidden for text-only trigger) */
.sm-icon {
  display: none !important;
}

/* Staggered Underlay Layers */
.sm-prelayers {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: clamp(320px, 38vw, 460px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}

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

.sm-prelayer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  transform: translateX(0);
  opacity: 0;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.4);
}

[data-position='left'] .sm-prelayer {
  right: auto;
  left: 0;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
}

/* Main Sliding Menu Panel */
.staggered-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(320px, 38vw, 460px);
  height: 100%;
  background: #ffffff;
  color: #0b0b0f;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 6.5em 3rem 2.8rem 3rem;
  overflow-y: auto;
  z-index: 10;
  pointer-events: auto;
  opacity: 0;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.55);
}

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

.sm-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

/* Menu Items List */
.sm-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1.15;
  padding: 0.1rem 0;
}

.sm-panel-item {
  position: relative;
  color: #0b0b0f;
  font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  cursor: pointer;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  padding-right: 0;
  display: inline-block;
  transition: color 0.25s ease, transform 0.25s ease;
}

.sm-panel-itemLabel {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 100%;
  letter-spacing: 0.03em;
}

.sm-panel-item:hover {
  color: var(--sm-accent, #5227ff);
  transform: translateX(6px);
}

/* Item Numbering Counter (Disabled) */
.sm-panel-list[data-numbering] .sm-panel-item::after {
  display: none !important;
}

/* Social Links Section */
.sm-socials {
  margin-top: auto;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sm-socials-title {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sm-accent, #2764ff);
}

.sm-socials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}

.sm-socials-item {
  flex: 1;
  min-width: 0;
}

.sm-socials-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  text-decoration: none;
  color: #0b0b0f;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
}

.sm-social-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05);
  color: #0b0b0f;
  transition: all 0.25s ease;
}

.sm-badge-instagram {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.12), rgba(253, 29, 29, 0.12), rgba(245, 96, 64, 0.12));
  color: #d62976;
}

.sm-badge-linkedin {
  background: rgba(10, 102, 194, 0.12);
  color: #0a66c2;
}

.sm-social-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.sm-social-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0b0b0f;
  line-height: 1.2;
}

.sm-social-handle {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: rgba(11, 11, 15, 0.55);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-social-arrow {
  color: rgba(11, 11, 15, 0.35);
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sm-socials-link:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }

  .sm-socials-link:hover .sm-social-arrow {
    transform: translate(2px, -2px);
    color: var(--sm-accent, #2764ff);
  }

  .sm-socials-link:hover .sm-badge-instagram {
    background: linear-gradient(135deg, #e1306c, #fd1d1d, #f56040);
    color: #ffffff;
  }

  .sm-socials-link:hover .sm-badge-linkedin {
    background: #0a66c2;
    color: #ffffff;
  }
}

.sm-socials-link:active {
  transform: scale(0.97);
  background: rgba(0, 0, 0, 0.07);
}

.sm-socials-link:focus-visible {
  outline: 2px solid var(--sm-accent, #2764ff);
  outline-offset: 2px;
}

/* Semi-transparent backdrop when menu is open */
.sm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.35s ease;
}

.staggered-menu-wrapper[data-open] .sm-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .staggered-menu-panel,
  .sm-prelayers {
    width: clamp(300px, 60vw, 440px);
  }
}

@media (max-width: 640px) {
  .staggered-menu-wrapper.fixed-wrapper {
    height: 100vh;
    height: 100dvh;
  }

  .staggered-menu-panel,
  .sm-prelayers {
    width: 100%;
    left: 0;
    right: 0;
    height: 100%;
  }

  .staggered-menu-panel {
    padding: calc(5.5rem + env(safe-area-inset-top, 0px)) 1.5rem max(2rem, calc(1.5rem + env(safe-area-inset-bottom, 0px))) 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sm-panel-inner {
    gap: 1.8rem;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .sm-panel-list {
    gap: 0.8rem;
  }

  .sm-panel-item {
    font-size: clamp(2.2rem, 8.5vw, 2.8rem);
  }

  .sm-socials {
    padding-top: 1.25rem;
    gap: 0.75rem;
    margin-top: auto;
  }

  .sm-socials-list {
    display: flex;
    flex-direction: row;
    gap: 0.65rem;
  }

  .sm-socials-item {
    flex: 1;
    min-width: 0;
  }

  .sm-socials-link {
    padding: 0.65rem 0.75rem;
    min-height: 52px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
  }

  .sm-social-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .sm-social-name {
    font-size: 0.84rem;
  }

  .sm-social-handle {
    font-size: 0.64rem;
  }
}

@media (max-width: 380px) {
  .sm-socials-list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sm-socials-link {
    min-height: 48px;
    padding: 0.55rem 0.75rem;
  }
}
