/* ================================================
   2DG3 Landing Page
   ================================================ */

:root {
    --bg: #06060c;
    --gold: #c9a84c;
    --gold-rgb: 201, 168, 76;
    --green: #5ba644;
    --green-rgb: 91, 166, 68;
    --text: #e8e0d0;
    --text-dim: #8a8070;
    --text-faint: #5a5248;
    --border: rgba(201, 168, 76, 0.12);
    --card: rgba(12, 12, 22, 0.6);
    --radius: 10px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

/* ---- Background FX ---- */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.bg-glow-1 {
    width: 600px; height: 600px;
    top: -200px; left: -100px;
    background: rgba(var(--gold-rgb), 0.06);
    animation: drift 20s ease-in-out infinite alternate;
}
.bg-glow-2 {
    width: 500px; height: 500px;
    bottom: -200px; right: -100px;
    background: rgba(var(--green-rgb), 0.04);
    animation: drift 25s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

.grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
    opacity: 0.4;
}

.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
    position: absolute;
    background: rgba(var(--gold-rgb), 0.5);
    border-radius: 50%;
    animation: twinkle ease-in-out infinite alternate;
}
@keyframes twinkle { 0% { opacity: 0; } 100% { opacity: 1; } }

/* ---- Header ---- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(6, 6, 12, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.logo-accent { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }
.btn-nav {
    background: var(--gold) !important;
    color: var(--bg) !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    transition: all 0.3s var(--ease) !important;
}
.btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(var(--gold-rgb), 0.3);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.4s var(--ease);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--gold);
    color: var(--bg);
    box-shadow: 0 4px 24px rgba(var(--gold-rgb), 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(var(--gold-rgb), 0.35);
    filter: brightness(1.08);
}
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: rgba(var(--gold-rgb), 0.3);
    background: rgba(var(--gold-rgb), 0.04);
    transform: translateY(-2px);
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
}
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(var(--green-rgb), 0.08);
    border: 1px solid rgba(var(--green-rgb), 0.2);
    margin-bottom: 32px;
    animation: pulse-badge 3s ease-in-out infinite;
}
.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--green-rgb), 0.15); }
    50%      { box-shadow: 0 0 0 8px rgba(var(--green-rgb), 0); }
}

h1 {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    color: #fff;
    margin-bottom: 32px;
}
.hero-highlight {
    display: block;
    background: linear-gradient(135deg, var(--gold), #e8d080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 48px;
    font-weight: 400;
    line-height: 1.8;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 28px 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    max-width: 540px;
    margin: 0 auto;
}
.stat { text-align: center; }
.stat-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
    display: block;
}
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ---- Section Common ---- */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header-left { text-align: left; }
.section-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(var(--gold-rgb), 0.06);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.section-header h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    color: #fff;
    margin-bottom: 20px;
}
.section-desc {
    font-size: 0.98rem;
    color: var(--text-dim);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Why Section ---- */
.why {
    padding: 120px 0;
    background: rgba(0,0,0,0.2);
}
.why-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
    margin-top: 40px;
}
.why-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.why-text p {
    color: var(--text-dim);
    font-size: 0.98rem;
    line-height: 1.8;
}
.why-text em {
    color: var(--gold);
    font-style: italic;
}
.why-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.value-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: all 0.4s var(--ease);
}
.value-card:hover {
    border-color: rgba(var(--gold-rgb), 0.25);
    transform: translateX(4px);
}
.value-card h4 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 0;
}
.value-card p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ---- Scene Cards (Visual World Preview) ---- */
.world { padding: 120px 0; }
.scene-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.scene-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease);
    background: var(--card);
}
.scene-card:hover {
    border-color: rgba(var(--gold-rgb), 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.scene {
    position: relative;
    overflow: hidden;
    height: 200px;
}

/* Forest scene */
.scene-forest {
    background: linear-gradient(180deg,
        #030a05 0%,
        #061208 20%,
        #0a1e12 50%,
        #081a0e 75%,
        #050e07 100%
    );
}
/* Ambient canopy light + vertical trunk shadows */
.scene-forest::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 45% 30% at 40% 8%, rgba(30, 65, 40, 0.2) 0%, transparent 100%),
        radial-gradient(ellipse 25% 20% at 70% 15%, rgba(20, 50, 30, 0.12) 0%, transparent 100%),
        linear-gradient(90deg,
            rgba(0,0,0,0.3) 0%, transparent 5%,
            transparent 18%, rgba(0,0,0,0.18) 21%, transparent 25%,
            transparent 41%, rgba(0,0,0,0.22) 44%, transparent 48%,
            transparent 63%, rgba(0,0,0,0.16) 66%, transparent 70%,
            transparent 84%, rgba(0,0,0,0.2) 87%, transparent 92%,
            transparent 96%, rgba(0,0,0,0.3) 100%
        );
}
/* Layered canopy silhouettes */
.scene-trees {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90%;
    z-index: 2;
    background:
        radial-gradient(ellipse 22% 38% at 3% 42%, rgba(2, 6, 3, 0.9) 0%, transparent 100%),
        radial-gradient(ellipse 30% 48% at 20% 28%, rgba(3, 9, 5, 0.85) 0%, transparent 100%),
        radial-gradient(ellipse 16% 30% at 38% 46%, rgba(4, 11, 6, 0.7) 0%, transparent 100%),
        radial-gradient(ellipse 26% 42% at 56% 32%, rgba(2, 7, 4, 0.8) 0%, transparent 100%),
        radial-gradient(ellipse 22% 36% at 76% 36%, rgba(3, 9, 5, 0.75) 0%, transparent 100%),
        radial-gradient(ellipse 20% 34% at 94% 40%, rgba(2, 6, 3, 0.85) 0%, transparent 100%);
}
/* Ground fog */
.scene-trees::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    right: -10%;
    height: 35%;
    z-index: 3;
    background: linear-gradient(0deg,
        rgba(12, 35, 20, 0.55) 0%,
        rgba(10, 28, 16, 0.25) 45%,
        transparent 100%
    );
    animation: fog-drift 12s ease-in-out infinite alternate;
}
@keyframes fog-drift {
    0%   { opacity: 0.5; transform: translateX(-6px); }
    100% { opacity: 0.85; transform: translateX(6px); }
}

