/* ==========================================================================
   RippleUp CSS Design System - Core Tokens & Styles
   ========================================================================== */

:root {
    --bg-dark: #0a0f1d;
    --bg-card: rgba(16, 22, 42, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(16, 185, 129, 0.2);
    
    --primary: #10b981;       /* Emerald */
    --primary-glow: #059669;
    --accent: #34d399;        /* Mint */
    --warning: #f59e0b;       /* Yellow */
    --danger: #ef4444;        /* Red */
    --info: #3b82f6;          /* Blue */
    --purple: #8b5cf6;
    
    --text-main: #f3f4f6;     /* Light Grey */
    --text-muted: #9ca3af;    /* Muted Grey */
    --text-dark: #111827;     /* Dark Grey for light badges */
    
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Elements & Reset
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

/* ==========================================================================
   Background 3D Canvas
   ========================================================================== */

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}
#canvas-container canvas {
    display: block;
}

#three-orbit-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   Reusable UI Components (Glassmorphism, CTA buttons, Text effects)
   ========================================================================== */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.05);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, #6ee7b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.highlight {
    color: var(--primary);
}

/* Button Styles */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-outfit);
    font-weight: 600;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(52, 211, 153, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-glass {
    background: var(--bg-glass);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
}

.btn-glass:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-solid {
    background: var(--primary);
    color: #fff;
}

.btn-solid:hover {
    background: var(--accent);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.4);
}

.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 80%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.glow-effect:hover::after {
    opacity: 1;
}

/* Badge Pill */
.badge-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pill-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.pill-text {
    font-size: 0.85rem;
    font-family: var(--font-outfit);
    color: var(--accent);
    font-weight: 500;
}

/* ==========================================================================
   Header Navigation Styling
   ========================================================================== */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 15, 29, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.3rem;
    color: var(--primary);
}

#nav-menu ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-outfit);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

#mobile-menu-toggle {
    display: none;
    font-size: 1.25rem;
    color: var(--text-main);
}

/* ==========================================================================
   Mobile Menu Drawer
   ========================================================================== */

.drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #0f1424;
    border-left: 1px solid var(--border-glass);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

#drawer-close {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drawer-link {
    font-family: var(--font-outfit);
    font-size: 1.25rem;
    color: var(--text-muted);
}

.drawer-link:hover {
    color: var(--primary);
}

.drawer-footer {
    margin-top: auto;
    text-align: center;
}

.drawer-footer .cta-button {
    width: 100%;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ==========================================================================
   Hero Section Styling
   ========================================================================== */

.hero-section {
    padding: 10rem 2rem 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-outfit);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    background: var(--border-glass);
    height: 40px;
    align-self: center;
}

/* 3D Visual orbit display in hero */
.three-display-card {
    height: 380px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

#three-orbit-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#three-orbit-canvas:active {
    cursor: grabbing;
}

.three-label {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    z-index: 2;
}

.three-instructions {
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 2;
}

/* ==========================================================================
   About Section & Grid
   ========================================================================== */

.about-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.35rem;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Storyboard Section (Interactive Slider)
   ========================================================================== */

.storyboard-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.storyboard-container {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.story-slider {
    position: relative;
    min-height: 380px;
}

.story-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-slide.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.story-image-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
}

.eco-illustration {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1.5rem;
}

.main-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.3));
}

.main-icon.text-blue { color: var(--info); }
.main-icon.text-red { color: var(--danger); }
.main-icon.text-green { color: var(--primary); }

.cloud-bubble {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 250px;
    text-align: center;
    position: absolute;
    bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cloud-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent rgba(255, 255, 255, 0.95) transparent;
}

/* Eco Illustration Shapes */
.refill-station-mock {
    width: 80px;
    height: 130px;
    border: 3px solid var(--info);
    border-radius: 8px;
    position: relative;
}

.refill-station-mock::before {
    content: 'REFILL';
    font-size: 0.6rem;
    color: var(--info);
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
}

.phone-frame-mock {
    width: 80px;
    height: 140px;
    border: 3px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
    padding: 5px;
}

.phone-screen-content {
    width: 100%;
    height: 100%;
    background: #0f172a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.check-glow {
    font-size: 1.5rem;
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

.points-badge {
    font-size: 0.6rem;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.streak-txt {
    font-size: 0.5rem;
    color: var(--accent);
}

.streak-cal-mock {
    text-align: center;
}

.fire-icon-large {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 0.5rem;
}

.fire-glow {
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.5));
}

