/* --- Reset & Base --- */
:root {
    --bg-color: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Orbitron', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    /* Allow scrolling if needed */
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- Backgrounds --- */
.background-visual {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(50, 50, 50, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(70, 70, 70, 0.05) 0%, transparent 25%);
    z-index: -2;
}

.wolf-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('logostark.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    /* Increased opacity */
    filter: grayscale(100%) contrast(120%);
    z-index: 0;
    /* Brought forward */
    pointer-events: none;
    /* Prevent blocking clicks */
    transition: transform 10s ease-in-out;
}

body:hover .wolf-background {
    transform: scale(1.05);
}

/* --- Main Layout --- */
.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    /* Allow growing */
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    /* Distribute space */
}

/* --- Footer --- */
/* --- Footer --- */
footer {
    position: relative;
    /* Natural flow */
    width: 100%;
    text-align: center;
    padding: 1rem 0 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    z-index: 2;
    margin-top: 1rem;
}

/* --- Header --- */
/* --- Header --- */
.hero-header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
    /* Moved up */
    position: relative;
    /* Natural flow */
    width: 100%;
    z-index: 2;
}

.hero-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    opacity: 0;

    /* Shimmer Effect */
    background: linear-gradient(to right, #4d4d4d 0%, #fff 50%, #4d4d4d 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);

    /* Combine entrance with shimmer */
    animation: trackingIn 2s cubic-bezier(0.215, 0.610, 0.355, 1.000) both, shimmer 6s infinite linear 2s;
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.5em;
    color: var(--text-secondary);
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUpText 1s ease-out 1s both, pulseGlowText 5s infinite ease-in-out 2s;
}

/* --- Header Animations --- */
@keyframes trackingIn {
    0% {
        letter-spacing: -0.5em;
        opacity: 0;
    }

    40% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInUpText {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Video Section --- */
.video-section {
    width: 100%;
    max-width: 700px;
    position: relative;
    opacity: 0;
    animation: scaleIn 1.2s var(--ease-out-expo) forwards 0.5s;
    margin-top: -1rem;
    /* Move up slightly */
    margin-bottom: 1rem;
}

.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

#stark-logo-video {
    width: 100%;
    display: block;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
}

/* --- Category Navigation --- */
/* --- Navigation Interaction Wrapper --- */
.nav-interaction-wrapper {
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    /* Reduced gap to bring KNX closer */
    width: 100%;
    max-width: 1400px;
    /* Increased max-width */
    margin: 0 auto;
    perspective: 1000px;
    padding: 2rem;
    /* Added padding to prevent edge clipping artifacts */
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
    flex-grow: 1;
    /* Allow it to take available space */
    margin-bottom: 0;
    /* Removed margin */
}

/* --- Leader Card (Trigger) --- */
.leader-card {
    width: 240px;
    /* Wider */
    height: 140px;
    /* Shorter */
    flex-shrink: 0;
    /* Use standard glass styles from .category-card, or match member-card exactly if it overrides */
    /* member-card doesn't have specific bg/border, it uses .category-card */
    /* So we should remove specific bg/border here to match */
    z-index: 10;
    transition: all 0.5s var(--ease-out-expo);
    cursor: pointer;
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
    /* Removed pulseGlow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.leader-card .card-title {
    font-size: 1rem;
    /* Reduced font size */
    background: linear-gradient(90deg, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pulse animation for Leader Card */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
    }
}

/* --- Members Grid (Horizontal Row) --- */
.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4 columns in a row */
    gap: 0.8rem;
    width: auto;
    max-width: none;
    margin-top: 0;
    margin-left: 0;
    /* Removed extra margin */
    /* Spacing from Leader */
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
    animation-delay: 0.2s;
}

/* --- Hover Interaction --- */
/* --- Hover Interaction --- */
.leader-card:hover {
    transform: translateY(-10px) scale(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6), 0 0 40px rgba(0, 242, 255, 0.3) !important;
    border-color: rgba(0, 242, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.1);
    z-index: 20;
}

/* Member Card Styles */
.member-card {
    width: 200px;
    /* Wider */
    height: 120px;
    /* Shorter */
    /* Animation handled by keyframes now, or just static */
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
    opacity: 0;
    /* Start hidden for animation */
}

