/* ============================================
   MeSite — Sonsuz Tuval Design System
   Renk Paleti: Sinema Siyahı + Projeksiyon Altını + Kor
   ------------------------------------------------------
   Tek kaynak css/theme.css. Aşağıdaki isimler eski
   kodun çalışmaya devam etmesi için tutulan takma adlar.
   ============================================ */

/* --- CSS DEĞİŞKENLERİ (DESIGN TOKENS) --- */
:root {
    /* Zemin Renkleri */
    --bg-primary: var(--ink-900);
    --bg-secondary: var(--ink-950);
    --bg-tertiary: var(--ink-850);
    --bg-card: var(--ink-800);
    --bg-card-hover: var(--ink-700);

    /* Aksanlar — Kanon altını */
    --accent-primary: var(--gold);
    --accent-secondary: var(--gold-deep);
    --accent-glow: rgba(227, 199, 123, 0.22);
    --accent-glow-strong: rgba(227, 199, 123, 0.45);

    /* İkincil aksanlar (eski neon isimleri korundu) */
    --neon-cyan: var(--canon);  /* Kanon mavisi */
    --neon-purple: #A085C9;    /* alacakaranlık moru */
    --neon-green: var(--jade);
    --neon-pink: var(--danger);

    /* Metin */
    --text-primary: var(--paper);
    --text-secondary: var(--paper-dim);
    --text-muted: var(--paper-faint);
    --text-white: #FFFFFF;

    /* Tipografi */
    --font-primary: var(--font-display);
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Boşluklar */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Kenar Yuvarlatma */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Geçişler */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    display: block;
}

/* --- PARTİKÜL ARKA PLAN --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* --- KONTEYNER --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* --- NAVİGASYON --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all var(--transition-base);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(26, 27, 38, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 158, 100, 0.1);
    padding: var(--space-sm) 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.4rem;
}

.logo-icon {
    color: var(--accent-primary);
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 16px var(--accent-glow-strong)); }
}

.logo-text {
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-base);
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link--cta {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary) !important;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* Mobil menü butonu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
    gap: var(--space-3xl);
}

.hero-content {
    flex: 1;
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 158, 100, 0.08);
    border: 1px solid rgba(255, 158, 100, 0.2);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease-out;
}

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

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-white);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 520px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* --- BUTONLAR --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--accent-glow-strong);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-spark {
    font-size: 1.1rem;
    animation: sparkRotate 3s linear infinite;
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(192, 202, 245, 0.2);
}

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(255, 158, 100, 0.05);
    transform: translateY(-3px);
}

/* --- İSTATİSTİKLER --- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(192, 202, 245, 0.1);
}

/* --- HERO VISUAL (Ağaç) --- */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tree-visualization {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    position: relative;
}

#tree-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

/* --- BÖLÜM GENEL --- */
.section {
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
}

.section-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-primary);
    background: rgba(255, 158, 100, 0.08);
    border: 1px solid rgba(255, 158, 100, 0.15);
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-white);
    margin-bottom: var(--space-xl);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

/* Ortalanmış kullanım.
   Yalnızca `text-align: center` vermek yetmiyor: 600px'lik kutu
   konteynerin solunda kalır ve metin o kutunun içinde ortalanır,
   yani sayfaya göre sola kaymış görünür. Kutunun kendisi de
   ortalanmalı. */
.section-desc--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* --- MANİFESTO KARTLARI --- */
.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.manifesto-card {
    background: var(--bg-card);
    border: 1px solid rgba(192, 202, 245, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.manifesto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--neon-cyan));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.manifesto-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 158, 100, 0.15);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.manifesto-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: var(--space-lg);
}

.manifesto-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-md);
}

.manifesto-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- SONSUZ TUVAL DEMO --- */
.canvas-section {
    background: var(--bg-secondary);
}

.canvas-demo {
    margin-top: var(--space-2xl);
}

.canvas-window {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(192, 202, 245, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.window-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(192, 202, 245, 0.06);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot--red { background: var(--neon-pink); }
.dot--yellow { background: var(--accent-primary); }
.dot--green { background: var(--neon-green); }

.window-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.window-body {
    padding: var(--space-lg);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#graph-canvas {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
}

/* --- KIVILCIM EKONOMİSİ --- */
.economy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.economy-card {
    background: var(--bg-card);
    border: 1px solid rgba(192, 202, 245, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.economy-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 158, 100, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.economy-card--highlight {
    border-color: rgba(255, 158, 100, 0.3);
    background: linear-gradient(135deg, rgba(255, 158, 100, 0.05), rgba(255, 119, 51, 0.05));
    box-shadow: 0 0 40px rgba(255, 158, 100, 0.08);
}

.economy-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-sm);
}

.economy-action {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

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

.economy-balance-demo {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xl);
}

.balance-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid rgba(255, 158, 100, 0.2);
    padding: var(--space-2xl) var(--space-3xl);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 158, 100, 0.06) 0%, transparent 70%);
    animation: balanceGlow 4s ease-in-out infinite;
}

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

.balance-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    position: relative;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-white);
    font-family: var(--font-mono);
    position: relative;
}

.spark-icon {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.balance-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
}

/* --- KAPALI BETA --- */
.beta-section {
    background: var(--bg-secondary);
}

.beta-card-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.beta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow-strong), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    pointer-events: none;
}

.beta-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 158, 100, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-4xl);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.beta-form {
    margin-top: var(--space-xl);
}

.form-group {
    display: flex;
    gap: var(--space-sm);
    max-width: 460px;
    margin: 0 auto;
}

.form-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 1px solid rgba(192, 202, 245, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-base);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-submit {
    white-space: nowrap;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

/* --- FOOTER --- */
.footer {
    position: relative;
    z-index: 1;
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(192, 202, 245, 0.06);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(192, 202, 245, 0.04);
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-legal {
    margin-top: var(--space-sm);
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* --- ANİMASYONLAR --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animations */
.manifesto-card,
.economy-card,
.beta-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.manifesto-card.visible,
.economy-card.visible,
.beta-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.manifesto-card:nth-child(2),
.economy-card:nth-child(2) { transition-delay: 0.1s; }
.manifesto-card:nth-child(3),
.economy-card:nth-child(3) { transition-delay: 0.2s; }
.manifesto-card:nth-child(4),
.economy-card:nth-child(4) { transition-delay: 0.3s; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }

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

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

    .hero-visual {
        max-width: 300px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .beta-card {
        padding: var(--space-2xl) var(--space-xl);
    }

    .form-group {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

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

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

/* --- ÖĞRETİCİ (TUTORIAL) EKRANI --- */
.tutorial-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 27, 38, 0.95);
    display: none; /* Başlangıçta gizli */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.tutorial-content {
    max-width: 600px;
    text-align: center;
    padding: 40px;
}

.tutorial-step {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #FF9E64;
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.tutorial-step h2 {
    color: #FF9E64;
    margin-bottom: 10px;
    font-size: 18px;
}

.start-journey-btn {
    background-color: transparent;
    color: #FF9E64;
    border: 2px solid #FF9E64;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.start-journey-btn:hover {
    background-color: #FF9E64;
    color: #1A1B26;
}
