/* 
===============================================
   IGEOsUZ - Modern Web App Style
=============================================== 
*/

:root {
    /* Color Palette */
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-glass-hover: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(0, 0, 0, 0.05);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-blue:   #059669;   /* deep emerald — replaces blue role */
    --accent-purple: #10B981;   /* main emerald — replaces purple role */
    --accent-pink:   #34D399;   /* bright mint — replaces pink role */

    --gradient-primary: linear-gradient(135deg, #059669, #34D399);
    --gradient-glow:    linear-gradient(135deg, rgba(5, 150, 105, 0.30), rgba(52, 211, 153, 0.30));
    --gradient-gold: linear-gradient(135deg, #059669 0%, #34D399 50%, #059669 100%);

    /* ── Emerald Green Theme (Navbar & Footer) ── */
    --gold-light:  #A7F3D0;   /* light mint — hover glow */
    --gold-mid:    #10B981;   /* main emerald */
    --gold-dark:   #34D399;   /* bright emerald — hover accents */
    --gold-bg:     rgba(4, 120, 72, 0.91);  /* solid emerald — same as scrolled */
    --gold-bg-scrolled: rgba(4, 120, 72, 0.91); /* same — consistent everywhere */
    --gold-border: rgba(52, 211, 153, 0.55);
    --gold-text:        #ffffff;   /* WHITE — max contrast on green */
    --gold-text-muted:  #D1FAE5;  /* very light mint for secondary text */
    --gradient-gold-footer: linear-gradient(160deg, #065F46 0%, #047857 35%, #059669 65%, #064E3B 100%);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.22);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --shadow-gold:  0 4px 24px rgba(5, 120, 70, 0.25);

    /* Scrolled Header */
    --header-scrolled: rgba(255, 255, 255, 0.85);

    /* Footer & Overlays */
    --bg-footer: #f1f5f9;
    --bg-overlay: rgba(15, 23, 42, 0.6);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] {
    --bg-dark: #020617; /* Slate 950 for deeper, premium feel */
    --bg-surface: #0f172a; /* Slate 900 */
    --bg-glass: rgba(15, 23, 42, 0.65);
    --bg-glass-hover: rgba(30, 41, 59, 0.85);
    --border-glass: rgba(255, 255, 255, 0.06);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Dark-mode emerald adjustments */
    --gold-bg:     rgba(16, 185, 129, 0.12);
    --gold-bg-scrolled: rgba(2, 44, 26, 0.94);
    --gold-border: rgba(52, 211, 153, 0.25);
    --gold-text:        #ffffff;    /* white — readable on dark green */
    --gold-text-muted:  #A7F3D0;   /* light mint secondary text */
    --gradient-gold-footer: linear-gradient(160deg, #022C1A 0%, #064E3B 40%, #047857 70%, #022C1A 100%);

    --bg-footer: #020617;
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --header-scrolled: rgba(2, 6, 23, 0.85);
    --shadow-glass: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    --border-glass-hover: rgba(16, 185, 129, 0.3); /* Green glow border */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    overflow-x: clip; /* unlike hidden, clip keeps position:sticky working */
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-x: clip; /* unlike hidden, clip keeps position:sticky working */
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

html[data-study-booting="true"] body {
    transition: none !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
}

h2 span,
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 6rem 0;
}

/* Glassmorphism */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-medium);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-medium);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

/* Navbar – Solid Emerald Green (consistent at all scroll positions) */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow var(--transition-medium), padding var(--transition-medium);
    padding: 1.25rem 0;
    background: var(--gold-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gold-border);
    box-shadow: 0 4px 28px rgba(4, 100, 55, 0.40), inset 0 -1px 0 rgba(110, 231, 183, 0.35);
}

#navbar.scrolled {
    background: var(--gold-bg-scrolled);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gold-border);
    box-shadow: 0 4px 28px rgba(4, 100, 55, 0.40), inset 0 -1px 0 rgba(110, 231, 183, 0.35);
    padding: 0.85rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold-text);
    text-shadow: 0 1px 3px rgba(52, 211, 153, 0.15);
}

.logo i {
    color: var(--gold-dark);
    font-size: 2rem;
}

.logo-img {
    height: 3rem;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.55);
}

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

.nav-links a {
    color: var(--gold-text);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold); /* emerald underline */
    border-radius: 2px;
    transition: width var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-dark);
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.55);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    min-width: 180px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.5rem 0;
    z-index: 1000;
    margin-top: 5px; /* Standardize gap */
}

/* Create a "bridge" so the hover state isn't lost when moving to the menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeInDown var(--transition-fast) ease-out;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
    text-align: left;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--bg-dark);
    color: var(--accent-purple);
}

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

#themeToggleBtn {
    background: rgba(5, 120, 70, 0.20);
    border: 1px solid var(--gold-border);
    color: var(--gold-text);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition-medium);
}

#themeToggleBtn:hover {
    background: rgba(52, 211, 153, 0.30);
    border-color: var(--gold-mid);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.40);
}

#themeToggleBtn i {
    transition: transform 0.5s ease;
}

[data-theme="dark"] #themeToggleBtn i {
    transform: rotate(360deg);
}

.lang-flag {
    width: 20px;
    height: auto;
    vertical-align: middle;
    margin-right: 6px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--gold-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Background Glowing Orbs */
@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: orbFloat 20s infinite ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
}

.orb-2 {
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
}

.orb-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    opacity: 0.2;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/world-map.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

