/* ==========================================================================
   Design System & Tokens
   ========================================================================== */
:root {
    /* Colors derived from Minecraft gems but modernized */
    --clr-emerald: hsla(150, 70%, 45%, 1);
    --clr-emerald-glow: hsla(150, 70%, 45%, 0.3);
    
    --clr-diamond: hsla(190, 80%, 50%, 1);
    --clr-diamond-glow: hsla(190, 80%, 50%, 0.25);
    
    --clr-amethyst: hsla(270, 60%, 55%, 1);
    --clr-amethyst-glow: hsla(270, 60%, 55%, 0.25);
    
    --clr-gold: hsla(45, 90%, 55%, 1);
    
    --clr-background: hsla(225, 15%, 8%, 1);
    --clr-surface: hsla(225, 15%, 12%, 0.7); /* Glassmorphic */
    --clr-surface-hover: hsla(225, 15%, 18%, 0.85);
    
    --clr-text: hsla(0, 0%, 98%, 1);
    --clr-text-muted: hsla(225, 5%, 70%, 1);
    
    --border-glass: hsla(0, 0%, 100%, 0.1);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Syne', var(--font-main);
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Animation timing */
    --transition-fast: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    --hero-text: #111;
    --hero-text-soft: #222;
    --hero-nav-link: #111;
    --hero-nav-shadow: 0 1px 5px rgba(255, 255, 255, 0.7);
}

[data-theme="light"] {
    --clr-background: hsl(220, 24%, 96%);
    --clr-surface: hsla(220, 30%, 100%, 0.78);
    --clr-surface-hover: hsla(220, 25%, 98%, 0.95);
    --clr-text: hsl(225, 25%, 12%);
    --clr-text-muted: hsl(225, 12%, 38%);
    --border-glass: hsla(225, 20%, 40%, 0.12);
    --hero-text: hsl(225, 30%, 12%);
    --hero-text-soft: hsl(225, 22%, 22%);
    --hero-nav-link: hsl(225, 30%, 12%);
    --hero-nav-shadow: none;
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
    font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background-color: var(--clr-background);
    color: var(--clr-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, hsla(150, 50%, 45%, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 30%, hsla(270, 45%, 55%, 0.08), transparent 45%),
        radial-gradient(ellipse 50% 35% at 50% 100%, hsla(190, 70%, 50%, 0.06), transparent 50%);
}

[data-theme="light"] body::before {
    opacity: 0.7;
    background:
        radial-gradient(ellipse 80% 50% at 15% 0%, hsla(150, 55%, 42%, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 95% 20%, hsla(270, 40%, 60%, 0.1), transparent 50%);
}

body > * {
    position: relative;
    z-index: 1;
}

body.nav-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.65rem 1.1rem;
    background: var(--clr-emerald);
    color: #111;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 10px 10px;
    transform: translateY(-120%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid var(--clr-diamond);
    outline-offset: 2px;
}

::selection {
    background-color: var(--clr-emerald-glow);
    color: white;
}

/* Typography elements */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

h1, h2 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.75rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.85rem); }
h3 { font-size: 1.35rem; font-family: var(--font-main); font-weight: 700; letter-spacing: -0.02em; }

p {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

a {
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:focus-visible,
button:focus-visible,
.ip-input:focus-visible {
    outline: 2px solid var(--clr-emerald);
    outline-offset: 3px;
}

[data-theme="light"] a:focus-visible,
[data-theme="light"] button:focus-visible,
[data-theme="light"] .ip-input:focus-visible {
    outline-color: var(--clr-diamond);
}

.text-center { text-align: center; }

.section-kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clr-emerald);
    margin: 0 0 0.65rem;
}

.section-kicker--center {
    text-align: center;
}

.highlight-inline {
    color: var(--clr-emerald);
}

.lead {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    line-height: 1.65;
    color: var(--clr-text-muted);
    margin-bottom: 1.75rem;
}

.container {
    width: min(92%, 72rem);
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 0;
}

.container.container--section {
    padding-block: clamp(3.25rem, 7vw, 5.25rem);
}

.container.container--join {
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 200;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: hsla(225, 15%, 8%, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1rem 0;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid hsla(255, 255, 255, 0.22);
    box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.35);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #111, var(--clr-emerald));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled .logo-text {
    background: linear-gradient(135deg, white, var(--clr-emerald));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
}