.scene-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.6;
    animation: scene-pulse 4s ease-in-out infinite alternate;
}
@keyframes scene-pulse {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.1); }
}
/* Multiple bioluminescent light sources */
.scene-glow-green {
    width: 45px; height: 45px;
    bottom: 25%; left: 28%;
    background: rgba(80, 220, 140, 0.5);
    box-shadow:
        90px 15px 30px 10px rgba(60, 200, 120, 0.25),
        -25px -35px 22px 6px rgba(100, 240, 160, 0.12),
        150px -20px 28px 8px rgba(70, 210, 130, 0.18);
}
.scene-particles { position: absolute; inset: 0; z-index: 4; }
.particle {
    position: absolute;
    width: 2.5px; height: 2.5px;
    background: rgba(120, 230, 160, 0.65);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(100, 220, 150, 0.4);
    animation: float-up ease-in-out infinite;
}
@keyframes float-up {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    15%  { opacity: 0.7; }
    50%  { opacity: 0.5; }
    85%  { opacity: 0.2; }
    100% { transform: translateY(-70px) scale(0.2); opacity: 0; }
}

/* Cave scene */
.scene-cave {
    background: linear-gradient(180deg, #0a0a14 0%, #12100a 60%, #1a150e 100%);
    min-height: 180px;
}
.scene-glow-amber {
    width: 60px; height: 60px;
    bottom: 30%; left: 40%;
    background: rgba(220, 160, 60, 0.5);
}
.scene-flicker {
    position: absolute;
    bottom: 20%;
    left: 42%;
    width: 20px; height: 30px;
    background: radial-gradient(ellipse, rgba(255, 180, 60, 0.8) 0%, transparent 70%);
    animation: flicker 0.5s ease-in-out infinite alternate;
    filter: blur(2px);
}
@keyframes flicker {
    0%   { transform: scaleY(1) scaleX(1); opacity: 0.7; }
    50%  { transform: scaleY(1.1) scaleX(0.9); opacity: 1; }
    100% { transform: scaleY(0.9) scaleX(1.1); opacity: 0.8; }
}

/* Night scene */
.scene-night {
    background: linear-gradient(180deg, #080818 0%, #0c1028 50%, #0a0e20 100%);
    min-height: 180px;
}
.scene-glow-blue {
    width: 100px; height: 100px;
    top: 10%; right: 15%;
    background: rgba(100, 140, 220, 0.2);
}
.scene-moon {
    position: absolute;
    top: 18%; right: 22%;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #dde4f0 0%, #b0bdd4 70%);
    box-shadow: 0 0 20px rgba(180, 200, 240, 0.3), 0 0 60px rgba(140, 170, 220, 0.15);
}

.scene-info {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border);
}
.scene-info h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.scene-info p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* ---- Updates / Devlog ---- */
.updates {
    padding: 120px 0;
    background: rgba(0,0,0,0.2);
}
.updates-timeline {
    max-width: 800px;
    margin: 0 auto;
}
.update-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 32px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}
.update-entry:last-child { border-bottom: none; }
.update-date {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-faint);
    padding-top: 4px;
}
.update-version {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gold);
}
.update-body h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 16px;
}
.update-body > p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 20px;
}
.update-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.update-details li {
    padding-left: 20px;
    position: relative;
    color: var(--text-faint);
    font-size: 0.85rem;
    line-height: 1.6;
}
.update-details li::before {
    content: '';
    position: absolute;
    left: 0; top: 7px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(var(--gold-rgb), 0.3);
}