.hero-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.hero-title {
    font-size: 4.5rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-study-cta {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-width: min(100%, 360px);
    padding: 1.1rem 1.55rem;
    margin: -0.7rem auto 2.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #047857, #10b981);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 18px 36px rgba(4, 120, 87, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
    animation: fadeInUp 1s ease 0.55s both, studyCtaPulse 2.8s ease-in-out infinite;
}

.user-logged-in .hero-study-cta {
    display: inline-flex;
}

.hero-study-cta:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 24px 44px rgba(4, 120, 87, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

.hero-study-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.3rem;
}

.hero-study-cta__text {
    line-height: 1.15;
}

.hero-study-cta__arrow {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.hero-study-cta:hover .hero-study-cta__arrow {
    transform: translateX(4px);
}

@keyframes studyCtaPulse {
    0%,
    100% {
        box-shadow: 0 18px 36px rgba(4, 120, 87, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
    }

    50% {
        box-shadow: 0 22px 44px rgba(16, 185, 129, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.8s both;
}

.glass-mockup {
    --demo-bg: #08111f;
    --demo-surface: #101b2e;
    --demo-surface-strong: #16243a;
    --demo-border: rgba(148, 163, 184, 0.14);
    --demo-text: #f8fafc;
    --demo-muted: #94a3b8;
    --demo-green: #34d399;
    --demo-green-strong: #10b981;
    width: 100%;
    height: 400px;
    background: linear-gradient(145deg, rgba(8, 17, 31, 0.98), rgba(7, 14, 26, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    box-shadow: 0 32px 80px -24px rgba(2, 6, 23, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    color: var(--demo-text);
    text-align: left;
    isolation: isolate;
    transition: width 300ms ease, height 300ms ease, border-radius 300ms ease, box-shadow 300ms ease,
        background 260ms ease, border-color 260ms ease, color 260ms ease;
}

.mockup-header {
    height: 48px;
    flex: 0 0 48px;
    border-bottom: 1px solid var(--demo-border);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: rgba(22, 36, 58, 0.82);
    position: relative;
}

.dots {
    display: flex;
    gap: 8px;
    z-index: 1;
}

.dots .demo-window-control {
    appearance: none;
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.42);
    transition: filter 160ms ease, transform 160ms ease;
}

.dots .demo-window-control:hover,
.dots .demo-window-control:focus-visible {
    filter: brightness(1.18);
    transform: scale(1.15);
}

.dots .demo-window-control:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.dots .demo-reset {
    background: #ef4444;
}

.dots .demo-pause {
    background: #f59e0b;
}

.dots .demo-expand {
    background: #10b981;
}

.demo-window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #dbe7f5;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.demo-window-title i {
    color: var(--demo-green);
    font-size: 0.95rem;
}

.demo-badge {
    margin-left: auto;
    padding: 0.24rem 0.58rem;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 999px;
    font-size: 0.61rem;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mockup-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.mockup-sidebar {
    position: relative;
    inset: auto;
    z-index: auto;
    width: 172px;
    flex: 0 0 172px;
    padding: 0.8rem 0.7rem;
    background: rgba(5, 12, 23, 0.72);
    border-right: 1px solid var(--demo-border);
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
}

.mockup-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.demo-nav-item {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.62rem;
    padding: 0.58rem 0.68rem;
    color: var(--demo-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.demo-nav-item i {
    width: 1rem;
    color: #7c8ca5;
    font-size: 1rem;
    text-align: center;
}

.demo-nav-item:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.07);
}

.demo-nav-item.active {
    color: #ecfdf5;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.08));
    border-color: rgba(52, 211, 153, 0.18);
    box-shadow: 0 8px 18px rgba(3, 10, 20, 0.18);
}

.demo-nav-item.active i {
    color: var(--demo-green);
}

.demo-nav-item:focus-visible,
.demo-sidebar-cta:focus-visible,
.demo-course-card:focus-visible,
.demo-module:focus-visible,
.demo-quiz-options button:focus-visible,
.demo-stat-card:focus-visible {
    outline: 2px solid var(--demo-green);
    outline-offset: 2px;
}

.demo-sidebar-cta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.68rem;
    color: #ecfdf5;
    background: linear-gradient(135deg, #047857, #10b981);
    border-radius: 9px;
    font-size: 0.67rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.2);
}

.demo-sidebar-cta:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.demo-view {
    position: absolute;
    inset: 0;
    padding: 1rem 1.15rem;
    opacity: 0;
    transform: translateY(7px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    overflow: hidden;
}

.demo-view.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.demo-view-heading {
    min-height: 43px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.72rem;
}

.demo-eyebrow {
    margin: 0 0 0.12rem;
    color: var(--demo-green);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.demo-view-heading h3 {
    margin: 0;
    color: var(--demo-text);
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.demo-level,
.demo-live {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
    padding: 0.32rem 0.55rem;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--demo-border);
    border-radius: 999px;
    font-size: 0.61rem;
    font-weight: 700;
}

.demo-level i {
    color: #fbbf24;
}

.demo-live > span:first-child {
    width: 6px;
    height: 6px;
    background: var(--demo-green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.75);
}

.demo-course-card {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 94px;
    padding: 0.82rem 0.9rem;
    color: var(--demo-text);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(14, 165, 233, 0.07));
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 13px;
    box-shadow: 0 12px 26px rgba(3, 10, 20, 0.2);
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.demo-course-card:hover {
    color: var(--demo-text);
    border-color: rgba(52, 211, 153, 0.38);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.1));
}

.demo-course-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d1fae5;
    background: linear-gradient(135deg, #047857, #10b981);
    border-radius: 12px;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.26);
}

.demo-course-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.demo-course-copy small,
.demo-stat-card small,
.demo-module small,
.demo-event-copy small,
.demo-readiness small,
.demo-mentor-card small,
.demo-activity-card small {
    color: var(--demo-muted);
    font-size: 0.58rem;
    font-style: normal;
}

.demo-course-copy strong {
    margin: 0.08rem 0 0.42rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.81rem;
}

.demo-progress {
    width: 100%;
    height: 5px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.13);
    border-radius: 999px;
}

.demo-progress span {
    display: block;
    width: var(--demo-progress);
    height: 100%;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
    border-radius: inherit;
    transform-origin: left;
    animation: demoProgressIn 900ms 350ms both ease-out;
}

.demo-course-percent {
    color: #a7f3d0;
    font-size: 0.72rem;
    font-weight: 800;
}

.demo-course-arrow {
    color: var(--demo-muted);
}

.demo-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.demo-stat-card {
    min-width: 0;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 0.58rem;
    padding: 0.64rem;
    color: var(--demo-text);
    background: rgba(22, 36, 58, 0.66);
    border: 1px solid var(--demo-border);
    border-radius: 11px;
    font-family: inherit;
    text-align: left;
}

button.demo-stat-card {
    cursor: pointer;
}

button.demo-stat-card:hover {
    border-color: rgba(167, 243, 208, 0.3);
    transform: translateY(-1px);
}

.demo-stat-card > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.demo-stat-card strong {
    font-size: 0.88rem;
    line-height: 1.15;
}

.demo-stat-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-stat-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 0.92rem;
}

.demo-stat-icon.quiz { color: #c4b5fd; background: rgba(139, 92, 246, 0.15); }
.demo-stat-icon.streak { color: #fdba74; background: rgba(249, 115, 22, 0.14); }
.demo-stat-icon.xp { color: #fde68a; background: rgba(245, 158, 11, 0.14); }

.demo-module-list {
    display: grid;
    gap: 0.5rem;
}

.demo-module {
    min-height: 66px;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 0.68rem;
    padding: 0.55rem 0.72rem;
    color: #dbe7f5;
    background: rgba(22, 36, 58, 0.48);
    border: 1px solid var(--demo-border);
    border-radius: 11px;
    transition: border-color 160ms ease, transform 160ms ease;
}

.demo-module:hover {
    color: #ffffff;
    border-color: rgba(52, 211, 153, 0.26);
    transform: translateX(2px);
}

.demo-module.current {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(52, 211, 153, 0.22);
}

.demo-module-state {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7890ad;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 9px;
    font-size: 1rem;
}

.demo-module.complete .demo-module-state,
.demo-module.current .demo-module-state {
    color: var(--demo-green);
    background: rgba(16, 185, 129, 0.12);
}

.demo-module > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.demo-module strong {
    font-size: 0.74rem;
}

.demo-module > span:last-child,
.demo-module > i:last-child {
    color: var(--demo-muted);
    font-size: 0.61rem;
    font-style: normal;
}

.demo-quiz-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
}

.demo-quiz-options button {
    min-height: 58px;
    padding: 0.72rem;
    color: #dbe7f5;
    background: rgba(22, 36, 58, 0.62);
    border: 1px solid var(--demo-border);
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.demo-quiz-options button:hover:not(:disabled) {
    color: #ffffff;
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
}

.demo-quiz-options button.correct {
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(52, 211, 153, 0.55);
}

.demo-quiz-options button.wrong {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(248, 113, 113, 0.42);
}

.demo-quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.demo-quiz-feedback {
    margin: 0;
    color: var(--demo-muted);
    font-size: 0.64rem;
}

.demo-quiz-feedback.success { color: #6ee7b7; }
.demo-quiz-feedback.error { color: #fca5a5; }

.demo-quiz-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    color: var(--demo-green);
    font-size: 0.64rem;
    font-weight: 800;
    white-space: nowrap;
}

.demo-event-card {
    min-height: 87px;
    display: grid;
    grid-template-columns: 52px 1fr 30px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(22, 36, 58, 0.62));
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 12px;
}

.demo-event-date {
    width: 50px;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff7ed;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 10px;
}

.demo-event-date strong {
    font-size: 1.12rem;
    line-height: 1;
}

.demo-event-date span {
    color: #fdba74;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
}

.demo-event-date--icon i {
    font-size: 1.45rem;
    line-height: 1;
}

.demo-event-copy,
.demo-readiness > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.demo-event-copy strong,
.demo-readiness strong {
    color: var(--demo-text);
    font-size: 0.75rem;
}

.demo-event-card > a {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 8px;
}

.demo-readiness {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.58rem;
    padding: 0.62rem 0.78rem;
    background: rgba(22, 36, 58, 0.5);
    border: 1px solid var(--demo-border);
    border-radius: 11px;
}

.demo-readiness-ring {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a7f3d0;
    background: radial-gradient(circle closest-side, #101b2e 78%, transparent 80% 100%), conic-gradient(#34d399 72%, rgba(148, 163, 184, 0.14) 0);
    border-radius: 50%;
    font-size: 0.64rem;
    font-weight: 800;
}

.demo-community-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0.62rem;
}

.demo-mentor-card,
.demo-activity-card {
    min-height: 151px;
    display: flex;
    align-items: center;
    padding: 0.85rem;
    background: rgba(22, 36, 58, 0.56);
    border: 1px solid var(--demo-border);
    border-radius: 12px;
}

.demo-mentor-card {
    gap: 0.65rem;
    flex-wrap: wrap;
}

.demo-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ecfdf5;
    background: linear-gradient(135deg, #0f766e, #10b981);
    border: 2px solid rgba(167, 243, 208, 0.22);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}

.demo-mentor-card > span:nth-child(2),
.demo-activity-card > span:last-child {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.demo-mentor-card strong,
.demo-activity-card strong {
    color: var(--demo-text);
    font-size: 0.72rem;
}

.demo-mentor-card em {
    color: var(--demo-muted);
    font-size: 0.58rem;
    font-style: normal;
}

.demo-mentor-card a {
    width: 100%;
    padding: 0.45rem 0.6rem;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.13);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 8px;
    font-size: 0.63rem;
    font-weight: 800;
    text-align: center;
}

.demo-activity-card {
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
    text-align: center;
}

.demo-activity-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    font-size: 1.22rem;
}

/* The main page uses no data-theme attribute for light mode. Keep the demo in
   sync with that state instead of leaving the preview permanently dark. */
:root:not([data-theme="dark"]) .study-demo {
    --demo-bg: #f8fafc;
    --demo-surface: #ffffff;
    --demo-surface-strong: #edf3f8;
    --demo-border: rgba(15, 23, 42, 0.12);
    --demo-text: #0f172a;
    --demo-muted: #64748b;
    --demo-green: #059669;
    --demo-green-strong: #047857;
    color-scheme: light;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(241, 245, 249, 0.98));
    border-color: rgba(15, 23, 42, 0.13);
    box-shadow: 0 30px 70px -28px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

:root:not([data-theme="dark"]) .study-demo .mockup-header {
    background: rgba(255, 255, 255, 0.92);
}

:root:not([data-theme="dark"]) .study-demo .demo-window-title {
    color: #334155;
}

:root:not([data-theme="dark"]) .study-demo .demo-badge {
    color: #047857;
    background: rgba(5, 150, 105, 0.09);
    border-color: rgba(5, 150, 105, 0.2);
}

:root:not([data-theme="dark"]) .study-demo .mockup-sidebar {
    background: rgba(241, 245, 249, 0.94);
}

:root:not([data-theme="dark"]) .study-demo .demo-nav-item i {
    color: #64748b;
}

:root:not([data-theme="dark"]) .study-demo .demo-nav-item:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

:root:not([data-theme="dark"]) .study-demo .demo-nav-item.active {
    color: #065f46;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.13), rgba(16, 185, 129, 0.06));
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

:root:not([data-theme="dark"]) .study-demo .demo-level,
:root:not([data-theme="dark"]) .study-demo .demo-live {
    color: #475569;
    background: rgba(15, 23, 42, 0.045);
}

:root:not([data-theme="dark"]) .study-demo .demo-course-card {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.11), rgba(14, 165, 233, 0.055));
    border-color: rgba(5, 150, 105, 0.19);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

:root:not([data-theme="dark"]) .study-demo .demo-course-card:hover {
    border-color: rgba(5, 150, 105, 0.34);
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.16), rgba(14, 165, 233, 0.08));
}

:root:not([data-theme="dark"]) .study-demo .demo-progress {
    background: rgba(15, 23, 42, 0.1);
}

:root:not([data-theme="dark"]) .study-demo .demo-course-percent {
    color: #047857;
}

:root:not([data-theme="dark"]) .study-demo .demo-stat-card,
:root:not([data-theme="dark"]) .study-demo .demo-module,
:root:not([data-theme="dark"]) .study-demo .demo-quiz-options button,
:root:not([data-theme="dark"]) .study-demo .demo-readiness,
:root:not([data-theme="dark"]) .study-demo .demo-mentor-card,
:root:not([data-theme="dark"]) .study-demo .demo-activity-card {
    color: var(--demo-text);
    background: rgba(255, 255, 255, 0.8);
}

:root:not([data-theme="dark"]) .study-demo .demo-module:hover,
:root:not([data-theme="dark"]) .study-demo .demo-quiz-options button:hover:not(:disabled) {
    color: #0f172a;
}

:root:not([data-theme="dark"]) .study-demo .demo-module.current {
    background: rgba(5, 150, 105, 0.09);
    border-color: rgba(5, 150, 105, 0.2);
}

:root:not([data-theme="dark"]) .study-demo .demo-module-state {
    color: #64748b;
    background: rgba(15, 23, 42, 0.055);
}

:root:not([data-theme="dark"]) .study-demo .demo-quiz-options button:hover:not(:disabled) {
    border-color: rgba(5, 150, 105, 0.3);
    background: rgba(5, 150, 105, 0.075);
}

:root:not([data-theme="dark"]) .study-demo .demo-quiz-options button.correct {
    color: #065f46;
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(5, 150, 105, 0.42);
}

:root:not([data-theme="dark"]) .study-demo .demo-quiz-options button.wrong {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.09);
    border-color: rgba(220, 38, 38, 0.28);
}

:root:not([data-theme="dark"]) .study-demo .demo-quiz-feedback.success {
    color: #047857;
}

:root:not([data-theme="dark"]) .study-demo .demo-quiz-feedback.error {
    color: #b91c1c;
}

:root:not([data-theme="dark"]) .study-demo .demo-event-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.82));
}