.nav-links a:not(.btn-nav):hover {
    color: var(--clr-emerald);
}

.nav-links a:not(.btn-nav) {
    color: var(--hero-nav-link);
    font-weight: 700;
    text-shadow: var(--hero-nav-shadow);
    transition: var(--transition-fast);
}

.nav-links a:not(.btn-nav).is-active {
    color: var(--clr-emerald);
}

.navbar.scrolled .nav-links a:not(.btn-nav) {
    color: var(--clr-text);
    text-shadow: none;
}

.navbar.scrolled .nav-links a:not(.btn-nav).is-active {
    color: var(--clr-emerald);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: hsla(255, 255, 255, 0.08);
    color: var(--clr-text);
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.theme-toggle:hover {
    background: hsla(255, 255, 255, 0.14);
    border-color: hsla(255, 255, 255, 0.2);
    color: var(--clr-emerald);
}

[data-theme="light"] .theme-toggle {
    background: hsla(225, 30%, 100%, 0.9);
    color: var(--clr-text);
    box-shadow: 0 1px 3px hsla(225, 20%, 20%, 0.08);
}

.navbar:not(.scrolled) .theme-toggle {
    background: hsla(255, 255, 255, 0.35);
    color: #111;
    border-color: hsla(0, 0%, 0%, 0.12);
}

.navbar:not(.scrolled) .theme-toggle:hover {
    color: var(--clr-emerald);
}

.theme-toggle__icon--moon {
    display: none;
}

[data-theme="light"] .theme-toggle__icon--sun {
    display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
    display: block;
}

.menu-toggle .icon-close {
    display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

/* Navbar CTA */
.btn-nav {
    background: hsla(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    backdrop-filter: blur(8px);
}

.btn-nav:hover {
    background: var(--clr-emerald);
    color: #111;
    border-color: var(--clr-emerald);
    box-shadow: 0 0 15px var(--clr-emerald-glow);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: hsla(255, 255, 255, 0.08);
    color: var(--clr-text);
    cursor: pointer;
    transition: var(--transition-fast);
}

.navbar:not(.scrolled) .menu-toggle {
    background: hsla(255, 255, 255, 0.35);
    color: #111;
    border-color: hsla(0, 0%, 0%, 0.12);
}

.menu-toggle:hover {
    background: hsla(255, 255, 255, 0.16);
    color: var(--clr-emerald);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem; /* offset for navbar */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(160deg, hsl(195, 45%, 28%) 0%, hsl(150, 35%, 22%) 40%, hsl(225, 25%, 10%) 100%);
}

[data-theme="light"] .hero-bg-fallback {
    background:
        linear-gradient(165deg, hsl(195, 42%, 72%) 0%, hsl(150, 35%, 78%) 45%, hsl(220, 30%, 92%) 100%);
}

.hero-bg img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    transform: scale(1.05);
    animation: slowZoom 25s infinite alternate ease-in-out;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* Subtle vertical fade so nav and content are readable */
    background: linear-gradient(
        to bottom,
        hsla(255, 255, 255, 0.32) 0%,
        hsla(255, 255, 255, 0.05) 45%,
        hsla(225, 15%, 8%, 0.92) 100%
    );
}

[data-theme="light"] .overlay {
    background: linear-gradient(
        to bottom,
        hsla(255, 255, 255, 0.55) 0%,
        hsla(220, 30%, 96%, 0.35) 50%,
        hsla(220, 24%, 96%, 0.95) 100%
    );
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    z-index: 10;
    position: relative;
}

.hero-otter-banner {
    margin: 0 0 1.35rem;
    padding: 0;
    max-width: min(300px, 72vw);
    border: none;
    border-radius: clamp(14px, 3.5vw, 22px);
    overflow: hidden;
    box-shadow:
        0 0 0 1px hsla(255, 255, 255, 0.12) inset,
        0 20px 50px hsla(0, 0%, 0%, 0.45),
        0 0 60px hsla(35, 80%, 50%, 0.12);
    animation: fadeUp 1s ease both;
}

.hero-otter-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* Badge */
.badge-wrap {
    margin-bottom: 2rem;
    animation: fadeUp 1s ease both;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: hsla(255, 255, 255, 0.6);
    color: #111;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    transition: var(--transition-bounce);
    cursor: default;
}

.badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 4px 15px rgba(255,255,255,0.4);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--clr-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--clr-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Titles */
.hero-title {
    animation: fadeUp 1s ease 0.2s both;
    color: var(--hero-text);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .hero-title {
    text-shadow: 0 1px 3px hsla(225, 20%, 100%, 0.9);
}

.highlight {
    color: var(--clr-emerald);
    text-shadow: 0 2px 15px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.1vw, 1.25rem);
    font-weight: 500;
    max-width: 34rem;
    margin: 1.35rem auto 2.75rem;
    line-height: 1.55;
    animation: fadeUp 1s ease 0.4s both;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
    color: var(--hero-text-soft);
}

[data-theme="light"] .hero-subtitle {
    text-shadow: 0 1px 2px hsla(225, 30%, 100%, 0.95);
}

/* CTAs */
.hero-cta {
    display: flex;
    gap: 1.25rem;
    animation: fadeUp 1s ease 0.6s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.glow-btn {
    background: var(--clr-emerald);
    color: hsla(225, 15%, 8%, 1);
    box-shadow: 0 10px 25px var(--clr-emerald-glow);
    border: 1px solid transparent;
}

.glow-btn:hover {
    background: white;
    box-shadow: 0 10px 40px var(--clr-emerald-glow);
    transform: translateY(-3px);
}

.outline-btn {
    background: hsla(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
}

.outline-btn:hover {
    background: hsla(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-3px);
}

[data-theme="light"] .hero .outline-btn {
    color: var(--hero-text);
    border-color: hsla(225, 25%, 35%, 0.35);
    background: hsla(255, 255, 255, 0.45);
}

[data-theme="light"] .hero .outline-btn:hover {
    background: hsla(255, 255, 255, 0.75);
    border-color: var(--clr-emerald);
}

/* Scroll indicator */
.scroll-prompt {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.85;
    color: var(--hero-text);
    animation: float 3s ease-in-out infinite;
    z-index: 10;
}

.scroll-prompt p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.mouse-icon {
    width: 24px;
    height: 36px;
    border: 2px solid var(--hero-text);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: var(--hero-text);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

/* Animations */
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes scrollWheel {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 10px); opacity: 0; }
}

/* ==========================================================================
   Utilities / Components
   ========================================================================== */
.glass-card {
    background: var(--clr-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2.5rem;
}

/* Scroll intersection reveals */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    position: relative;
    z-index: 10;
}

.auto-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: stretch;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text.glass-card {
    padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 3vw, 2.5rem);
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    transition: var(--transition-bounce);
    cursor: default;
}

.stat-item--link {
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    cursor: pointer;
}

.stat-item--link:focus-visible {
    outline: 2px solid var(--clr-emerald);
    outline-offset: 4px;
}

.stat-item:hover {
    transform: translateY(-8px);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--clr-emerald);
    margin-bottom: 0.25rem;
    transition: var(--transition-fast);
}
.stat-item:hover h3 {
    text-shadow: 0 0 20px var(--clr-emerald-glow);
}

.stat-item p {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Decorative blocks layout to emulate Minecraft abstractly */
.aesthetic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    perspective: 1000px;
}

.block-card {
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.block-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsla(255,255,255,0.1), transparent);
}

