/* ==========================================================================
   StaggeredMenu – Dark Premium Theme for markenbild.ch
   ========================================================================== */

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

/* ── Pre-Layers (Staggered color panels) ── */
.sm-prelayers {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    z-index: 5;
}

.sm-prelayer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    will-change: transform;
}

/* ── Toggle Button ── */
.sm-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 1.6rem 1.5rem;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.sm-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

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

.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: 14px;
    height: 14px;
    flex: 0 0 14px;
    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;
}

/* ── Main Panel ── */
.staggered-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 7rem 2rem 2rem 2rem;
    overflow-y: auto;
    z-index: 10;
    pointer-events: auto;
}

@media (min-width: 640px) {
    .staggered-menu-panel {
        width: clamp(320px, 45vw, 480px);
    }
}

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

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

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

.sm-panel-item {
    position: relative;
    color: #fff;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    cursor: pointer;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    display: inline-block;
    text-decoration: none;
    padding: 0.15em 0;
    transition: color 0.25s ease;
}

.sm-panel-item:hover {
    color: var(--clr-primary, #F97316);
}

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

/* Item 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.15em;
    right: -2em;
    font-size: 0.35em;
    font-weight: 400;
    color: var(--clr-primary, #F97316);
    letter-spacing: 0;
    pointer-events: none;
    user-select: none;
    opacity: var(--sm-num-opacity, 0);
    font-family: var(--font-sans, 'Inter', sans-serif);
}

/* ── Social Links ── */
.sm-socials {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sm-socials-title {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--clr-primary, #F97316);
}

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

.sm-socials-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--clr-text-muted, #9fa0a5);
    text-decoration: none;
    position: relative;
    padding: 2px 0;
    display: inline-block;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.sm-socials-link:hover {
    color: var(--clr-primary, #F97316);
}

.sm-socials-list:hover .sm-socials-link {
    opacity: 0.35;
}

.sm-socials-list:hover .sm-socials-link:hover {
    opacity: 1;
}

/* ── Hide on desktop (> 768px) ── */
@media (min-width: 769px) {
    .staggered-menu-wrapper {
        display: none !important;
    }
}
