/*
 * NextB - The Next Billion
 * Modern, cutting-edge, minimalist design
 */

:root {
    /* Colors - Black & Yellow Theme */
    --black: #0a0a0a;
    --dark: #111111;
    --dark-elevated: #1a1a1a;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --gray-600: #666;
    --gray-500: #888;
    --gray-400: #aaa;
    --gray-300: #ccc;
    --white: #fff;
    --yellow: #ffd000;
    --yellow-light: #ffe44d;
    --yellow-dark: #e6bb00;
    --accent: var(--yellow);
    --accent-light: var(--yellow-light);
    --accent-glow: rgba(255, 208, 0, 0.4);
    --gradient-1: linear-gradient(135deg, #ffd000 0%, #ffb700 50%, #ff9500 100%);
    --gradient-2: linear-gradient(135deg, #ffe44d 0%, #ffd000 100%);

    /* Typography */
    --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 120px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--white);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Cursor glow effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover .cursor-glow {
    opacity: 0.3;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 10px;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo-img {
    height: 36px;
    width: auto;
}

.footer-logo-img {
    height: 32px;
    width: auto;
}

.footer-logo-text {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    padding: 10px 20px !important;
    background: var(--white) !important;
    color: var(--black) !important;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--yellow);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #ffb700;
    bottom: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ff9500;
    top: 50%;
    left: 30%;
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.title-line:nth-child(2) { animation-delay: 0.1s; }
.title-line:nth-child(3) { animation-delay: 0.2s; }

.title-line.accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.hero-subtitle {
    font-size: 18px;
    color: var(--gray-400);
    max-width: 480px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.4s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-actions {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gray-500);
}

.btn-white {
    background: var(--white);
    color: var(--black);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.2);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-ring {
    position: absolute;
    border: 1px solid rgba(255, 208, 0, 0.2);
    border-radius: 50%;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation: rotate 60s linear infinite;
}

.ring-2 {
    width: 75%;
    height: 75%;
    animation: rotate 45s linear infinite reverse;
}

.ring-3 {
    width: 50%;
    height: 50%;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.visual-center {
    position: relative;
    z-index: 1;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    border: 3px solid var(--yellow);
    border-radius: 50%;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 60px var(--accent-glow); }
    50% { box-shadow: 0 0 100px var(--accent-glow), 0 0 150px rgba(255, 208, 0, 0.3); }
}

.billion-text {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gray-500), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* Sections */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-dark {
    background: var(--dark);
}

.section-muted {
    background: var(--dark-elevated);
    padding: 60px 0;
}

.section-header {
    margin-bottom: 60px;
}

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

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Mission */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.mission-text p {
    color: var(--gray-400);
    font-size: 17px;
    margin-bottom: 20px;
}

.mission-text .lead {
    font-size: 24px;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 24px;
}

.mission-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-card {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 56px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-unit {
    font-size: 32px;
    font-weight: 600;
    color: var(--accent-light);
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--gray-500);
}

/* Pillars */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pillar-card {
    position: relative;
    background: var(--dark-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.pillar-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
}

.pillar-card:hover::before {
    transform: scaleX(1);
}

.pillar-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    color: var(--accent-light);
    margin-bottom: 24px;
}

.pillar-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.pillar-card p {
    color: var(--gray-400);
    font-size: 15px;
    line-height: 1.6;
}

.pillar-number {
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
}

/* Impact */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.impact-card {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.impact-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.impact-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.impact-number span:first-child {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.impact-suffix {
    font-size: 24px;
    color: var(--accent-light);
}

.impact-label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Partners */
.partners-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.partners-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.partners-logos {
    display: flex;
    align-items: center;
    gap: 48px;
}

.partner-logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-500);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.partner-logo:hover {
    opacity: 1;
}

/* Join Section */
.section-join {
    background: var(--dark);
    padding: 100px 0;
}

.join-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.join-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.join-text {
    font-size: 18px;
    color: var(--gray-400);
    line-height: 1.6;
}

/* Signal Form */
.signal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-control, .form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    color: var(--white);
    font-family: var(--font);
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 255, 255, 0.06);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 48px;
}

.form-select option {
    background: var(--dark);
    color: var(--white);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #f87171;
}

/* Signal Button */
.signal-btn {
    position: relative;
    background: var(--yellow);
    border: none;
    border-radius: 12px;
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--black);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(255, 208, 0, 0.2);
}

.signal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(255, 208, 0, 0.35);
}

.signal-btn .btn-text {
    position: relative;
    z-index: 1;
}

.signal-btn .btn-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: width 0.05s linear;
}

.signal-btn.holding .btn-progress {
    transition: width var(--hold-duration, 3s) linear;
    width: 100%;
}

.signal-btn.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.form-hint {
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Success State */
.success-state {
    animation: successFadeIn 0.4s ease;
    text-align: center;
    padding: 40px;
    background: rgba(255, 208, 0, 0.05);
    border: 1px solid rgba(255, 208, 0, 0.2);
    border-radius: 16px;
}

.success-state h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--yellow);
}

.success-state p {
    font-size: 15px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.success-state a {
    color: var(--yellow);
    text-decoration: none;
    font-size: 14px;
}

.success-state a:hover {
    text-decoration: underline;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.footer {
    background: var(--black);
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand .logo-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.footer-brand .logo-text {
    font-size: 18px;
}

.footer-tagline {
    color: var(--gray-500);
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-copy {
    font-size: 13px;
    color: var(--gray-600);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        max-width: 400px;
        margin: 60px auto 0;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .join-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .signal-form {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .nav {
        padding: 16px 20px;
    }

    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 40px;
    }

    .visual-center {
        width: 120px;
        height: 120px;
    }

    .billion-text {
        font-size: 28px;
    }

    .scroll-indicator {
        display: none;
    }

    .stat-number {
        font-size: 40px;
    }

    .partners-row {
        flex-direction: column;
        gap: 24px;
    }

    .partners-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Animations on scroll */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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