.block-card:hover {
    transform: translateZ(20px) scale(1.05);
}

.b-diamond { background: var(--clr-diamond-glow); box-shadow: 0 0 30px var(--clr-diamond-glow); }
.b-emerald { background: var(--clr-emerald-glow); box-shadow: 0 0 30px var(--clr-emerald-glow); }
.b-gold { background: hsla(45, 90%, 55%, 0.2); box-shadow: 0 0 30px hsla(45, 90%, 55%, 0.2); }
.b-obsidian { background: hsla(280, 50%, 20%, 0.5); box-shadow: 0 0 30px hsla(280, 50%, 20%, 0.5); }

/* ==========================================================================
   Features Section
   ========================================================================== */
.features {
    background: hsla(225, 20%, 6%, 1); /* Darker break */
    position: relative;
}

.features::before, .features::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
}
.features::before { top: 0; background: linear-gradient(to bottom, var(--clr-background), transparent); }
.features::after { bottom: 0; background: linear-gradient(to top, var(--clr-background), transparent); }

.features-header {
    max-width: 36rem;
    margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.features-header h2 {
    margin-bottom: 0.65rem;
}

.features .section-desc {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.features .section-desc--left,
.mods-section .section-desc--left {
    margin: 0;
    max-width: 38rem;
    text-align: left;
}

.features-bento {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.15rem;
    align-items: stretch;
}

.feature-card {
    text-align: left;
    transition: var(--transition-smooth);
    padding: clamp(1.75rem, 3vw, 2.25rem) clamp(1.5rem, 2.5vw, 2rem);
}

.feature-card--tall {
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
}

.feature-card--tall p:last-child {
    margin-bottom: 0;
    margin-top: auto;
    padding-top: 0.5rem;
}

.hover-lift:hover {
    transform: translateY(-10px);
    background: var(--clr-surface-hover);
    border-color: hsla(255,255,255,0.2);
}

.hover-lift:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.35rem;
    background: hsla(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    transition: var(--transition-bounce);
}

.emerald-glow { color: var(--clr-emerald); box-shadow: inset 0 0 20px var(--clr-emerald-glow); border-color: hsla(150, 70%, 45%, 0.3); }
.diamond-glow { color: var(--clr-diamond); box-shadow: inset 0 0 20px var(--clr-diamond-glow); border-color: hsla(190, 80%, 50%, 0.3); }
.amethyst-glow { color: var(--clr-amethyst); box-shadow: inset 0 0 20px var(--clr-amethyst-glow); border-color: hsla(270, 60%, 55%, 0.3); }

/* Custom helper dashboard screenshot */
.panel-showcase {
    margin-top: clamp(2rem, 5vw, 3.25rem);
    padding: 0;
    overflow: hidden;
    border-radius: clamp(14px, 2vw, 20px);
    border: 1px solid var(--border-glass);
    box-shadow:
        0 0 0 1px hsla(0, 0%, 100%, 0.04) inset,
        0 24px 60px hsla(0, 0%, 0%, 0.45),
        0 0 80px hsla(150, 70%, 40%, 0.08);
}

.panel-showcase__chrome {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    background: hsla(225, 18%, 8%, 0.95);
    border-bottom: 1px solid var(--border-glass);
}

.panel-showcase__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: hsla(0, 0%, 100%, 0.12);
    box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.06) inset;
}