:root:not([data-theme="dark"]) .study-demo .demo-event-date {
    color: #78350f;
    background: rgba(245, 158, 11, 0.12);
}

:root:not([data-theme="dark"]) .study-demo .demo-event-date span {
    color: #b45309;
}

:root:not([data-theme="dark"]) .study-demo .demo-readiness-ring {
    color: #047857;
    background: radial-gradient(circle closest-side, #ffffff 78%, transparent 80% 100%),
        conic-gradient(#10b981 72%, rgba(15, 23, 42, 0.11) 0);
}

:root:not([data-theme="dark"]) .study-demo .demo-mentor-card a {
    color: #047857;
    background: rgba(5, 150, 105, 0.09);
    border-color: rgba(5, 150, 105, 0.19);
}

.study-demo.is-expanded {
    position: fixed;
    inset: 50% auto auto 50%;
    width: min(1100px, calc(100vw - 3rem));
    height: min(680px, calc(100vh - 3rem));
    transform: translate(-50%, -50%);
    z-index: 1200;
    border-radius: 22px;
    box-shadow: 0 42px 120px rgba(0, 0, 0, 0.76), 0 0 0 9999px rgba(2, 6, 23, 0.78);
}

.study-demo.is-expanded .mockup-header {
    height: 54px;
    flex-basis: 54px;
}

.study-demo.is-expanded .mockup-sidebar {
    width: 208px;
    flex-basis: 208px;
    padding: 1rem 0.85rem;
}

.study-demo.is-expanded .demo-nav-item {
    padding: 0.72rem 0.8rem;
    font-size: 0.82rem;
}

.study-demo.is-expanded .demo-view {
    padding: 2rem 2.3rem;
}

.study-demo.is-expanded .demo-view-heading h3 {
    font-size: 1.45rem;
}

.study-demo.is-expanded .demo-course-card {
    min-height: 145px;
}

.study-demo.is-expanded .demo-stat-card {
    min-height: 94px;
}

.study-demo.is-expanded .demo-module,
.study-demo.is-expanded .demo-quiz-options button {
    min-height: 92px;
}

html.demo-expanded,
html.demo-expanded body {
    overflow: hidden;
}

@keyframes demoProgressIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: var(--transition-medium);
}

.feature-card:hover {
    background: var(--bg-surface);
    border-color: var(--accent-purple);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-purple);
    font-size: 2rem;
    transition: var(--transition-fast);
}

.feature-card:hover .icon-box {
    background: var(--gradient-primary);
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* How It Works Section */
.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    z-index: 2;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.step-connector {
    flex: 1;
    height: 60px;
    display: flex;
    align-items: center;
}

.step-connector .line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0.5;
}

/* About Section */
.about {
    position: relative;
}

.about-container {
    display: grid;
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
}

.about-content {
    text-align: left;
}

.about-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-list {
    margin-top: 2rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.about-list i {
    color: var(--accent-purple);
    font-size: 1.5rem;
}

.founder-card {
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.founder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.founder-avatar {
    width: 100%;
    max-width: 320px;
    height: 400px;
    background: var(--bg-surface);
    border: 2px solid var(--border-glass);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--text-muted);
    overflow: hidden;
}

.founder-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-card .role {
    color: var(--accent-purple);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.founder-card .quote {
    font-style: italic;
    color: var(--text-secondary);
}




/* ─── Auth-state conditional rendering (no-flash approach) ───────────────── */
/*
 * The html.user-logged-in class is added by an inline <script> in <head>
 * before first paint, so these rules apply immediately — zero FOUC.
 * JS (applyLoggedInState / applyLoggedOutState) keeps them in sync at runtime.
 */

/* Hide the entire CTA / join section for logged-in users */
html.user-logged-in #ctaSection {
    display: none !important;
}

/* Guest-action navbar buttons hidden for logged-in users */
html.user-logged-in .guest-actions {
    display: none !important;
}

/* User-action navbar shown for logged-in users */
html.user-logged-in .user-actions {
    display: flex !important;
}

/* CTA section opacity transition when JS toggles it at runtime */
#ctaSection {
    transition: opacity 0.3s ease;
}

/* ─── CTA Section ─────────────────────────────────────────────────────────── */
.cta-box {
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
    border-color: rgba(139, 92, 246, 0.3);
}

.cta-box h2 {
    font-size: 3rem;
}

.cta-box p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Footer – Emerald Green Theme */
footer {
    background: var(--gradient-gold-footer);
    padding-top: 5rem;
    border-top: 2px solid rgba(52, 211, 153, 0.45);
    box-shadow: 0 -4px 30px rgba(5, 120, 70, 0.22);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(110, 231, 183, 0.04);
    pointer-events: none;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.footer-brand p {
    margin: 1.5rem 0;
    max-width: 300px;
    color: var(--gold-text-muted);
}

/* Override logo & text colors inside footer */
footer .logo {
    color: var(--gold-text);
}

footer .logo-img {
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.65);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 120, 70, 0.20);
    border: 1px solid var(--gold-border);
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--gold-text);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--gold-mid);
    border-color: var(--gold-light);
    color: #fff;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.5);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.link-group h4 {
    color: var(--gold-text);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.link-group ul li {
    margin-bottom: 0.75rem;
}

.link-group a {
    color: var(--gold-text-muted);
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.link-group a:hover {
    color: var(--gold-dark);
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(52, 211, 153, 0.30);
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: var(--gold-text-muted);
}

/* =====================
   Earth Globe Loader
   ===================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.earth-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    user-select: none;
}

/* ── Wrapper keeps orbit ring + dot in a shared stacking context ── */
.earth-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Atmospheric halo ── */
.earth-atmosphere {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 55%, rgba(59,130,246,0.18) 100%);
    animation: pulse-atmo 3s ease-in-out infinite;
    pointer-events: none;
}

/* ── Globe shell ── */
.earth-globe {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3a6e 0%, #0d2248 60%, #071530 100%);
    box-shadow:
        inset -18px -18px 40px rgba(0,0,0,0.5),
        inset 8px 8px 20px rgba(59,130,246,0.25),
        0 0 40px rgba(59,130,246,0.25);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* ── Scrolling continent map ── */
.earth-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;   /* 2× width so we can scroll seamlessly */
    height: 100%;
    animation: rotate-map 6s linear infinite;
}

.continent-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── Latitude lines overlay ── */
.lat-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lat-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.12);
    transform: translateY(-50%);
}

.lat-line.equator {
    background: rgba(255,255,255,0.22);
    height: 1.5px;
}

/* ── Orbital ring (tilted ellipse) ── */
.orbit-ring {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 2px dashed rgba(139,92,246,0.45);
    transform: rotateX(72deg);
    animation: tilt-ring 8s linear infinite;
    pointer-events: none;
}

/* ── Orbiting satellite dot ── */
.orbit-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple), 0 0 20px var(--accent-blue);
    transform-origin: 0 0;
    animation: orbit-dot 3s linear infinite;
    pointer-events: none;
}

/* ── Branding text ── */
.earth-loader-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

.loader-brand-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.earth-loader-sub {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: -1.2rem 0 0;
    letter-spacing: 0.05em;
    animation: blink-text 1.8s ease-in-out infinite;
}

