/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #0a0a0a;
    color: #e8e8e8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ============ PASSWORD GATE ============ */
#password-gate {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s cubic-bezier(.19,1,.22,1), transform 0.8s cubic-bezier(.19,1,.22,1);
}
#password-gate.fade-out { opacity: 0; transform: scale(1.05); pointer-events: none; }

.gate-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
.gate-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gate-card {
    position: relative; z-index: 1;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px; padding: 3rem 2.5rem;
    text-align: center; max-width: 400px; width: 90%;
    animation: cardEnter 1s cubic-bezier(.19,1,.22,1);
}
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.gate-emoji { font-size: 3.5rem; margin-bottom: 0.5rem; animation: bounce 3s ease-in-out infinite; }
@keyframes bounce { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }
.gate-subtitle { color: #b0b0b0; margin-bottom: 1.5rem; font-size: 0.95rem; }
.password-input-wrapper { display: flex; gap: 0.5rem; }
#password-input {
    flex: 1; padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 14px;
    background: rgba(255,255,255,0.06); color: #e8e8e8;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.95rem;
    outline: none; transition: border-color 0.3s;
}
#password-input:focus { border-color: rgba(255,255,255,0.3); }
#password-input::placeholder { color: #777; }
#password-submit {
    padding: 0.85rem 1.2rem; border: none; border-radius: 14px;
    background: #e8e8e8; color: #0a0a0a; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s, transform 0.2s;
}
#password-submit:hover { background: #fff; transform: scale(1.03); }
.error-text {
    color: #ff6b6b; font-size: 0.8rem;
    margin-top: 1rem; margin-bottom: 0;
    font-weight: 500; opacity: 0; transition: opacity 0.3s;
}
.error-text.show { opacity: 1; animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-8px);} 75%{transform:translateX(8px);} }

/* ============ LOADER ============ */
#loader {
    position: fixed; inset: 0; z-index: 9998;
    align-items: center; justify-content: center;
    background: #0a0a0a;
}
#loader:not([hidden]) {
    display: flex;
}
.loader-inner { text-align: center; }
.loader-spinner {
    width: 48px; height: 48px; margin: 0 auto 1.5rem;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #e8e8e8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: #b0b0b0; font-size: 0.95rem; }

/* ============ SCROLL TEXT OVER FRAMES ============ */
.frame-gradient-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}
#text-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.scroll-text {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 400;
    line-height: 1.05;
    color: #fff;
    text-align: center;
    width: 85%;
    max-width: 1100px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.4);
}
.scroll-text .char {
    display: inline-block;
    opacity: 0;
    will-change: opacity;
}