.panel-showcase__dot:nth-child(1) { background: hsla(0, 65%, 55%, 0.85); }
.panel-showcase__dot:nth-child(2) { background: hsla(45, 90%, 52%, 0.75); }
.panel-showcase__dot:nth-child(3) { background: hsla(145, 60%, 42%, 0.8); }

.panel-showcase__frame {
    margin: 0;
    padding: clamp(0.5rem, 1.5vw, 0.85rem);
    background: hsla(225, 22%, 4%, 1);
    line-height: 0;
}

.panel-showcase__trigger {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    cursor: zoom-in;
    font: inherit;
    color: inherit;
    background: transparent;
    line-height: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.panel-showcase__trigger:focus {
    outline: 2px solid var(--clr-emerald);
    outline-offset: 3px;
}

.panel-showcase__trigger:focus:not(:focus-visible) {
    outline: none;
}

.panel-showcase__trigger:hover .panel-showcase__trigger-hint,
.panel-showcase__trigger:focus-visible .panel-showcase__trigger-hint {
    opacity: 1;
}

.panel-showcase__trigger:hover img,
.panel-showcase__trigger:focus-visible img {
    border-color: hsla(150, 65%, 45%, 0.45);
}

.panel-showcase__trigger-hint {
    position: absolute;
    bottom: 0.65rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: hsla(0, 0%, 100%, 0.95);
    background: hsla(225, 22%, 6%, 0.88);
    border: 1px solid hsla(150, 55%, 40%, 0.35);
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-showcase__frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid hsla(0, 0%, 100%, 0.08);
}

.panel-showcase__caption-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.86em;
    opacity: 0.92;
}

.panel-showcase__caption {
    margin: 0;
    padding: 1rem 1.25rem 1.2rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--clr-text-muted);
    border-top: 1px solid var(--border-glass);
    background: hsla(225, 18%, 9%, 0.6);
}