.member-card:hover {
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6), 0 0 40px rgba(0, 242, 255, 0.3) !important;
    /* Blue glow */
    border-color: rgba(0, 242, 255, 0.8) !important;
    /* Blue border */
    transform: translateY(-10px) scale(1.1) !important;
    /* Force override animation */
    z-index: 20;
    /* Bring to front */
}

/* Shrink Leader when a Member is hovered */
.nav-interaction-wrapper:has(.member-card:hover) .leader-card {
    transform: scale(0.9) !important;
    /* Force override */
    opacity: 0.7;
    filter: grayscale(50%);
    box-shadow: none !important;
    /* Remove glow */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Staggered Delays on Load */
/* Staggered Delays on Load for ALL cards */
.nav-interaction-wrapper .category-card {
    opacity: 0;
    /* Ensure hidden initially */
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.nav-interaction-wrapper .category-card:nth-child(1) {
    animation-delay: 0.2s;
}

.nav-interaction-wrapper .category-card:nth-child(2) {
    animation-delay: 0.35s;
}

.nav-interaction-wrapper .category-card:nth-child(3) {
    animation-delay: 0.5s;
}

.nav-interaction-wrapper .category-card:nth-child(4) {
    animation-delay: 0.65s;
}

.nav-interaction-wrapper .category-card:nth-child(5) {
    animation-delay: 0.8s;
}

/* Common Card Styles (Glassmorphism Enhanced) */
.category-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Shine Effect */
/* Shine Effect Removed to prevent blinking/glitching */
/* Shine Effect */
.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -200%;
    /* Move further away */
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: none;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    /* Hide initially */
    visibility: hidden;
    /* Force hide from rendering */
}

.category-card:hover::after {
    left: 150%;
    opacity: 1;
    /* Show on hover */
    visibility: visible;
    /* Show when hovering */
    transition: 0.7s ease-in-out;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.1);
}

.card-content {
    z-index: 2;
}

.card-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.category-card:hover .card-glow {
    opacity: 1;
}

/* --- Supervised Section --- */
/* --- Supervised Section --- */
.supervised-section {
    text-align: center;
    margin-top: auto;
    /* Push to bottom */
    margin-top: -1rem;
    /* Pull up closer to buttons */
    margin-bottom: 0;
    /* Reduced from 2rem */
    position: relative;
    /* Natural flow */
    width: 100%;
    padding-top: 0;
    /* Reduced from 2rem */
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem auto 0;
}

.supervised-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.supervised-tag {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.supervised-tag:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    cursor: default;
}

/* --- Footer --- */
footer {
    font-size: 0.7rem;
    color: #444;
    letter-spacing: 0.1em;
    margin-top: 2rem;
    /* Added spacing */
    /* Remove top margin */
    padding-bottom: 1rem;
    /* Reduced from 8rem */
    /* Large padding to push text up from bottom */
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
    transform: translateY(-20px);
    /* Nudge up visually */
}

/* --- Music Player --- */
.music-player-compact {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 100;
}

.music-player-compact:hover {
    padding-right: 1rem;
    border-color: var(--glass-highlight);
}

.player-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--glass-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.volume-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.3s var(--ease-out-expo);
    display: flex;
    align-items: center;
}

.music-player-compact:hover .volume-wrapper {
    width: 80px;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -4px;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #444;
    border-radius: 1px;
}

/* --- Animations --- */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-header h1 {
        font-size: 2.5rem;
    }

    .music-player-compact {
        bottom: 1rem;
        right: 1rem;
    }
}

/* --- Snow Effect --- */
.snowflake {
    position: absolute;
    top: -50px;
    /* Start higher due to size */
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    user-select: none;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

@media (max-width: 1200px) {
    .nav-interaction-wrapper {
        flex-direction: column;
    }

    .members-grid {
        margin-left: 0;
        margin-top: 2rem;
        grid-template-columns: repeat(2, 1fr);
        /* Back to 2x2 on tablet */
    }
}

@media (max-width: 600px) {
    .members-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        width: 100%;
        max-width: 100%;
    }

    .leader-card {
        width: 100%;
        max-width: 400px;
    }
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

@keyframes pulseGlowText {

    0%,
    100% {
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 10px rgba(0, 242, 255, 0.2);
    }
}