/* ─── MagicBento Card Enhancement ─── */

.magic-card {
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-intensity: 0;
    --glow-radius: 300px;
    --glow-color: 46, 107, 47;
    position: relative;
    overflow: hidden;
}

/* Border glow effect */
.magic-card::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 4px;
    background: radial-gradient(
        var(--glow-radius) circle at var(--glow-x) var(--glow-y),
        rgba(var(--glow-color), calc(var(--glow-intensity) * 0.8)) 0%,
        rgba(var(--glow-color), calc(var(--glow-intensity) * 0.4)) 30%,
        transparent 60%
    );
    border-radius: inherit;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .magic-card:hover {
        box-shadow:
            0 4px 20px rgba(46, 107, 47, 0.15),
            0 0 30px rgba(46, 107, 47, 0.08);
    }
}

/* Particle container */
.magic-card .mc-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
}

/* Global spotlight */
.mc-global-spotlight {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    opacity: 0;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

/* ─── Staggered Menu ─── */

.staggered-menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 60;
    pointer-events: none;
    overflow: hidden;
}

.staggered-menu-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 20;
    pointer-events: none;
}

.staggered-menu-header > * {
    pointer-events: auto;
}

.sm-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #2B2B2B;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    overflow: visible;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.sm-toggle:hover {
    background: rgba(46, 107, 47, 0.08);
}

.sm-toggle:focus-visible {
    outline: 2px solid #2E6B2F;
    outline-offset: 2px;
    border-radius: 12px;
}

.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;
}

.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;
}

.sm-prelayers {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(280px, 45vw, 420px);
    pointer-events: none;
    z-index: 5;
}

.sm-prelayer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
}

.staggered-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: clamp(280px, 45vw, 420px);
    height: 100%;
    background: white;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
    z-index: 10;
    pointer-events: auto;
}

.sm-panel-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sm-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sm-panel-itemWrap {
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.sm-panel-item {
    position: relative;
    color: #2B2B2B;
    font-weight: 700;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    cursor: pointer;
    line-height: 1.15;
    letter-spacing: -1px;
    text-transform: uppercase;
    display: inline-block;
    text-decoration: none;
    padding: 0.15em 0;
    transition: color 0.25s ease;
    font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.sm-panel-item:hover {
    color: #2E6B2F;
}

.sm-panel-item:focus-visible {
    outline: 2px solid #2E6B2F;
    outline-offset: 3px;
}

.sm-panel-itemLabel {
    display: inline-block;
    will-change: transform;
    transform-origin: 50% 100%;
}

.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: 12px;
    font-weight: 400;
    color: #5FAF3A;
    letter-spacing: 0;
    pointer-events: none;
    user-select: none;
    opacity: var(--sm-num-opacity, 0);
}

.sm-socials {
    margin-top: auto;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sm-socials-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2E6B2F;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sm-socials-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sm-socials-link {
    font-size: 1rem;
    font-weight: 600;
    color: #2B2B2B;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.sm-socials-link:hover {
    color: #2E6B2F;
}

.sm-socials-link:focus-visible {
    outline: 2px solid #2E6B2F;
    outline-offset: 3px;
}

.sm-socials-list:hover .sm-socials-link {
    opacity: 0.35;
}

.sm-socials-list:hover .sm-socials-link:hover {
    opacity: 1;
}

@media (max-width: 640px) {
    .staggered-menu-panel,
    .sm-prelayers {
        width: 100%;
    }
}