/* Auth Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition-medium);
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.telegram-btn-wrapper {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
    min-height: 40px;
}

.telegram-login-trigger {
    border: 0;
    cursor: pointer;
}

.telegram-login-trigger i {
    font-size: 1.2rem;
}

.telegram-login-trigger.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.telegram-login-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: center;
}

.telegram-switch-notice {
    display: grid;
    gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}

.telegram-switch-notice strong {
    color: var(--text-primary);
}

.telegram-switch-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Earth loader keyframes */
@keyframes rotate-map {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes pulse-atmo {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.04); }
}

@keyframes tilt-ring {
    0%   { transform: rotateX(72deg) rotateZ(0deg); }
    100% { transform: rotateX(72deg) rotateZ(360deg); }
}

@keyframes orbit-dot {
    0%   { transform: rotate(0deg)   translateX(90px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(90px) rotate(-360deg); }
}

@keyframes blink-text {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Books Library */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
    border-color: var(--accent-purple);
}

.book-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.book-cover {
    width: 140px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 1.5rem;
    background-color: var(--bg-surface);
}

.book-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.book-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.book-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* =====================================================================
   RESPONSIVE DESIGN — Mobile-First Overhaul
   Breakpoints: 1024px (tablet), 768px (phone-landscape),
                640px (phone), 480px (small phone), 360px (mini)
   ===================================================================== */

/* ── Fluid Typography ── */
h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.hero-title {
    font-size: clamp(2rem, 7vw, 4.5rem);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
}

.cta-box h2 {
    font-size: clamp(1.75rem, 5vw, 3rem);
}

/* ── 1024px — Tablet: Nav collapses, grids adapt ── */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .pricing-card.popular {
        transform: none;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* ── Collapse navigation at tablet ── */
    .nav-container {
        flex-wrap: wrap;
    }

    /* Keep the toggle in the top row next to the logo, even when the
       full-width menu rows wrap below (DOM order puts it last). */
    .logo { order: 0; }
    .mobile-menu-btn { order: 1; }
    .nav-links { order: 2; }
    .nav-actions { order: 3; }

    .nav-links,
    .nav-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }

    .nav-links {
        border-top: 1px solid rgba(52, 211, 153, 0.25);
        margin-top: 0.75rem;
        padding-top: 0.5rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.85rem 1rem;
        min-height: 48px;
        font-size: 1rem;
        border-radius: 10px;
        transition: background 0.2s;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(52, 211, 153, 0.15);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-actions {
        padding: 0.5rem 0 0.75rem;
        gap: 0.5rem;
    }

    /* Mobile menu open state: full-screen overlay so page content never
       peeks through below the menu */
    #navbar.mobile-open {
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        background: var(--gold-bg-scrolled);
        box-shadow: 0 8px 32px rgba(4, 100, 55, 0.45);
        overscroll-behavior: contain;
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    }

    #navbar.mobile-open .nav-links,
    #navbar.mobile-open .nav-actions {
        display: flex;
        animation: fadeInDown 0.25s ease-out;
    }

    /* Guest actions full-width in mobile menu */
    #navbar.mobile-open .guest-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    #navbar.mobile-open .guest-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 1rem;
    }

    /* User actions in mobile menu */
    #navbar.mobile-open .user-actions {
        width: 100%;
    }

    #navbar.mobile-open .user-actions .dropdown-toggle {
        justify-content: center;
        width: 100%;
        padding: 0.75rem 1rem;
    }

    /* Theme + language toggles share one tidy row */
    #navbar.mobile-open .nav-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.6rem;
        padding: 0.75rem 0 1rem;
    }

    #navbar.mobile-open .guest-actions,
    #navbar.mobile-open .user-actions {
        flex-basis: 100%;
    }

    #navbar.mobile-open #themeToggleBtn {
        flex: 1;
        width: auto;
        min-height: 48px;
        height: 48px;
    }

    #navbar.mobile-open #langToggleBtn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        margin-left: 0;
    }

    /* Dropdown menus in mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 10px;
        text-align: center;
        margin: 0.25rem 0;
        padding: 0.25rem 0;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu a {
        padding: 0.65rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        color: var(--gold-text-muted);
    }

    .dropdown-menu a:hover {
        background: rgba(52, 211, 153, 0.12);
        color: var(--gold-text);
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 1.5rem;
        transition: background 0.2s;
    }

    .mobile-menu-btn:hover {
        background: rgba(52, 211, 153, 0.15);
    }

    /* ── Section spacing reduction ── */
    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* ── Features grid ── */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    /* ── Steps / How It Works ── */
    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .step-connector {
        flex-direction: column;
        height: auto;
        width: 60px;
    }

    .step-connector .line {
        width: 2px;
        height: 30px;
        background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple));
    }

    /* ── About founder ── */
    .founder-avatar {
        max-width: 260px;
        height: 340px;
    }

    /* ── Footer ── */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    /* ── CTA ── */
    .cta-box {
        padding: 3.5rem 1.5rem;
    }

    /* ── Books grid ── */
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    .book-card {
        padding: 2rem 1.5rem;
    }

    .book-actions .btn {
        min-height: 44px;
    }

    /* ── Modals ── */
    .modal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
}

/* ── 768px — Phone landscape / small tablet ── */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero {
        padding-top: 6rem;
        min-height: auto;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-study-cta {
        width: 100%;
        max-width: 340px;
        min-width: 0;
        padding: 1rem 1.2rem;
        font-size: 1rem;
    }

    /* ── Glass mockup ── */
    .glass-mockup {
        height: auto;
        min-height: 220px;
    }

    .mockup-sidebar {
        display: none;
    }

    /* ── Footer ── */
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    footer {
        padding-top: 3rem;
    }

    /* ── Nav padding when scrolled ── */
    #navbar {
        padding: 0.85rem 0;
    }

    #navbar.scrolled {
        padding: 0.6rem 0;
    }

    /* ── Buttons ── */
    .btn {
        min-height: 44px;
        padding: 0.7rem 1.25rem;
    }

    .btn-large {
        padding: 0.85rem 1.75rem;
        font-size: 1rem;
    }
}

/* ── 640px — Phone portrait ── */
@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .book-cover {
        width: 120px;
        height: auto;
    }

    .about-container {
        gap: 2rem;
    }

    .founder-avatar {
        max-width: 220px;
        height: 280px;
    }

    .founder-card {
        padding: 2rem 1.25rem;
    }

    /* ── CTA ── */
    .cta-box {
        padding: 2.5rem 1.25rem;
    }

    .cta-box p {
        font-size: 1rem;
    }

    /* ── Badge ── */
    .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* ── Container reduced padding ── */
    .container {
        padding: 0 1rem;
    }
}

/* ── 480px — Small phone ── */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    section {
        padding: 2.5rem 0;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    .hero {
        padding-top: 5rem;
    }

    .hero-container {
        padding: 0;
    }

    .hero-image-wrapper {
        padding: 0;
    }

    .hero-buttons {
        margin-bottom: 2rem;
    }

    .hero-study-cta {
        gap: 0.65rem;
        margin-bottom: 2rem;
    }

    .hero-study-cta__icon {
        width: 2rem;
        height: 2rem;
        flex-basis: 2rem;
    }

    .feature-card {
        padding: 1.5rem 1.25rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        border-radius: 14px;
        margin-bottom: 1rem;
    }

    .step-card h3 {
        font-size: 1rem;
    }

    .step-card p {
        font-size: 0.85rem;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: 1fr;
    }

    footer {
        padding-top: 2.5rem;
    }

    .link-group h4 {
        margin-bottom: 0.75rem;
    }

    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* ── Modals ── */
    .modal-content {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    /* ── Glass card padding ── */
    .glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    /* ── Book card ── */
    .book-card {
        padding: 1.5rem 1rem;
    }

    .book-title {
        font-size: 1.1rem;
    }

    .book-actions {
        flex-direction: column;
    }

    .book-actions .btn {
        width: 100%;
    }
}

/* ── 360px — Very small phone ── */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 0.75rem;
    }

    #navbar {
        padding: 0.6rem 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 2.5rem;
    }
}

/* ── Touch-friendly: ensure minimum tap targets ── */
@media (pointer: coarse) {
    .btn,
    .nav-links a,
    .dropdown-menu a,
    .book-actions .btn,
    .social-links a,
    #themeToggleBtn,
    .mobile-menu-btn {
        min-height: 44px;
    }

    .feature-card:hover,
    .glass-card:hover,
    .book-card:hover {
        transform: none;
    }
}

/* ── Prevent body scroll when mobile menu is open ── */
body.mobile-menu-open {
    overflow: hidden;
}

@media (max-width: 640px), (pointer: coarse) {
    input,
    select,
    textarea,
    button,
    .icon-btn-outline,
    .book-rating-display {
        min-height: 44px;
    }

    #themeToggleBtn,
    #langToggleBtn,
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    .dropdown-menu {
        max-width: calc(100vw - 24px);
    }

    .glass-card {
        border-radius: 18px;
        padding: 1.35rem;
    }

    .hero,
    footer {
        overflow: hidden;
    }

    .glow-orb {
        display: none;
    }

    .earth-map {
        left: 0;
        width: 100%;
        animation: none;
    }
}

/* Auth State Styles */
.nav-actions .guest-actions,
.nav-actions .user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--accent-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name {
    font-weight: 600;
    color: var(--gold-text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-actions .dropdown-toggle {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-actions .dropdown-toggle:hover {
    background: rgba(52, 211, 153, 0.18);
}

/* ── Navbar button emerald overrides ────────────────────────── */

/* "Log In" ghost button inside navbar */
#navbar .btn-ghost {
    color: var(--gold-text);
    font-weight: 600;
}
#navbar .btn-ghost:hover {
    color: var(--gold-dark);
    background: rgba(52, 211, 153, 0.18);
    border-radius: 10px;
}

/* "Start Your Journey" primary CTA inside navbar – emerald version */
#navbar .btn-primary {
    background: var(--gradient-gold);
    color: #fff;
    box-shadow: 0 4px 16px rgba(5, 120, 70, 0.35);
}
#navbar .btn-primary:hover {
    box-shadow: 0 6px 22px rgba(52, 211, 153, 0.55);
    transform: translateY(-2px);
    filter: brightness(1.07);
}