html[data-theme="light"] .panel-showcase__chrome {
    background: hsla(225, 25%, 96%, 0.98);
}

html[data-theme="light"] .panel-showcase__frame {
    background: hsla(225, 20%, 92%, 1);
}

html[data-theme="light"] .panel-showcase__caption {
    background: hsla(225, 25%, 97%, 0.85);
}

html[data-theme="light"] .panel-showcase__trigger-hint {
    color: hsla(225, 25%, 12%, 0.95);
    background: hsla(225, 25%, 98%, 0.92);
    border-color: hsla(150, 45%, 38%, 0.35);
}

/* Fullscreen lightbox: native-resolution image (scroll / pinch to explore) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/*
 * Closed <dialog> must stay display:none. A bare .panel-lightbox { display:flex } overrides
 * the user agent and leaves the overlay stuck visible forever.
 */
.panel-lightbox:not([open]) {
    display: none !important;
}

/* position:fixed + flex only while open — relative would break out of the top layer */
.panel-lightbox[open] {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-width: 100dvw;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    background: hsla(225, 22%, 4%, 0.97);
    color: var(--clr-text);
}

.panel-lightbox::backdrop {
    background: hsla(0, 0%, 0%, 0.78);
    backdrop-filter: blur(4px);
}

.panel-lightbox__header {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.55rem 0.65rem;
    padding-top: max(0.55rem, env(safe-area-inset-top, 0px));
    padding-left: max(0.65rem, env(safe-area-inset-left));
    padding-right: max(0.65rem, env(safe-area-inset-right));
    border-bottom: 1px solid var(--border-glass);
    background: hsla(225, 18%, 8%, 0.96);
}

.panel-lightbox__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    min-width: 0;
}

.panel-lightbox__tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    margin: 0;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    color: var(--clr-text);
    background: hsla(255, 255, 255, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.panel-lightbox__tool:hover {
    background: hsla(255, 255, 255, 0.1);
    border-color: hsla(150, 55%, 42%, 0.35);
}

.panel-lightbox__tool:focus-visible {
    outline: 2px solid var(--clr-emerald);
    outline-offset: 2px;
}

.panel-lightbox__tool[aria-pressed="true"] {
    background: hsla(150, 45%, 35%, 0.35);
    border-color: hsla(150, 60%, 45%, 0.5);
    color: hsl(150, 70%, 88%);
}

.panel-lightbox__tool--link {
    color: var(--clr-diamond);
}

.panel-lightbox__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    margin: 0;
    margin-left: auto;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    cursor: pointer;
    color: var(--clr-text);
    background: hsla(225, 18%, 14%, 0.95);
    box-shadow: 0 4px 18px hsla(0, 0%, 0%, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.panel-lightbox__close:hover {
    background: hsla(225, 18%, 20%, 0.98);
    border-color: hsla(150, 55%, 42%, 0.4);
}

.panel-lightbox__close:focus-visible {
    outline: 2px solid var(--clr-emerald);
    outline-offset: 2px;
}

/*
 * align-items:center on a scroll flexbox clips the top/bottom of oversized content
 * (overflow sits above scrollTop=0). Start at top; center only in "fit" mode via :has().
 */
.panel-lightbox__viewport {
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    cursor: grab;
    scroll-behavior: smooth;
}

.panel-lightbox__viewport:has(.panel-lightbox__img--fit) {
    justify-content: center;
    align-items: center;
}

.panel-lightbox__viewport:active {
    cursor: grabbing;
}

.panel-lightbox__viewport:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px hsla(150, 60%, 45%, 0.45);
}

.panel-lightbox__img {
    flex-shrink: 0;
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0 auto;
    image-rendering: auto;
    border-radius: 6px;
    box-shadow: 0 12px 48px hsla(0, 0%, 0%, 0.55);
    user-select: none;
}

.panel-lightbox__img--fit {
    max-width: calc(100vw - 1.25rem) !important;
    max-height: calc(100vh - 8.5rem) !important;
    width: auto !important;
    height: auto !important;
}

.panel-lightbox__hint {
    flex-shrink: 0;
    margin: 0;
    padding: 0.4rem 0.75rem 0.65rem;
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--clr-text-muted);
    text-align: center;
    border-top: 1px solid var(--border-glass);
    background: hsla(225, 18%, 7%, 0.9);
}