/* ---- Current Build ---- */
.current {
    padding: 120px 0;
    background: rgba(0,0,0,0.3);
}
.current-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.current-text .section-tag { margin-bottom: 20px; }
.current-text h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: #fff;
    margin-bottom: 20px;
}
.current-text > p {
    color: var(--text-dim);
    margin-bottom: 32px;
    font-size: 0.98rem;
    line-height: 1.75;
}
.current-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.current-list li {
    padding-left: 24px;
    position: relative;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.current-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.6;
}

/* Terminal */
.terminal {
    background: #0a0a14;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.78rem;
}
.terminal-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}
.terminal-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #28c840; }
.terminal-body {
    padding: 20px;
    overflow-x: auto;
    line-height: 1.8;
}
.terminal-body code { font-family: inherit; color: var(--text-dim); }
.t-green { color: var(--green); }
.t-dim { color: var(--text-faint); }

/* ---- Signup ---- */
.signup { padding: 120px 0; }
.signup-box {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 56px 48px;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.signup-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.4), transparent);
}
.signup-box h2 {
    font-size: 1.9rem;
    color: #fff;
    margin-bottom: 16px;
}
.signup-box > p {
    color: var(--text-dim);
    margin-bottom: 36px;
    font-size: 0.95rem;
    line-height: 1.75;
}
.form-row { display: flex; gap: 10px; margin-bottom: 16px; }
#email-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}
#email-input::placeholder { color: var(--text-faint); }
#email-input:focus {
    border-color: rgba(var(--gold-rgb), 0.4);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.06);
}
.btn-submit { padding: 14px 28px; white-space: nowrap; font-size: 0.9rem; }
.form-note { font-size: 0.78rem; color: var(--text-faint); }
.form-status { margin-top: 16px; font-size: 0.9rem; min-height: 24px; }
.form-success { color: var(--green); }
.form-error { color: #e55; }

/* ---- Footer ---- */
footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-content p { font-size: 0.8rem; color: var(--text-faint); }

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .scene-grid { grid-template-columns: 1fr; }
    .scene-grid { grid-template-columns: 1fr; }
    .current-content { grid-template-columns: 1fr; gap: 40px; }
    .why-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero-stats { flex-direction: column; gap: 20px; max-width: 280px; }
    .stat-divider { width: 40px; height: 1px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .nav-links a:not(.btn-nav) { display: none; }
    .form-row { flex-direction: column; }
    .signup-box { padding: 40px 28px; }
    .footer-content { flex-direction: column; gap: 12px; text-align: center; }
    .why, .world, .updates, .current, .signup { padding: 80px 0; }
    .update-entry { grid-template-columns: 1fr; gap: 12px; }
    .update-date { flex-direction: row; gap: 12px; align-items: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .value-card { padding: 20px; }
}