/* Language toggle button – white so flags & text are clearly visible */
#navbar #langToggleBtn {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #047857;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
#navbar #langToggleBtn:hover {
    background: #f0fdf4;
    border-color: var(--gold-dark);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

/* User avatar ring in emerald */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--gradient-gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.55);
}

/* =============================================================================
   GEOCOINS REWARD SYSTEM
============================================================================= */

/* ── Navbar Wallet Badge ── */
.geocoin-wallet {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1));
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #f59e0b;
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.geocoin-wallet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.geocoin-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(245,158,11,0.4));
}

.wallet-coin-orb {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(255, 213, 79, 0.34) 0%, rgba(245, 158, 11, 0.16) 45%, rgba(245, 158, 11, 0) 72%);
    box-shadow:
        0 0 22px rgba(245, 158, 11, 0.36),
        0 0 42px rgba(245, 158, 11, 0.16);
}

.wallet-coin-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 10px rgba(251, 191, 36, 0.5))
        drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35));
}

/* ── Coin Pop / Float Animation ── */
.coin-pop {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f59e0b;
    text-shadow: 0 2px 8px rgba(245,158,11,0.5);
    white-space: nowrap;
    animation: coinFloat 1.8s ease-out forwards;
}

@keyframes coinFloat {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    30%  { opacity: 1; transform: translateY(-30px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-90px) scale(0.8); }
}

/* ── Reward Toast ── */
.reward-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1c1917;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(245,158,11,0.35);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.reward-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Wallet History Rows ── */
.wallet-history-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-glass);
}

.wallet-history-row:last-child {
    border-bottom: none;
}

.wallet-history-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.wallet-history-info {
    flex: 1;
    min-width: 0;
}

.wallet-history-info strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-history-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wallet-history-amount {
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* ── Wallet spinning coin ── */
@keyframes walletCoinSpin {
    0%   { transform: rotateY(0deg)   scale(1); }
    45%  { transform: rotateY(180deg) scale(1.05); }
    55%  { transform: rotateY(180deg) scale(1.05); }
    100% { transform: rotateY(360deg) scale(1); }
}

/* Profile tabs wider for 3 tabs */
.profile-tabs {
    max-width: 560px;
}

/* =====================================================================
   IMAGE CAROUSEL SYSTEM
===================================================================== */

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: var(--bg-surface);
}

.carousel-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.carousel-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.3s, transform 0.2s;
}

.carousel-btn:hover {
    background: rgba(52, 211, 153, 0.8);
    transform: scale(1.1);
}

.carousel-empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

/* Interactive Study Hub demo: responsive layout */
@media (max-width: 768px) {
    .glass-mockup.study-demo {
        height: 390px;
        min-height: 390px;
        border-radius: 16px;
    }

    .study-demo .mockup-header {
        height: 44px;
        flex-basis: 44px;
        padding: 0 0.75rem;
    }

    .study-demo .mockup-body {
        flex-direction: column;
    }

    .study-demo .mockup-sidebar {
        width: 100%;
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        padding: 0.42rem 0.55rem;
        gap: 0.28rem;
        border-right: 0;
        border-bottom: 1px solid var(--demo-border);
    }

    .study-demo .demo-nav-item {
        flex: 1;
        justify-content: center;
        padding: 0.48rem 0.35rem;
        gap: 0.35rem;
        font-size: 0.64rem;
    }

    .study-demo .demo-nav-optional,
    .study-demo .demo-sidebar-cta {
        display: none;
    }

    .study-demo .demo-content {
        flex: 1;
    }

    .study-demo .demo-view {
        padding: 0.82rem;
    }

    .study-demo .demo-view-heading {
        margin-bottom: 0.55rem;
    }

    .study-demo .demo-view-heading h3 {
        font-size: 0.92rem;
    }

    .study-demo .demo-course-card {
        min-height: 86px;
        padding: 0.68rem;
    }

    .study-demo .demo-stat-grid {
        gap: 0.42rem;
        margin-top: 0.5rem;
    }

    .study-demo .demo-stat-card {
        min-height: 59px;
        padding: 0.48rem;
        gap: 0.38rem;
    }

    .study-demo .demo-stat-icon {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .study-demo .demo-module {
        min-height: 60px;
    }

    .study-demo .demo-quiz-options button {
        min-height: 52px;
    }
}

@media (max-width: 480px) {
    .glass-mockup.study-demo {
        height: 372px;
        min-height: 372px;
    }

    .study-demo .demo-window-title span,
    .study-demo .demo-badge {
        display: none;
    }

    .study-demo .demo-window-title i {
        font-size: 1.05rem;
    }

    .study-demo .demo-nav-item {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.35rem 0.25rem;
        font-size: 0.56rem;
    }

    .study-demo .demo-nav-item i {
        font-size: 0.9rem;
    }

    .study-demo .demo-view {
        padding: 0.68rem;
    }

    .study-demo .demo-level {
        padding: 0.25rem 0.4rem;
        font-size: 0.55rem;
    }

    .study-demo .demo-course-icon {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        font-size: 1rem;
    }

    .study-demo .demo-course-card {
        min-height: 80px;
        gap: 0.52rem;
    }

    .study-demo .demo-course-percent,
    .study-demo .demo-course-arrow {
        display: none;
    }

    .study-demo .demo-stat-card {
        flex-direction: column;
        justify-content: center;
        gap: 0.16rem;
        text-align: center;
    }

    .study-demo .demo-stat-card > span:last-child {
        align-items: center;
    }

    .study-demo .demo-stat-icon {
        display: none;
    }

    .study-demo .demo-module {
        grid-template-columns: 30px 1fr auto;
        padding: 0.45rem 0.55rem;
        gap: 0.48rem;
    }

    .study-demo .demo-module-state {
        width: 28px;
        height: 28px;
    }

    .study-demo .demo-quiz-footer {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .study-demo,
    .study-demo *,
    .study-demo *::before,
    .study-demo *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================================
   HOMEPAGE ATLAS EXPERIENCE
   Geographic visual system for the landing page only.
   ===================================================================== */

.atlas-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.atlas-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.38;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.atlas-section::after {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 44% 56% 48% 52%;
    border: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow:
        0 0 0 28px rgba(16, 185, 129, 0.026),
        0 0 0 62px rgba(16, 185, 129, 0.02),
        0 0 0 102px rgba(16, 185, 129, 0.014);
    z-index: -1;
    pointer-events: none;
    transform: rotate(-14deg);
}

.geo-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.44rem 0.76rem;
    margin-bottom: 1.15rem;
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.065);
    color: var(--accent-purple);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.geo-kicker i {
    font-size: 1rem;
}

/* Hero atlas details */
.hero > .hero-container {
    position: relative;
    z-index: 3;
}

.hero-atlas-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(52, 211, 153, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.13) 1px, transparent 1px);
    background-size: 8vw 8vw;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}

.hero-route {
    position: absolute;
    z-index: 1;
    width: 34vw;
    height: 16vw;
    min-width: 320px;
    min-height: 150px;
    border-top: 1px dashed rgba(52, 211, 153, 0.34);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.75;
}

.hero-route::before,
.hero-route::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.9);
}

.hero-route::before {
    left: 10%;
    top: 5%;
}

.hero-route::after {
    right: 8%;
    top: 7%;
}

.hero-route--west {
    left: -9vw;
    top: 31%;
    transform: rotate(16deg);
}

.hero-route--east {
    right: -9vw;
    top: 20%;
    transform: rotate(-17deg);
}

.hero-coordinate {
    position: absolute;
    z-index: 1;
    color: rgba(167, 243, 208, 0.48);
    font-family: monospace;
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    pointer-events: none;
}

.hero-coordinate--one {
    top: 24%;
    left: 4vw;
}

.hero-coordinate--two {
    top: 57%;
    right: 4vw;
    writing-mode: vertical-rl;
}

/* Verified proof strip */
.geo-proof {
    padding: 5rem 0 4.5rem;
    background:
        linear-gradient(180deg, transparent, rgba(16, 185, 129, 0.025) 46%, transparent),
        var(--bg-dark);
}

.geo-proof::after {
    left: -380px;
    top: 18%;
}

.geo-proof__intro {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr);
    align-items: end;
    gap: 2rem;
    margin-bottom: 2.4rem;
}

.geo-proof__intro .geo-kicker {
    width: max-content;
    margin-bottom: 0.25rem;
}

.geo-proof__intro h2 {
    max-width: 690px;
    margin: 0;
    font-size: clamp(1.75rem, 3.1vw, 2.8rem);
}

.geo-proof__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    background: var(--border-glass);
    box-shadow: var(--shadow-glass);
}

.proof-stat {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-content: start;
    min-height: 200px;
    padding: 1.65rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.proof-stat::after {
    content: '';
    position: absolute;
    right: -38px;
    bottom: -48px;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 50%;
    transition: transform 0.4s ease, background 0.4s ease;
}

.proof-stat:hover {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-surface) 82%, var(--accent-blue) 7%);
}

.proof-stat:hover::after {
    transform: scale(1.22);
    background: rgba(16, 185, 129, 0.05);
}

.proof-stat__icon {
    display: grid;
    width: 38px;
    height: 38px;
    margin-right: 0.85rem;
    place-items: center;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-purple);
    font-size: 1.15rem;
}