.panel-lightbox__hint kbd {
    display: inline-block;
    padding: 0.12em 0.38em;
    margin: 0 0.05em;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.88em;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--border-glass);
    background: hsla(255, 255, 255, 0.08);
}

.panel-lightbox:fullscreen {
    background: hsla(225, 22%, 4%, 1);
}

.panel-lightbox:fullscreen .panel-lightbox__img {
    box-shadow: 0 4px 32px hsla(0, 0%, 0%, 0.35);
}

.panel-lightbox:fullscreen .panel-lightbox__img--fit {
    max-height: calc(100vh - 8.5rem) !important;
}

html[data-theme="light"] .panel-lightbox[open] {
    background: hsla(225, 25%, 96%, 0.98);
}

html[data-theme="light"] .panel-lightbox__header {
    background: hsla(225, 25%, 98%, 0.96);
}

html[data-theme="light"] .panel-lightbox__close {
    background: hsla(225, 25%, 100%, 0.95);
    color: var(--clr-text);
}

html[data-theme="light"] .panel-lightbox__hint {
    background: hsla(225, 25%, 97%, 0.92);
}

html[data-theme="light"] .panel-lightbox__hint kbd {
    background: hsla(225, 22%, 92%, 1);
}

/* ==========================================================================
   Mod list (mods.json)
   ========================================================================== */
.mods-section {
    position: relative;
    z-index: 10;
}

.mods-root {
    max-width: 48rem;
}

.inline-code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    font-weight: 600;
    padding: 0.1em 0.38em;
    border-radius: 6px;
    background: hsla(0, 0%, 0%, 0.28);
    border: 1px solid var(--border-glass);
    color: var(--clr-text);
}

[data-theme="light"] .inline-code {
    background: hsla(225, 22%, 92%, 1);
    color: var(--clr-text);
}

.mods-status,
.mods-empty,
.mods-error {
    font-size: 1.02rem;
    color: var(--clr-text-muted);
    margin: 0;
    line-height: 1.5;
}

.mods-error {
    color: hsl(0, 58%, 68%);
}

[data-theme="light"] .mods-error {
    color: hsl(0, 48%, 40%);
}

.mods-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    margin: 0 0 1.35rem;
    opacity: 0.92;
}

.mods-group-title {
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--clr-emerald);
    margin: 1.65rem 0 0.75rem;
}

.mods-meta + .mods-group-title,
.mods-root > .mods-group-title:first-child {
    margin-top: 0;
}

.mods-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mod-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem 1.15rem;
    padding: 0.95rem 1.1rem;
    background: var(--clr-surface);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-fast);
}

.mod-row:hover {
    border-color: hsla(150, 70%, 45%, 0.28);
    background: var(--clr-surface-hover);
}

.mod-row__main {
    flex: 1 1 13rem;
    min-width: 0;
}

.mod-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

a.mod-name:hover {
    color: var(--clr-emerald);
}

.mod-note {
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    margin: 0.3rem 0 0;
    line-height: 1.45;
}

.mod-row__meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--clr-text-muted);
    text-align: right;
}

.mod-version {
    color: var(--clr-diamond);
    font-weight: 600;
}

.mod-side {
    opacity: 0.88;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 520px) {
    .mod-row__meta {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }
}

/* ==========================================================================
   Join Section
   ========================================================================== */
.join-section {
    position: relative;
    padding: clamp(4.5rem, 12vw, 7rem) 0;
    overflow: hidden;
}

/* Background blob */
.join-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--clr-emerald-glow) 0%, transparent 60%);
    z-index: -1;
    filter: blur(50px);
    pointer-events: none;
}

.join-container {
    max-width: 36rem;
    margin-inline: auto;
    padding: clamp(2.25rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.25rem);
}

.join-section h2 {
    margin-bottom: 0.65rem;
}

.join-lead {
    max-width: 28rem;
    margin: 0 auto 1.25rem;
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--clr-text-muted);
}