/* ============ G.O.A.T. REVEAL ============ */
#liquid-ether-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at 30% 50%, rgba(15,61,140,0.2), transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(15,97,216,0.12), transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(10,26,74,0.15), transparent 50%),
                #060610;
    z-index: 0;
    pointer-events: none;
}
#liquid-ether-bg canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.reveal-sticky {
    position: sticky; top: 0;
    height: 100vh;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    z-index: 1;
}
.reveal-content { text-align: center; padding: 2rem; width: 100%; }
.letter-row {
    display: flex; align-items: flex-end; justify-content: center;
}
.letter-block {
    display: flex; flex-direction: column; align-items: center;
    opacity: 0; transform: translateY(120px) scale(0.7);
    padding: 0 clamp(0.1rem, 0.8vw, 0.8rem);
}
.letter-block.active {
    opacity: 1; transform: translateY(0) scale(1);
    transition: opacity 0.8s cubic-bezier(.39,.575,.565,1),
                transform 1.8s cubic-bezier(.19,1,.22,1);
}
.letter-char {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(7rem, 20vw, 20rem);
    font-weight: 800; color: #e8e8e8;
    line-height: 0.85; letter-spacing: -0.04em;
    text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.letter-word {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(1.3rem, 3.5vw, 2.8rem);
    font-weight: 500; color: #b0b0b0;
    text-transform: uppercase; letter-spacing: 0.15em;
    margin-top: 0.75rem; opacity: 0; transform: translateY(20px);
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.letter-block.active .letter-word {
    opacity: 1; transform: translateY(0);
    transition: opacity 0.6s ease 0.8s, transform 1s cubic-bezier(.19,1,.22,1) 0.8s;
}
.letter-dot {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(5rem, 12vw, 12rem);
    font-weight: 800; color: #e8e8e8;
    line-height: 0.85; opacity: 0;
    padding: 0 clamp(0, 0.2vw, 0.2rem);
    margin-bottom: 0.15em;
    text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.letter-dot.active {
    opacity: 1;
    transition: opacity 0.5s cubic-bezier(.39,.575,.565,1);
}
.goat-sub {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 400; color: #9a9a9a;
    margin-top: 2rem; opacity: 0;
    letter-spacing: 0.15em; text-transform: uppercase;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    transition: opacity 0.8s ease;
}
.goat-sub.active { opacity: 1; }

/* ============ DECIMAL SECTION ============ */
#decimal-section {
    position: relative; z-index: 3; background: #0a0a0a;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 6rem 2rem;
}
.decimal-content { text-align: center; max-width: 900px; width: 100%; }
.decimal-logo-wrap { margin-bottom: 3rem; }

/* Animated SVG logo */
.animated-logo {
    width: 90%; max-width: 500px; height: auto; overflow: visible; margin: 0 auto; display: block;
}
.icon-path, .text-path {
    fill-opacity: 0;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dashoffset: 300;
}
.icon-blue { stroke: #0f61d8; stroke-dasharray: 250; stroke-dashoffset: 250; }
.icon-teal { stroke: #00d2b9; stroke-dasharray: 200; stroke-dashoffset: 200; }
.icon-dark { stroke: #000035; stroke-dasharray: 150; stroke-dashoffset: 150; }
.text-path { stroke: #ffffff; stroke-dasharray: 350; stroke-dashoffset: 350; }
.dot-path { stroke: #ffffff; stroke-dasharray: 50; stroke-dashoffset: 50; }

/* When triggered by scroll */
.logo-animate .icon-blue { stroke-dashoffset: 0; fill-opacity: 1; fill: #0f61d8; transition: stroke-dashoffset 1.2s cubic-bezier(.4,0,.2,1), fill-opacity 0.6s ease 0.8s; }
.logo-animate .icon-teal { stroke-dashoffset: 0; fill-opacity: 1; fill: #00d2b9; transition: stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1) 0.2s, fill-opacity 0.6s ease 1s; }
.logo-animate .icon-dark { stroke-dashoffset: 0; fill-opacity: 1; fill: #000035; transition: stroke-dashoffset 0.8s cubic-bezier(.4,0,.2,1) 0.4s, fill-opacity 0.5s ease 1.1s; }
.logo-animate .text-path { stroke-dashoffset: 0; fill-opacity: 1; fill: #ffffff; transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1) 0.8s, fill-opacity 0.5s ease 1.5s; }
.logo-animate .dot-path { stroke-dashoffset: 0; fill-opacity: 1; fill: #ffffff; transition: stroke-dashoffset 0.4s cubic-bezier(.4,0,.2,1) 1.5s, fill-opacity 0.3s ease 1.7s; }
.decimal-tagline { margin-bottom: 3rem; }
.tagline-line {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400; color: #9a9a9a; line-height: 1.7;
}
.tagline-greatest {
    font-family: 'Bricolage Grotesque', sans-serif !important;
    font-size: clamp(3rem, 8vw, 5.5rem) !important;
    font-weight: 800 !important; color: #e8e8e8 !important;
    letter-spacing: -0.03em; line-height: 1.1 !important; margin: 0.2rem 0;
}
.tagline-pos {
    font-family: 'Bricolage Grotesque', sans-serif !important;
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
    font-weight: 600 !important; color: #c8c8c8 !important;
}

/* ============ DARK-TO-LIGHT TRANSITION ============ */
.dark-to-light-transition {
    height: 200px;
    background: linear-gradient(to bottom, #0a0a0a, #f8f9fc);
    position: relative;
    z-index: 3;
}

/* ============ ACHIEVEMENTS (Light Theme) ============ */
#achievements-section {
    position: relative; z-index: 3; background: #f8f9fc;
    padding: 4rem 2rem 6rem;
}
.achievements-container { max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 2.5rem; }
.section-dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #0f61d8, #00d2b9); flex-shrink: 0; }
.section-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #5a5a72; }
.ach-category { margin-bottom: 3rem; }
.ach-cat-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #5a5a72; margin-bottom: 1.25rem; padding-left: 4px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ach-card {
    background: #ffffff; border: 1px solid #e2e4ea;
    border-radius: 16px; padding: 22px 24px; display: flex; gap: 16px; align-items: flex-start;
    transition: all 0.3s ease; cursor: pointer;
}
.ach-card:hover {
    border-color: #0f61d8; transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15,97,216,0.10);
}
.ach-future .ach-card { border-style: dashed; background: linear-gradient(135deg, rgba(15,97,216,0.03), rgba(0,210,185,0.02)); }
.ach-future .ach-card:hover { border-style: solid; border-color: #00d2b9; box-shadow: 0 16px 32px rgba(0,210,185,0.10); }
.ach-icon {
    width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15,97,216,0.10), rgba(0,210,185,0.07));
    display: flex; align-items: center; justify-content: center; color: #0f61d8;
}
.ach-icon svg { width: 24px; height: 24px; }
.ach-card h4 { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.ach-card p { font-size: 0.875rem; color: #5a5a72; line-height: 1.5; margin: 0; }
.ach-badge {
    display: inline-block; margin-top: 10px; padding: 4px 12px; font-size: 0.7rem; font-weight: 600;
    border-radius: 6px; background: linear-gradient(135deg, rgba(15,97,216,0.12), rgba(0,210,185,0.08)); color: #0f61d8;
}

/* Billion (light theme) */
.billion-wrap {
    text-align: center; padding: 5rem 0 2rem;
    background: radial-gradient(ellipse at 50% 50%, rgba(0,210,185,0.08), transparent 60%);
    border-radius: 24px; margin-top: 2rem;
}
.billion-badge {
    display: inline-block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 4px; padding: 10px 24px; border-radius: 50px;
    background: linear-gradient(135deg, rgba(0,210,185,0.15), rgba(15,97,216,0.10));
    color: #0f61d8; margin-bottom: 2rem; border: 1px solid rgba(0,210,185,0.25);
}
.billion-number {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(3.5rem, 14vw, 10rem); font-weight: 800; line-height: 1; margin-bottom: 1.5rem;
}
.billion-number .dollar, .billion-number .plus {
    background: linear-gradient(135deg, #00d2b9, #0f61d8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.billion-number .amount {
    background: linear-gradient(135deg, #0f61d8, #00d2b9, #0f61d8); background-size: 300% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: gradShift 6s ease infinite;
}
@keyframes gradShift { 0%{background-position:0% center;} 50%{background-position:100% center;} 100%{background-position:0% center;} }
.billion-tagline { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 600; color: #1a1a2e; margin-bottom: 1rem; }
.billion-sub { font-size: clamp(0.95rem, 2vw, 1.2rem); color: #5a5a72; max-width: 600px; margin: 0 auto; line-height: 1.7; }
@media (max-width: 720px) { .ach-grid { grid-template-columns: 1fr; } }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1; pointer-events: auto;
}
.modal {
    background: #ffffff; border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
    max-width: 560px; width: 92%; max-height: 85vh;
    overflow-y: auto; position: relative;
    transform: scale(0.92); opacity: 0;
    transition: transform 0.35s cubic-bezier(.19,1,.22,1), opacity 0.3s ease;
    padding: 2rem;
}
.modal-overlay.active .modal {
    transform: scale(1); opacity: 1;
}
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border: none; border-radius: 10px;
    background: #f0f1f5; color: #5a5a72; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: #e2e4ea; color: #1a1a2e; }
.modal-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 1.5rem;
}
.modal-icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15,97,216,0.10), rgba(0,210,185,0.07));
    display: flex; align-items: center; justify-content: center; color: #0f61d8;
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-header-text h3 { font-size: 1.15rem; font-weight: 700; color: #1a1a2e; margin: 0 0 2px; }
.modal-header-text p { font-size: 0.85rem; color: #5a5a72; margin: 0; }
.modal-body { color: #3a3a52; font-size: 0.95rem; line-height: 1.7; }
.modal-body p { margin-bottom: 0.75rem; }
.modal-body ul { padding-left: 1.2rem; margin-bottom: 0.75rem; }
.modal-body li { margin-bottom: 0.4rem; }

.reveal-up { opacity: 0; transform: translateY(50px); }
.reveal-up.active {
    opacity: 1; transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(.39,.575,.565,1),
                transform 1.2s cubic-bezier(.19,1,.22,1);
}

/* ============ FOOTER ============ */
footer {
    position: relative; z-index: 3; background: #0a0a0a;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner { text-align: center; padding: 3rem 2rem; }
footer p { color: #777; font-size: 0.85rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .gate-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .letter-block { padding: 0 clamp(0.05rem, 0.5vw, 0.3rem); }
    .decimal-features { grid-template-columns: 1fr; }
}