.proof-stat strong {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
}

.proof-stat > span:not(.proof-stat__icon) {
    grid-column: 1 / -1;
    margin-top: 1.2rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.proof-stat small {
    grid-column: 1 / -1;
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Product bento */
.features.atlas-section {
    padding: 6.5rem 0 7.5rem;
}

.features.atlas-section::after {
    right: -360px;
    top: 28%;
}

.features.atlas-section .section-header {
    max-width: 720px;
}

.feature-bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(170px, auto);
    gap: 1.25rem;
}

.bento-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 230px;
    padding: 1.65rem;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(16, 185, 129, 0.035), transparent 42%),
        var(--bg-glass);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.08);
    backdrop-filter: blur(18px);
    color: var(--text-primary);
    isolation: isolate;
    transition: transform 0.38s cubic-bezier(.2,.8,.2,1), border-color 0.38s ease, box-shadow 0.38s ease;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: auto -36% -64% auto;
    z-index: -1;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(52, 211, 153, 0.13);
    border-radius: 48% 52% 44% 56%;
    box-shadow: 0 0 0 24px rgba(52, 211, 153, 0.025), 0 0 0 52px rgba(52, 211, 153, 0.018);
    transform: rotate(24deg);
    transition: transform 0.55s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.32);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.16), 0 0 35px rgba(16, 185, 129, 0.06);
    color: var(--text-primary);
}

.bento-card:hover::before {
    transform: rotate(30deg) scale(1.08);
}

.bento-card--geobek { grid-column: span 5; grid-row: span 2; min-height: 520px; }
.bento-card--academy { grid-column: span 7; min-height: 255px; }
.bento-card--analytics { grid-column: span 4; min-height: 245px; }
.bento-card--plan { grid-column: span 3; min-height: 245px; }
.bento-card--worldmap { grid-column: span 7; min-height: 260px; }
.bento-card--geoguess { grid-column: span 5; min-height: 260px; }
.bento-card--mentors { grid-column: span 7; min-height: 250px; }
.bento-card--telegram { grid-column: span 5; min-height: 250px; }

.bento-card--geobek {
    background:
        radial-gradient(circle at 84% 70%, rgba(52, 211, 153, 0.18), transparent 34%),
        linear-gradient(150deg, rgba(4, 120, 87, 0.17), rgba(15, 23, 42, 0.03) 55%),
        var(--bg-glass);
}

.bento-card--academy {
    background:
        radial-gradient(circle at 82% 35%, rgba(16, 185, 129, 0.13), transparent 32%),
        var(--bg-glass);
}

.bento-card--telegram {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.08)),
        var(--bg-glass);
}

.bento-topline {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bento-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-purple);
    font-size: 1.35rem;
}

.bento-chip {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 0.35rem 0.62rem;
    border: 1px solid rgba(16, 185, 129, 0.17);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.065);
    color: var(--accent-blue);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.bento-copy {
    position: relative;
    z-index: 2;
    margin-top: 1.35rem;
}

.bento-copy h3 {
    margin-bottom: 0.65rem;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.bento-copy p {
    max-width: 520px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.65;
}

.bento-link {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: max-content;
    margin-top: auto;
    color: var(--accent-purple);
    font-size: 0.82rem;
    font-weight: 800;
}

.bento-link i {
    transition: transform 0.25s ease;
}

.bento-card:hover .bento-link i {
    transform: translate(3px, -3px);
}

.geobek-scene {
    position: relative;
    min-height: 240px;
    margin: 0.8rem -0.4rem 0;
    flex: 1;
}

.geobek-scene::before {
    content: '';
    position: absolute;
    inset: 24% 7% 3%;
    border: 1px dashed rgba(52, 211, 153, 0.18);
    border-radius: 50%;
    transform: rotate(-9deg);
}

.geobek-scene img {
    position: absolute;
    right: 3%;
    bottom: -4%;
    width: min(68%, 260px);
    max-height: 235px;
    object-fit: contain;
    filter: drop-shadow(0 24px 28px rgba(2, 6, 23, 0.32));
    transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}

.bento-card--geobek:hover .geobek-scene img {
    transform: translateY(-5px) rotate(1.5deg);
}

.geobek-bubble {
    position: absolute;
    z-index: 2;
    max-width: 170px;
    padding: 0.65rem 0.78rem;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
    box-shadow: var(--shadow-glass);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    backdrop-filter: blur(12px);
}

.geobek-bubble--question {
    top: 16%;
    left: 0;
    border-radius: 14px 14px 4px 14px;
}

.geobek-bubble--answer {
    right: 0;
    bottom: 7%;
    border-color: rgba(52, 211, 153, 0.22);
    border-radius: 14px 14px 14px 4px;
    background: color-mix(in srgb, var(--bg-surface) 84%, var(--accent-blue) 7%);
    color: var(--accent-blue);
}

.academy-preview {
    position: absolute;
    right: 1.4rem;
    bottom: 1.35rem;
    width: 47%;
    min-width: 290px;
    height: 105px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 18px;
    background: rgba(16, 185, 129, 0.045);
}

.bento-card--academy .bento-copy {
    max-width: 47%;
}

.academy-contour {
    position: absolute;
    width: 190px;
    height: 95px;
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 48% 52% 42% 58%;
}

.academy-contour--one { top: -44px; right: -30px; transform: rotate(8deg); }
.academy-contour--two { right: 10px; bottom: -62px; transform: rotate(-18deg); }

.academy-route {
    position: absolute;
    top: 18px;
    left: 18px;
    display: flex;
    align-items: center;
}

.academy-stop {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.72rem;
}

.academy-stop.is-complete { color: #10b981; }
.academy-stop.is-current { color: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.08); }

.academy-route__line {
    width: 30px;
    border-top: 1px dashed rgba(16, 185, 129, 0.3);
}

.academy-label {
    position: absolute;
    left: 18px;
    bottom: 15px;
    display: grid;
}

.academy-label small {
    color: var(--text-muted);
    font-size: 0.58rem;
    text-transform: uppercase;
}

.academy-label strong {
    max-width: 200px;
    color: var(--text-primary);
    font-size: 0.72rem;
}

.academy-progress {
    position: absolute;
    right: 15px;
    bottom: 15px;
    color: var(--accent-purple);
    font-size: 0.75rem;
    font-weight: 800;
}

.analytics-preview {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.2rem;
}

.analytics-score {
    display: grid;
}

.analytics-score strong {
    color: var(--accent-purple);
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1;
}

.analytics-score span {
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.analytics-bars {
    display: flex;
    align-items: end;
    height: 55px;
    flex: 1;
    gap: 6px;
}

.analytics-bars span {
    width: 100%;
    height: var(--bar);
    min-height: 8px;
    border-radius: 4px 4px 1px 1px;
    background: linear-gradient(to top, #059669, #34d399);
    opacity: 0.78;
    transform-origin: bottom;
    animation: atlasBarGrow 1.2s cubic-bezier(.2,.8,.2,1) both;
}

.analytics-bars span:nth-child(2) { animation-delay: .08s; }
.analytics-bars span:nth-child(3) { animation-delay: .16s; }
.analytics-bars span:nth-child(4) { animation-delay: .24s; }
.analytics-bars span:nth-child(5) { animation-delay: .32s; }

@keyframes atlasBarGrow { from { transform: scaleY(.08); } to { transform: scaleY(1); } }

.plan-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.plan-day {
    display: grid;
    height: 31px;
    place-items: center;
    border: 1px solid var(--border-glass);
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.04);
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
}

.plan-day.is-done {
    border-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.plan-day.is-current {
    border-color: #10b981;
    background: #10b981;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
    color: #fff;
}

.bento-card--mentors {
    display: grid;
    grid-template-columns: minmax(180px, 0.75fr) 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.bento-card--mentors .bento-copy {
    margin-top: 0;
}

.mentor-avatars {
    display: flex;
    align-items: center;
    padding-left: 0.65rem;
}

.mentor-avatars > span {
    display: grid;
    width: 64px;
    height: 64px;
    margin-left: -0.65rem;
    place-items: center;
    border: 3px solid var(--bg-surface);
    border-radius: 50%;
    background: linear-gradient(145deg, #064e3b, #10b981);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
}

.mentor-avatars > span:nth-child(2) { background: linear-gradient(145deg, #0f766e, #22d3ee); }
.mentor-avatars > span:nth-child(3) { background: linear-gradient(145deg, #92400e, #fbbf24); }
.mentor-avatars .mentor-medal { background: var(--bg-surface); color: #f59e0b; font-size: 1.25rem; }

.bento-card--mentors .bento-link {
    align-self: end;
    margin-bottom: 0.35rem;
    white-space: nowrap;
}

.telegram-orbit {
    position: absolute;
    top: 1.55rem;
    right: 1.55rem;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 1px dashed rgba(14, 165, 233, 0.35);
    border-radius: 50%;
    color: #0ea5e9;
    font-size: 2rem;
}

.telegram-orbit::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.08);
}

.telegram-orbit i { position: relative; z-index: 1; }

.bento-card--telegram .bento-copy {
    max-width: calc(100% - 86px);
    margin-top: 0;
}

.telegram-message {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: max-content;
    max-width: 100%;
    margin-top: auto;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 12px 12px 12px 3px;
    background: rgba(14, 165, 233, 0.07);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.telegram-message i { color: #10b981; }

.bento-card--worldmap {
    background:
        radial-gradient(circle at 85% 22%, rgba(34, 211, 238, 0.12), transparent 36%),
        var(--bg-glass);
}

.worldmap-preview {
    position: relative;
    z-index: 2;
    height: 92px;
    margin-top: 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px),
        rgba(8, 47, 73, 0.12);
    background-size: 100% 23px, 23px 100%, auto;
}

.worldmap-land {
    position: absolute;
    border-radius: 46% 54% 52% 48%;
    background: rgba(52, 211, 153, 0.28);
}

.worldmap-land--one { top: 12px; left: 8%; width: 74px; height: 40px; }
.worldmap-land--two { top: 34px; left: 38%; width: 96px; height: 46px; background: rgba(34, 211, 238, 0.26); transform: rotate(-8deg); }
.worldmap-land--three { top: 10px; right: 10%; width: 64px; height: 38px; background: rgba(251, 191, 36, 0.24); transform: rotate(10deg); }

.worldmap-pin {
    position: absolute;
    top: 20px;
    right: 24%;
    color: #f43f5e;
    font-size: 1.3rem;
    line-height: 1;
}

.worldmap-pin::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(244, 63, 94, 0.45);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: worldmapPing 2.4s ease-out infinite;
}

@keyframes worldmapPing {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.5); }
    70%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

.worldmap-coord {
    position: absolute;
    right: 10px;
    bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.bento-card--worldmap .bento-link {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

.bento-card--geoguess {
    background:
        radial-gradient(circle at 15% 82%, rgba(251, 191, 36, 0.1), transparent 40%),
        var(--bg-glass);
}

.geoguess-preview {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.1rem;
}

.geoguess-photo {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px;
    height: 72px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.22), rgba(16, 185, 129, 0.18));
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
    color: var(--text-secondary);
    font-size: 1.6rem;
    transform: rotate(-4deg);
}

.geoguess-question {
    position: absolute;
    top: -10px;
    right: -10px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
    color: #451a03;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
}

.geoguess-coins {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 800;
}

.bento-card--geoguess .bento-link {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

/* Expedition route */
.how-it-works.atlas-section {
    padding: 7.5rem 0 8.5rem;
    background:
        radial-gradient(circle at 50% 52%, rgba(16, 185, 129, 0.055), transparent 32%),
        var(--bg-dark);
}

.how-it-works.atlas-section::after {
    left: 50%;
    top: 47%;
    transform: translateX(-50%) rotate(8deg);
}

.expedition-route {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 530px;
    align-items: start;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: 2.5rem 0 1rem;
}

.expedition-route__track {
    position: absolute;
    top: 108px;
    left: 11%;
    right: 11%;
    height: 150px;
    border-top: 2px dashed rgba(52, 211, 153, 0.34);
    border-radius: 50%;
    transform: rotate(-1deg);
}

.expedition-route__track::before,
.expedition-route__track::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.8);
}

.expedition-route__track::before { left: 16%; }
.expedition-route__track::after { right: 16%; }

.route-plane {
    position: absolute;
    top: -14px;
    left: 50%;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-surface);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08), var(--shadow-glass);
    color: var(--accent-purple);
    transform: translateX(-50%) rotate(28deg);
}

.expedition-stop {
    position: relative;
    z-index: 2;
}

.expedition-stop--two { margin-top: 104px; }
.expedition-stop--three { margin-top: 12px; }

.expedition-waypoint {
    position: relative;
    display: grid;
    width: 78px;
    height: 78px;
    margin: 0 auto 1.4rem;
    place-items: center;
    border: 1px solid rgba(52, 211, 153, 0.34);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.04), 0 18px 32px rgba(2, 6, 23, 0.12);
    color: var(--accent-purple);
}

.expedition-waypoint::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(52, 211, 153, 0.22);
    border-radius: 50%;
}

.expedition-waypoint span {
    position: absolute;
    top: -10px;
    right: -6px;
    z-index: 2;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    background: var(--accent-blue);
    color: #fff;
    font-family: monospace;
    font-size: 0.6rem;
    font-weight: 800;
}

.expedition-waypoint i {
    position: relative;
    z-index: 1;
    font-size: 1.65rem;
}

.expedition-card {
    padding: 1.45rem;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    background: color-mix(in srgb, var(--bg-glass) 90%, transparent);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(16px);
    text-align: left;
}

.expedition-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--accent-purple);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.expedition-meta small {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.56rem;
}

.expedition-card h3 {
    font-size: 1.15rem;
}

.expedition-card p {
    margin: 0;
    font-size: 0.86rem;
}

.route-compass {
    position: absolute;
    right: -22px;
    bottom: 16px;
    width: 112px;
    height: 112px;
    opacity: 0.38;
}

.route-compass__ring {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.025), inset 0 0 0 8px rgba(16, 185, 129, 0.025);
}