.join-discord-link {
    color: var(--clr-emerald);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.join-discord-link:hover {
    color: var(--clr-text);
}

.ip-copy-wrapper {
    display: flex;
    background: hsla(0, 0%, 0%, 0.3);
    border: 1px solid hsla(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    margin: 2rem auto;
    max-width: 450px;
}

.ip-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    text-align: center;
    outline: none;
    cursor: text;
}

.copy-btn {
    background: var(--clr-surface);
    color: white;
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-bounce);
}

.copy-btn:hover {
    background: var(--clr-surface-hover);
    color: var(--clr-emerald);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.success {
    background: var(--clr-emerald);
    color: black;
    border-color: var(--clr-emerald);
}

.join-requirements {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    opacity: 0.7;
    margin: 0;
}

.join-hint {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin: 1rem 0 0;
    opacity: 0.85;
}

.join-hint kbd {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    margin: 0 0.1rem;
    border-radius: 6px;
    background: hsla(0, 0%, 0%, 0.25);
    border: 1px solid var(--border-glass);
    color: var(--clr-text);
}

[data-theme="light"] .join-hint kbd {
    background: hsla(225, 20%, 90%, 1);
    border-color: hsla(225, 15%, 75%, 1);
    color: var(--clr-text);
}

.join-hint-plus {
    margin: 0 0.2rem;
    opacity: 0.6;
    font-size: 0.7rem;
    vertical-align: middle;
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 165;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: var(--clr-surface);
    color: var(--clr-emerald);
    cursor: pointer;
    box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--clr-surface-hover);
    border-color: hsla(150, 70%, 45%, 0.45);
    color: var(--clr-text);
}

[data-theme="light"] .back-to-top {
    box-shadow: 0 6px 24px hsla(225, 20%, 20%, 0.12);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 180;
    background: hsla(225, 15%, 4%, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-backdrop[hidden] {
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0;
}

.footer-content {
    padding: 0;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, white, var(--clr-text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.7;
}

.social-links a:hover {
    opacity: 1;
    color: var(--clr-diamond);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .auto-grid {
        grid-template-columns: 1fr;
    }

    .features-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .feature-card--tall {
        grid-row: auto;
    }
    
    .stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.75rem 2.5rem;
    }
    
    .about-text {
        text-align: center;
    }

    .about-text .section-kicker {
        text-align: center;
    }

    .features-header {
        text-align: center;
        margin-inline: auto;
    }

    .features .section-desc--left,
    .mods-section .section-desc--left {
        text-align: center;
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100dvh;
        width: min(19rem, 88vw);
        margin: 0;
        padding: 5.5rem 1.75rem 2rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        background: hsla(225, 15%, 10%, 0.92);
        border-left: 1px solid var(--border-glass);
        box-shadow: -12px 0 40px hsla(0, 0%, 0%, 0.45);
        transform: translateX(105%);
        transition: transform 0.32s cubic-bezier(0.25, 1, 0.3, 1);
        z-index: 210;
        display: flex;
        visibility: hidden;
        pointer-events: none;
    }

    [data-theme="light"] .nav-links {
        background: hsla(220, 25%, 98%, 0.96);
        box-shadow: -8px 0 32px hsla(225, 20%, 20%, 0.12);
    }

    .nav-links.is-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links a:not(.btn-nav) {
        color: var(--clr-text);
        text-shadow: none;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border-glass);
        font-size: 1.1rem;
    }

    .nav-links .btn-nav {
        margin-top: 1rem;
        text-align: center;
        justify-content: center;
    }

    .menu-toggle {
        display: flex;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .ip-copy-wrapper {
        flex-direction: column;
        gap: 0.5rem;
        background: transparent;
        border: none;
        padding: 0;
    }
    
    .ip-input {
        background: hsla(0, 0%, 0%, 0.3);
        border: 1px solid hsla(255, 255, 255, 0.2);
        padding: 1rem;
        border-radius: 8px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .panel-lightbox__viewport {
        scroll-behavior: auto;
    }

    .hero-otter-banner {
        animation: none;
    }

    .hero-bg img {
        animation: none;
        transform: none;
    }

    .scroll-prompt {
        animation: none;
    }

    .mouse-icon::after {
        animation: none;
    }

    .pulse-dot {
        animation: none;
    }

    .fade-in {
        transition: none;
    }

    .back-to-top {
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }

    .nav-links {
        transition: none;
    }
}