.streak-num {
    font-family: var(--font-outfit);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--warning);
}

.dashboard-stats-mock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.stat-row {
    font-size: 0.9rem;
    font-weight: 500;
}

.poster-board {
    width: 120px;
    height: 150px;
    background: #1e293b;
    border: 2px solid var(--primary);
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.poster-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 5px;
}

.poster-logo {
    font-size: 1.5rem;
    color: var(--primary);
}

.poster-content h4 {
    font-size: 0.8rem;
    color: #fff;
}

.poster-content p {
    font-size: 0.55rem;
    color: var(--text-muted);
}

/* Slide Content */
.slide-num {
    font-family: var(--font-outfit);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.slide-heading {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.slide-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Story Controls */
.story-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.control-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.story-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 9999px;
}

/* ==========================================================================
   App Simulator Section
   ========================================================================== */

.simulator-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.simulator-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.simulator-controls {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-help {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.action-buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    text-align: left;
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(5px);
}

.action-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.action-btn-text {
    display: flex;
    flex-direction: column;
}

.action-name {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
}

.action-points {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.action-qr-trigger {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-qr-trigger .cta-button {
    width: 100%;
}

/* Phone Mockup Frame */
.phone-mockup {
    position: relative;
    width: 320px;
    height: 640px;
    background: #000;
    border-radius: 36px;
    border: 10px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-speaker {
    width: 80px;
    height: 6px;
    background: #334155;
    border-radius: 9999px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-home-button {
    width: 60px;
    height: 4px;
    background: #334155;
    border-radius: 9999px;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #090d16;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.75rem 0.75rem 0.75rem;
    position: relative;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.phone-status-icons {
    display: flex;
    gap: 5px;
}

/* Phone App Navigation & Headers */
.phone-app-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.25rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--primary);
}

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

.user-greeting {
    display: flex;
    flex-direction: column;
}

.hello-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1;
}

.user-name {
    font-family: var(--font-outfit);
    font-size: 0.85rem;
    font-weight: 700;
}

.app-notifications {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
}

.noti-badge {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 0;
    right: 0;
}

/* Phone App Views */
.phone-app-content {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 3.5rem;
    scrollbar-width: none; /* Hide Scrollbar */
}

.phone-app-content::-webkit-scrollbar {
    display: none;
}

.phone-app-content.active {
    display: flex;
}

/* Points Card Inside App */
.phone-points-card {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border-radius: 14px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.points-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.points-val {
    font-family: var(--font-outfit);
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.25rem 0;
}

.co2-pill {
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* App Grid & Row Items */
.phone-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-card i {
    font-size: 1.25rem;
}

.mini-card-text {
    display: flex;
    flex-direction: column;
}

.card-num {
    font-family: var(--font-outfit);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.card-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.phone-section-title {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-outfit);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0 0.1rem;
}

.phone-section-title a {
    color: var(--primary);
    font-size: 0.75rem;
}

.phone-badges-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.phone-badge-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.badge-icon.bronze {
    background: rgba(180, 83, 9, 0.1);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.3);
}

.badge-icon.silver {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-icon.gold {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.phone-badge-item.unlocked .badge-icon.bronze {
    background: rgba(180, 83, 9, 0.2);
    box-shadow: 0 0 10px rgba(180, 83, 9, 0.3);
}

.phone-badge-item.unlocked .badge-icon.silver {
    background: rgba(226, 232, 240, 0.2);
    color: #e2e8f0;
    box-shadow: 0 0 10px rgba(226, 232, 240, 0.3);
}

.phone-badge-item.unlocked .badge-icon.gold {
    background: rgba(234, 179, 8, 0.2);
    color: #ea580c;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

.phone-badge-item.locked {
    opacity: 0.5;
}

.badge-lbl {
    font-size: 0.65rem;
    font-weight: 500;
}

.phone-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-row {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.act-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.bg-blue { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.bg-red { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.bg-green { background: rgba(16, 185, 129, 0.1); color: var(--primary); }

.act-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.act-title {
    font-size: 0.75rem;
    font-weight: 600;
}

.act-time {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.act-points {
    font-family: var(--font-outfit);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

/* Phone App Overlays */
.phone-app-overlay {
    position: absolute;
    top: 1.25rem;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 3.5rem;
    background: rgba(9, 13, 22, 0.95);
    z-index: 5;
    border-radius: 14px 14px 0 0;
    display: none;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--border-glass);
}

.phone-app-overlay.active {
    display: flex;
}

.scanner-view-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.scanner-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-outfit);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.scanner-header button {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.scanner-target-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scan-frame {
    width: 140px;
    height: 140px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.scan-frame .corner {
    position: absolute;
    width: 15px;
    height: 15px;
    border-color: var(--primary);
    border-style: solid;
}

.scan-frame .top-left { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.scan-frame .top-right { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.scan-frame .bottom-left { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.scan-frame .bottom-right { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

.scan-laser {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    top: 0;
    animation: scan 2s infinite ease-in-out;
}

.scan-help-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.scanner-presets {
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}

.presets-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    text-align: left;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    transition: var(--transition);
}

.preset-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Success Overlay in Phone */
.success-overlay {
    z-index: 6;
    justify-content: center;
    align-items: center;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.success-icon-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.success-heading {
    font-family: var(--font-outfit);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 180px;
}

.earned-pill {
    background: var(--primary);
    color: #fff;
    font-family: var(--font-outfit);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.success-content .cta-button {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

/* Phone App Navigation Footer */
.phone-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: #0b0f19;
    border-top: 1px solid var(--border-glass);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0.25rem 0;
    z-index: 4;
}

.phone-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    gap: 2px;
}

.phone-nav-btn.active {
    color: var(--primary);
}

.phone-nav-btn span {
    font-size: 0.55rem;
    font-weight: 500;
}

/* ==========================================================================
   Leaderboard Section
   ========================================================================== */

.leaderboard-section {
    padding: 6rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.leaderboard-card {
    padding: 1.5rem;
}

.leaderboard-table-header {
    display: grid;
    grid-template-columns: 0.6fr 2.5fr 1fr 1fr 1fr;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
}

.leaderboard-rows {
    display: flex;
    flex-direction: column;
}

.leader-row {
    display: grid;
    grid-template-columns: 0.6fr 2.5fr 1fr 1fr 1fr;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    align-items: center;
    font-size: 0.95rem;
}

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

.col-rank {
    font-weight: 700;
    font-size: 1rem;
}

.col-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.col-points {
    font-weight: 700;
    color: var(--primary);
}

.col-impact {
    font-weight: 500;
}

.highlight-team {
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.tag {
    font-size: 0.7rem;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.role-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 500;
    display: inline-block;
}

.text-yellow {
    color: var(--warning);
}

.display-none {
    display: none !important;
}

/* ==========================================================================
   Climate Insights & Research
   ========================================================================== */

.research-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.research-text {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.research-text h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.research-quote {
    font-style: italic;
    border-left: 3px solid var(--primary);
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 1rem 0;
}

.quote-author {
    display: block;
    font-style: normal;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

.research-interviews {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.research-interviews h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.interview-item {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1.5rem;
}

.interview-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.interviewer-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.interviewee-name {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 1.05rem;
}

.interviewee-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.interview-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Footer Styling
   ========================================================================== */

#main-footer {
    background: #060912;
    border-top: 1px solid var(--border-glass);
    padding: 5rem 2rem 2.5rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 320px;
}

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

.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-links h4 {
    font-size: 1.1rem;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

@keyframes drop-animation {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

.drop-animation {
    animation: drop-animation 2s infinite ease-in;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Scroll reveal helper classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .story-slide {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .story-image-placeholder {
        height: 220px;
    }
    
    .simulator-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    #nav-menu {
        display: none;
    }
    
    #mobile-menu-toggle {
        display: block;
    }
    
    .header-actions .cta-button {
        display: none;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .leaderboard-table-header, .leader-row {
        grid-template-columns: 0.5fr 2fr 1fr;
    }
    
    .leaderboard-table-header .col-actions, .leader-row .col-actions,
    .leaderboard-table-header .col-impact, .leader-row .col-impact {
        display: none;
    }
}

/* ==========================================================================
   SDG Badges Section
   ========================================================================== */
.sdg-container {
    margin-top: 4rem;
    text-align: center;
}

.sdg-title {
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

.sdg-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 999px;
}

.sdg-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.sdg-card {
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-top: 3px solid var(--sdg-color) !important;
    transition: var(--transition);
}

.sdg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--sdg-color) !important;
}

.sdg-number {
    font-family: var(--font-outfit);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--sdg-color);
}

.sdg-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.2;
}

/* ==========================================================================
   4-Pillar Research Section
   ========================================================================== */
.research-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.research-card-pillar {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pillar-icon {
    font-size: 2rem;
}

.research-card-pillar h3 {
    font-size: 1.35rem;
    font-family: var(--font-outfit);
    color: #fff;
}

.pillar-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.stats-box-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.stat-box-val {
    font-family: var(--font-outfit);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-box-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.pillar-foot-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glass);
    padding-top: 0.75rem;
    margin-top: auto;
}

.journey-steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.journey-steps-list li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.step-bullet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.interviews-mini {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.interview-snippet {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.01);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 2px solid var(--primary);
}

.interview-snippet em {
    display: block;
    margin-top: 0.25rem;
}

.journey-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.journey-pill {
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pillar-quote {
    font-style: italic;
    border-left: 2px solid var(--primary);
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: auto;
}

/* ==========================================================================
   Member Links & Custom Hover Styles
   ========================================================================== */
.member-link {
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.member-link:hover {
    color: var(--primary);
}

.member-link i {
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 0.6;
    transition: var(--transition);
}

.member-link:hover i {
    opacity: 1;
    transform: scale(1.15);
}

/* ==========================================================================
   SDG Impact Calculator
   ========================================================================= */
.calculator-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    padding: 1.5rem 0.5rem;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.calc-inputs h4 {
    font-size: 1.15rem;
    color: var(--primary);
}

.calc-help {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.slider-val {
    color: var(--primary);
    font-family: var(--font-outfit);
    font-weight: 700;
}

.calc-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    outline: none;
    border: 1px solid var(--border-glass);
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: var(--transition);
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--accent);
}

.calc-results {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.result-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-number {
    font-family: var(--font-outfit);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.result-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

.calc-projection {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
    line-height: 1.4;
}

.calc-projection strong {
    color: var(--primary);
}

/* ==========================================================================
   Interactive Survey Charts
   ========================================================================= */
.survey-charts-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1rem 0;
}

.survey-chart-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.chart-label {
    color: var(--text-muted);
}

.chart-value {
    color: var(--primary);
    font-family: var(--font-outfit);
    font-weight: 700;
}

.chart-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 999px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fill-primary {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.fill-danger {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.fill-info {
    background: var(--info);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ==========================================================================
   Responsive Research & SDG Adaptations
   ========================================================================= */
@media (max-width: 992px) {
    .sdg-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .research-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .sdg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Premium Interaction Enhancements (Mobile & Calculator)
   ========================================================================== */

/* 1. Mock Phone Glare Reflection Pseudo-element */
.phone-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 140px at var(--glare-x, 50%) var(--glare-y, 35%), rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    pointer-events: none;
    z-index: 15;
    transition: background 0.05s ease;
}

/* 2. CSS Haptic Shake vibration keyframe */
@keyframes phone-shake {
    0%, 100% { transform: scale(1) translate(0, 0) rotate(0deg); }
    20% { transform: scale(0.985) translate(-3px, 1px) rotate(-0.5deg); }
    40% { transform: scale(1.005) translate(2px, -2px) rotate(0.5deg); }
    60% { transform: scale(0.995) translate(-1px, 2px) rotate(-0.2deg); }
    80% { transform: scale(1.000) translate(1px, -1px) rotate(0.2deg); }
}
.phone-mockup.haptic-shake {
    animation: phone-shake 0.22s cubic-bezier(.36,.07,.19,.97) both;
}

/* 3. Canvas Confetti Overlay absolutely positioned */
#phone-confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
    pointer-events: none;
}

/* 4. Circular SDG Progress Gauge dashboard layout */
.calc-gauge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 0.5rem;
}

.calc-gauge-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.calc-gauge {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.035);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

.gauge-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    width: 96px;
    pointer-events: none;
}

.gauge-level-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--primary);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.gauge-level-desc {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 0.01em;
}

/* 5. Result Number Pop Scale Animation */
@keyframes number-pulse-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--accent); text-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }
}

.number-pop {
    animation: number-pulse-pop 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    display: inline-block;
}


/* ==========================================================================
   COMPREHENSIVE RESPONSIVE OVERRIDES (v3.0)
   Cross-browser · Android · iOS · Desktop compatibility
   ========================================================================== */

/* Tap highlight + touch UX */
button, a, .cta-button, .action-btn, .control-btn, .dot, .nav-link,
.drawer-link, .tab-btn, .preset-btn, .phone-nav-btn {
    -webkit-tap-highlight-color: transparent;
}

/* Smooth touch scrolling on phone mockup */
.phone-app-content {
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on drag interactions */
.three-display-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ===== LARGE DESKTOP (> 1200px) ===== */
@media (min-width: 1201px) {
    .hero-section {
        padding: 9rem 2rem 6rem 2rem;
    }
}

/* ===== TABLET / SMALL LAPTOP (max 1024px) ===== */
@media (max-width: 1024px) {
    .hero-section {
        padding: 8rem 1.5rem 4rem 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .three-display-card {
        height: 340px;
    }

    .storyboard-container {
        padding: 2rem;
    }

    .simulator-controls,
    .research-text,
    .research-interviews {
        padding: 2rem;
    }

    .header-container {
        padding: 1rem 1.5rem;
    }

    #nav-menu ul {
        gap: 1.25rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* ===== MOBILE (max 768px) — Enhanced ===== */
@media (max-width: 768px) {
    /* Hero */
    .hero-section {
        padding: 6rem 1rem 3rem 1rem;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Globe card */
    .three-display-card {
        height: 300px;
        padding: 1.25rem;
    }

    .three-label {
        font-size: 1rem;
    }

    /* Header */
    .header-container {
        padding: 0.75rem 1rem;
    }

    #logo {
        font-size: 1.25rem;
    }

    /* About */
    .about-section {
        padding: 4rem 1rem;
    }

    .about-card {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Storyboard */
    .storyboard-section {
        padding: 4rem 1rem;
    }

    .storyboard-container {
        padding: 1.5rem;
    }

    .story-slider {
        min-height: auto;
    }

    .story-slide {
        position: relative;
        display: none;
    }

    .story-slide.active {
        display: flex;
        flex-direction: column;
    }

    .story-image-placeholder {
        height: 180px;
    }

    .slide-heading {
        font-size: 1.4rem;
    }

    .slide-desc {
        font-size: 0.95rem;
    }

    /* Simulator */
    .simulator-section {
        padding: 4rem 1rem;
    }

    .simulator-controls {
        padding: 1.5rem;
    }

    .phone-mockup {
        width: 280px;
        height: 560px;
        border-width: 8px;
        border-radius: 32px;
    }

    /* Leaderboard */
    .leaderboard-section {
        padding: 4rem 1rem;
    }

    .leaderboard-card {
        padding: 1rem;
    }

    .leaderboard-tabs {
        flex-wrap: wrap;
    }

    /* Research */
    .research-section {
        padding: 4rem 1rem;
    }

    .research-card-pillar {
        padding: 1.5rem;
    }

    /* Footer */
    #main-footer {
        padding: 3rem 1rem 2rem 1rem;
    }

    .footer-bottom {
        font-size: 0.75rem;
    }

    /* Calculator */
    .calculator-container {
        padding: 0.5rem 0;
    }
}

/* ===== SMALL PHONES (max 480px) ===== */
@media (max-width: 480px) {
    /* Hero */
    .hero-section {
        padding: 5.5rem 0.75rem 2.5rem 0.75rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-wrap: wrap;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-divider {
        display: none;
    }

    /* Globe */
    .three-display-card {
        height: 260px;
        padding: 1rem;
    }

    .three-label {
        font-size: 0.9rem;
    }

    .three-instructions {
        font-size: 0.7rem;
    }

    /* Sections */
    .section-title {
        font-size: 1.6rem;
    }

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

    /* About */
    .about-section {
        padding: 3rem 0.75rem;
    }

    /* Storyboard */
    .storyboard-section {
        padding: 3rem 0.75rem;
    }

    .storyboard-container {
        padding: 1rem;
    }

    .story-image-placeholder {
        height: 150px;
    }

    .slide-heading {
        font-size: 1.2rem;
    }

    /* Simulator */
    .simulator-section {
        padding: 3rem 0.75rem;
    }

    .simulator-controls {
        padding: 1.25rem;
    }

    .phone-mockup {
        width: 260px;
        height: 520px;
        border-width: 7px;
    }

    /* Leaderboard */
    .leaderboard-section {
        padding: 3rem 0.75rem;
    }

    .leaderboard-card {
        padding: 0.75rem;
    }

    .leader-row {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .tab-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    /* Research */
    .research-section {
        padding: 3rem 0.75rem;
    }

    .research-card-pillar {
        padding: 1.25rem;
    }

    /* Footer */
    #main-footer {
        padding: 2.5rem 0.75rem 1.5rem 0.75rem;
    }

    .footer-container {
        gap: 2rem;
    }

    /* CTA buttons */
    .cta-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Badges / pills */
    .badge-pill {
        padding: 0.2rem 0.6rem;
    }

    .pill-text {
        font-size: 0.75rem;
    }
}

/* ===== VERY SMALL PHONES (max 360px) ===== */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .cta-button {
        width: 100%;
    }

    .three-display-card {
        height: 230px;
    }

    .phone-mockup {
        width: 240px;
        height: 480px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .slide-heading {
        font-size: 1.1rem;
    }

    .storyboard-container {
        padding: 0.75rem;
    }

    .leaderboard-tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }

    .header-container {
        padding: 0.6rem 0.75rem;
    }

    #logo {
        font-size: 1.1rem;
    }
}

/* ===== ANDROID-SPECIFIC FIXES ===== */
/* Fix 100vh issue on mobile Chrome/Safari */
@media (max-width: 768px) {
    #canvas-container {
        height: 100dvh;
        height: 100vh; /* fallback */
    }
}

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

/* Landscape phone fixes */
@media (max-width: 900px) and (orientation: landscape) {
    .hero-section {
        padding: 5rem 1rem 2rem 1rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .three-display-card {
        height: 220px;
    }
}

/* ==========================================================================
   Legal Information Modals
   Added by Rudra Sarker — Project Developer, Youth for Tomorrow
   ========================================================================== */

.legal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4, 7, 15, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-overlay[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.legal-modal {
    position: relative;
    width: min(720px, 100%);
    max-height: min(80vh, 720px);
    background: linear-gradient(160deg, rgba(16, 22, 42, 0.92) 0%, rgba(10, 15, 29, 0.96) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.legal-overlay[data-open="true"] .legal-modal {
    transform: translateY(0) scale(1);
}

.legal-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 2;
    transition: var(--transition);
}

.legal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
    transform: rotate(90deg);
}

.legal-modal-scroll {
    overflow-y: auto;
    padding: 2.4rem 2.4rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.legal-modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 8px;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-outfit);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
}

.legal-heading {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 0.9rem 0 0.25rem;
    color: #fff;
    background: linear-gradient(120deg, #ffffff 0%, var(--accent) 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-effective {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.legal-modal-scroll h3 {
    font-size: 1.05rem;
    color: var(--accent);
    margin: 1.5rem 0 0.55rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.legal-modal-scroll h3::before {
    content: "";
    width: 4px;
    height: 1rem;
    background: var(--primary);
    border-radius: 4px;
    flex-shrink: 0;
    transform: translateY(2px);
}

.legal-modal-scroll p,
.legal-modal-scroll ul {
    color: #d1d5db;
    font-size: 0.94rem;
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

.legal-modal-scroll ul {
    padding-left: 1.2rem;
    list-style: none;
}

.legal-modal-scroll ul li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.legal-modal-scroll ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.legal-modal-scroll a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.legal-modal-scroll a:hover {
    color: var(--primary);
}

.legal-modal-scroll code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

.legal-modal-scroll strong {
    color: #fff;
    font-weight: 600;
}

.legal-attribution {
    margin-top: 2rem !important;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(16, 185, 129, 0.25);
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
    text-align: right;
}

.legal-attribution strong {
    color: var(--accent);
    font-style: normal;
}

@media (max-width: 600px) {
    .legal-modal-scroll {
        padding: 2rem 1.3rem 1.5rem;
    }
    .legal-close {
        top: 0.8rem;
        right: 0.8rem;
    }
}