.route-compass__needle {
    position: absolute;
    top: 26px;
    left: 51px;
    width: 10px;
    height: 62px;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: linear-gradient(to bottom, #34d399 50%, var(--text-muted) 50%);
    transform: rotate(26deg);
}

.route-compass__north {
    position: absolute;
    top: -2px;
    left: 50%;
    color: var(--accent-purple);
    font-family: monospace;
    font-size: 0.65rem;
    transform: translateX(-50%);
}

/* Connected Earth systems */
.about.atlas-section {
    padding: 7rem 0 8rem;
}

.about.atlas-section::after {
    right: -390px;
    top: 20%;
}

.about-container {
    grid-template-columns: minmax(420px, 1fr) minmax(0, 0.92fr);
    max-width: 1200px;
    gap: clamp(3rem, 7vw, 7rem);
}

.about-content h2 {
    font-size: clamp(2rem, 3.4vw, 3.25rem);
}

.earth-system-visual {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 1;
    margin: 0 auto;
}

.earth-system-visual::before {
    content: '';
    position: absolute;
    inset: 8%;
    border: 1px solid rgba(16, 185, 129, 0.07);
    border-radius: 50%;
    background:
        linear-gradient(rgba(16, 185, 129, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.045) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle, #000, transparent 71%);
}

.earth-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(52, 211, 153, 0.22);
    border-radius: 50%;
    pointer-events: none;
}

.earth-orbit--outer {
    width: 82%;
    height: 82%;
    transform: translate(-50%, -50%) rotate(-10deg) scaleY(.72);
}

.earth-orbit--inner {
    width: 63%;
    height: 63%;
    transform: translate(-50%, -50%) rotate(56deg) scaleY(.78);
}

.earth-system-globe {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 46%;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(167, 243, 208, 0.32);
    border-radius: 50%;
    background:
        linear-gradient(rgba(167, 243, 208, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 243, 208, 0.11) 1px, transparent 1px),
        url('../images/world-map.svg') center / 165% auto no-repeat,
        radial-gradient(circle at 34% 28%, #10b981, #064e3b 68%, #022c22);
    background-size: 28px 28px, 28px 28px, 165% auto, auto;
    box-shadow: inset -28px -22px 44px rgba(2, 6, 23, 0.45), 0 28px 70px rgba(4, 120, 87, 0.26), 0 0 0 14px rgba(16, 185, 129, 0.035);
    color: #fff;
    transform: translate(-50%, -50%);
}

.earth-system-globe::before,
.earth-system-globe::after {
    content: '';
    position: absolute;
    left: 5%;
    right: 5%;
    height: 28%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 0;
    border-left: 0;
    border-radius: 50%;
}

.earth-system-globe::before { top: 22%; }
.earth-system-globe::after { bottom: 22%; }

.earth-system-globe__shine {
    position: absolute;
    top: 8%;
    left: 17%;
    width: 32%;
    height: 18%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    filter: blur(12px);
    transform: rotate(-24deg);
}

.earth-system-globe__axis {
    position: absolute;
    top: -12%;
    bottom: -12%;
    left: 50%;
    width: 1px;
    background: rgba(167, 243, 208, 0.3);
    transform: rotate(18deg);
}

.earth-system-globe__label {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.94);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 2px 14px rgba(2, 6, 23, 0.65);
}

.earth-system-globe__label small {
    color: #a7f3d0;
    font-size: 0.43rem;
    letter-spacing: 0.22em;
}

.system-node {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 145px;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-surface) 86%, transparent);
    box-shadow: 0 15px 38px rgba(2, 6, 23, 0.12);
    backdrop-filter: blur(14px);
    color: var(--text-primary);
}

.system-node i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.09);
    color: var(--accent-purple);
    font-size: 1.05rem;
}

.system-node span { display: grid; }
.system-node small { color: var(--text-muted); font-family: monospace; font-size: 0.54rem; }
.system-node strong { font-size: 0.78rem; }

.system-node--climate { top: 7%; left: 4%; }
.system-node--landforms { top: 14%; right: 0; }
.system-node--population { bottom: 10%; left: 0; }
.system-node--resources { right: 3%; bottom: 4%; }

.system-node::after {
    content: '';
    position: absolute;
    width: 42px;
    border-top: 1px dashed rgba(52, 211, 153, 0.25);
}

.system-node--climate::after,
.system-node--population::after { right: -42px; }
.system-node--landforms::after,
.system-node--resources::after { left: -42px; }

.earth-coordinate {
    position: absolute;
    left: 50%;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    transform: translateX(-50%);
}

.earth-coordinate--top { top: 1%; }
.earth-coordinate--bottom { bottom: 0; }

/* Atlas CTA */
.cta-box {
    min-height: 410px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(circle at 50% 110%, rgba(52, 211, 153, 0.2), transparent 45%),
        linear-gradient(145deg, rgba(16, 185, 129, 0.06), transparent),
        var(--bg-glass);
}

.cta-box > h2,
.cta-box > p,
.cta-box > .cta-buttons {
    position: relative;
    z-index: 2;
}

.cta-coordinates {
    position: absolute;
    top: 1.4rem;
    right: 1.7rem;
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
}

.cta-contours {
    position: absolute;
    left: -140px;
    bottom: -190px;
    width: 500px;
    height: 420px;
    border: 1px solid rgba(52, 211, 153, 0.16);
    border-radius: 44% 56% 52% 48%;
    box-shadow: 0 0 0 26px rgba(52, 211, 153, 0.035), 0 0 0 58px rgba(52, 211, 153, 0.025), 0 0 0 94px rgba(52, 211, 153, 0.018);
    transform: rotate(18deg);
}

/* Scroll reveals are enabled only after JS starts, so content stays visible without JS. */
.atlas-motion-ready [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
}

.atlas-motion-ready [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.geo-proof__grid [data-reveal]:nth-child(2),
.feature-bento [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.geo-proof__grid [data-reveal]:nth-child(3),
.feature-bento [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.geo-proof__grid [data-reveal]:nth-child(4),
.feature-bento [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.feature-bento [data-reveal]:nth-child(5) { transition-delay: 0.10s; }
.feature-bento [data-reveal]:nth-child(6) { transition-delay: 0.18s; }
.feature-bento [data-reveal]:nth-child(7) { transition-delay: 0.10s; }
.feature-bento [data-reveal]:nth-child(8) { transition-delay: 0.18s; }

@media (max-width: 1100px) {
    .bento-card--geobek { grid-column: span 6; }
    .bento-card--academy { grid-column: span 6; }
    .bento-card--analytics { grid-column: span 6; }
    .bento-card--plan { grid-column: span 6; }
    .bento-card--worldmap { grid-column: span 6; }
    .bento-card--geoguess { grid-column: span 6; }
    .bento-card--mentors { grid-column: span 7; }
    .bento-card--telegram { grid-column: span 5; }

    .bento-card--academy .bento-copy { max-width: 100%; }
    .academy-preview {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        min-width: 0;
        margin-top: auto;
    }

    .bento-card--mentors {
        grid-template-columns: auto 1fr;
    }

    .bento-card--mentors .bento-link {
        grid-column: 2;
        margin-top: 0;
    }

    .about-container {
        grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 900px) {
    .hero-route,
    .hero-coordinate {
        opacity: 0.34;
    }

    .geo-proof__intro {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .geo-proof__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .proof-stat { min-height: 180px; }

    .bento-card--geobek,
    .bento-card--academy,
    .bento-card--analytics,
    .bento-card--plan,
    .bento-card--worldmap,
    .bento-card--geoguess,
    .bento-card--mentors,
    .bento-card--telegram {
        grid-column: span 6;
    }

    .bento-card--mentors {
        display: flex;
        align-items: flex-start;
    }

    .bento-card--mentors .bento-link { margin-top: auto; }

    .mentor-avatars > span {
        width: 52px;
        height: 52px;
    }

    .expedition-route {
        grid-template-columns: 1fr;
        min-height: 0;
        max-width: 650px;
        margin: 0 auto;
        gap: 1.2rem;
        padding-left: 96px;
    }

    .expedition-route__track {
        top: 74px;
        bottom: 74px;
        left: 36px;
        right: auto;
        width: 1px;
        height: auto;
        border-top: 0;
        border-left: 2px dashed rgba(52, 211, 153, 0.32);
        border-radius: 0;
        transform: none;
    }

    .expedition-route__track::before,
    .expedition-route__track::after { left: -4px; top: auto; }
    .expedition-route__track::before { top: 20%; }
    .expedition-route__track::after { bottom: 20%; }

    .route-plane {
        top: 50%;
        left: -15px;
        transform: translateY(-50%) rotate(118deg);
    }

    .expedition-stop,
    .expedition-stop--two,
    .expedition-stop--three {
        margin-top: 0;
    }

    .expedition-waypoint {
        position: absolute;
        top: 50%;
        left: -96px;
        width: 70px;
        height: 70px;
        margin: 0;
        transform: translateY(-50%);
    }

    .route-compass { display: none; }

    .about-container {
        grid-template-columns: 1fr;
        max-width: 780px;
    }

    .earth-system-visual {
        order: 2;
        width: min(92vw, 540px);
    }

    .about-content { order: 1; }
}

@media (max-width: 640px) {
    .atlas-section::before { background-size: 48px 48px; }

    .hero-atlas-grid { background-size: 64px 64px; }
    .hero-route--west { left: -220px; top: 35%; }
    .hero-route--east { right: -230px; top: 19%; }
    .geo-proof,
    .features.atlas-section,
    .how-it-works.atlas-section,
    .about.atlas-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .geo-proof__grid {
        grid-template-columns: 1fr 1fr;
        border-radius: 20px;
    }

    .proof-stat {
        min-height: 160px;
        padding: 1.15rem;
    }

    .proof-stat__icon {
        width: 33px;
        height: 33px;
        margin-right: 0.55rem;
    }

    .proof-stat strong { font-size: 1.8rem; }
    .proof-stat > span:not(.proof-stat__icon) { margin-top: 0.8rem; font-size: 0.76rem; }
    .proof-stat small { font-size: 0.52rem; }

    .feature-bento {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bento-card--geobek,
    .bento-card--academy,
    .bento-card--analytics,
    .bento-card--plan,
    .bento-card--worldmap,
    .bento-card--geoguess,
    .bento-card--mentors,
    .bento-card--telegram {
        grid-column: 1;
        grid-row: auto;
        min-height: 0;
    }

    .bento-card {
        padding: 1.3rem;
        border-radius: 20px;
    }

    .bento-card--geobek { min-height: 455px; }
    .bento-card--academy { min-height: 370px; }
    .bento-card--analytics,
    .bento-card--plan,
    .bento-card--worldmap,
    .bento-card--geoguess,
    .bento-card--mentors,
    .bento-card--telegram { min-height: 250px; }

    .geobek-scene img { width: min(70%, 230px); }
    .bento-card--mentors { display: flex; }

    .mentor-avatars > span {
        width: 46px;
        height: 46px;
        font-size: 0.62rem;
    }

    .bento-card--telegram .bento-copy { max-width: calc(100% - 68px); }
    .telegram-orbit { width: 60px; height: 60px; font-size: 1.55rem; }

    .expedition-route {
        padding-left: 72px;
    }

    .expedition-route__track { left: 28px; }

    .expedition-waypoint {
        left: -72px;
        width: 56px;
        height: 56px;
    }

    .expedition-waypoint i { font-size: 1.25rem; }

    .expedition-card { padding: 1.15rem; }

    .expedition-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-node {
        min-width: 126px;
        padding: 0.6rem 0.68rem;
    }

    .system-node i { width: 30px; height: 30px; }
    .system-node--climate { top: 2%; left: 0; }
    .system-node--landforms { top: 9%; right: 0; }
    .system-node--population { bottom: 8%; left: 0; }
    .system-node--resources { right: 0; bottom: 0; }

    .cta-box {
        min-height: 360px;
        padding: 4.25rem 1.2rem;
    }

    .cta-coordinates { right: 1.15rem; }
}

@media (max-width: 420px) {
    .geo-proof__grid { grid-template-columns: 1fr; }
    .proof-stat { min-height: 140px; }
    .bento-card--telegram .bento-copy { max-width: 100%; padding-right: 58px; }

    .earth-system-visual {
        width: 112%;
        margin-left: -6%;
    }

    .earth-system-globe { width: 43%; }
    .system-node { min-width: 112px; gap: 0.42rem; }
    .system-node strong { font-size: 0.68rem; }
    .system-node i { width: 27px; height: 27px; }

    /* The visual bleeds 6% past each edge; keep the corner nodes on-screen */
    .system-node--climate { left: 3%; }
    .system-node--landforms { right: 3%; }
    .system-node--population { left: 3%; }
    .system-node--resources { right: 3%; }
}

@media (prefers-reduced-motion: reduce) {
    .analytics-bars span,
    .atlas-section *,
    .atlas-section *::before,
    .atlas-section *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .atlas-motion-ready [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* ══════════════════ Navbar decongestion ══════════════════ */
.nav-container {
    gap: 1.25rem;
}

.nav-links a {
    white-space: nowrap;
}

/* Tighter link spacing on laptop widths so nothing wraps or crowds */
@media (min-width: 1025px) and (max-width: 1440px) {
    .nav-links {
        gap: 1.6rem;
    }

    .nav-links a {
        font-size: 0.92rem;
    }
}

/* ══════════════════ Donate nav pill ══════════════════ */
.nav-links a.nav-donate {
    gap: 0.45rem;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    background: rgba(253, 164, 175, 0.16);
    border: 1px solid rgba(253, 164, 175, 0.38);
    color: #fff;
    white-space: nowrap;
}

.nav-links a.nav-donate::after {
    display: none;
}

.nav-links a.nav-donate i {
    color: #FDA4AF;
    font-size: 1.05rem;
    transition: transform var(--transition-fast);
}

.nav-links a.nav-donate:hover,
.nav-links a.nav-donate.active {
    background: rgba(253, 164, 175, 0.28);
    border-color: rgba(253, 164, 175, 0.6);
    color: #fff;
    text-shadow: none;
    box-shadow: 0 0 16px rgba(253, 164, 175, 0.35);
}

.nav-links a.nav-donate:hover i {
    transform: scale(1.18);
}

@media (max-width: 1024px) {
    .nav-links a.nav-donate {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
        min-height: 48px;
        border-radius: 10px;
        background: rgba(253, 164, 175, 0.14);
        border: 1px solid rgba(253, 164, 175, 0.25);
    }

    .nav-links a.nav-donate:hover,
    .nav-links a.nav-donate.active {
        background: rgba(253, 164, 175, 0.22);
        box-shadow: none;
    }
}
