/* ===== LANDING PAGE - Estilo BusCompanySim + Financiación ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-gutter: stable; scroll-behavior: smooth; }

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #101827;
    color: #f7fafc;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.landing-shell {
    width: min(1180px, calc(100% - 3rem));
    margin: auto;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 5rem;
    align-items: center;
    padding: 5rem 0;
}
@media (max-width: 850px) {
    .landing-shell { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0; }
}

.landing-hero { position: relative; }
.landing-hero::before {
    content: '';
    position: absolute;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: #667eea;
    filter: blur(100px);
    opacity: .28;
    z-index: 0;
}
.landing-hero > * { position: relative; z-index: 1; }

.landing-brand {
    color: #a5b4fc;
    letter-spacing: .16em;
    font-size: .82rem;
    font-weight: 700;
    display: flex;
    gap: .7rem;
    align-items: center;
}
.landing-brand i { font-size: 1.6rem; color: #f6ad55; }
.landing-brand span { color: #f6ad55; }

.landing-eyebrow {
    margin-top: 4rem;
    color: #f6ad55;
    font-size: .75rem;
    letter-spacing: .18em;
    font-weight: 700;
    text-transform: uppercase;
}
@media (max-width: 850px) { .landing-eyebrow { margin-top: 2.5rem; } }

.landing-hero h1 {
    margin: 1rem 0;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: .98;
    letter-spacing: -.04em;
    color: #f7fafc;
}
.hero-accent { color: #667eea; }

.landing-copy {
    max-width: 36rem;
    color: #cbd5e1;
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.landing-features {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}
.landing-features span {
    border: 1px solid #334155;
    border-radius: 99px;
    padding: .6rem .85rem;
    color: #cbd5e1;
    font-size: .82rem;
}
.landing-features i { color: #f6ad55; margin-right: .35rem; }

/* ===== ACCESS CARD ===== */
.access-card {
    background: #f8fafc;
    color: #1e293b;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
}
.access-tabs {
    display: flex;
    gap: .4rem;
    background: #e2e8f0;
    padding: .3rem;
    border-radius: .7rem;
    margin-bottom: 1.5rem;
}
.access-tab {
    flex: 1;
    border: 0;
    border-radius: .5rem;
    padding: .7rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-weight: 700;
}
.access-tab.active {
    background: white;
    color: #4f46e5;
    box-shadow: 0 2px 5px rgba(0,0,0,.08);
}
.access-panel { display: none; }
.access-panel.active { display: block; }
.access-panel h2 {
    color: #1e293b;
    font-size: 1.3rem;
    margin: 0 0 .35rem;
}
.muted { color: #64748b; font-size: .9rem; margin-bottom: 1.2rem; }
.access-panel label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #475569;
    margin-top: .8rem;
}
.access-panel input, .access-panel select {
    margin-top: .35rem;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: .55rem;
    padding: .75rem;
    font: inherit;
    font-size: 1rem;
}
.access-panel input:focus { outline: 2px solid #818cf8; border-color: #6366f1; }
.access-panel input[readonly] { background: #f1f5f9; }
.access-button {
    width: 100%;
    justify-content: center;
    margin-top: 1.2rem;
    padding: .8rem;
    font-weight: 700;
    font-size: .95rem;
}
.access-message {
    min-height: 1.3rem;
    margin: 1rem 0 0;
    font-size: .85rem;
    color: #64748b;
}
.access-message.error { color: #dc2626; }
.access-message.success { color: #15803d; }

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.2rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    transition: all .2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, .4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, .5);
}

/* ===== SIMULATORS SECTION ===== */
.landing-simulators {
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 3rem 0;
}
.landing-simulators .section-title {
    color: #f1f5f9;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.landing-simulators .section-subtitle {
    color: #94a3b8;
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}
.simulator-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: .85rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all .2s;
}
.simulator-card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
    transform: translateX(4px);
}
.simulator-icon {
    font-size: 2.5rem;
    color: #667eea;
    min-width: 44px;
}
.simulator-info h3 { margin: 0 0 4px; color: #f1f5f9; font-size: 1.15rem; }
.simulator-info p { color: #94a3b8; font-size: .85rem; margin: 0; }
.simulator-req {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    background: #334155;
    color: #cbd5e1;
    white-space: nowrap;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    background: #1e293b;
    padding: 4rem 20px;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}
.section-subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    background: #101827;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all .2s;
}
.feature-card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
}
.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.4rem;
}
.feature-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; color: #f1f5f9; }
.feature-card p { color: #94a3b8; font-size: .9rem; line-height: 1.6; }

/* ===== FINANCING SECTION ===== */
.landing-fund-section {
    background: #1e293b;
    padding: 3rem 20px;
    text-align: center;
}
.landing-fund-section-head { margin-bottom: 2rem; }
.landing-fund-section h2 {
    color: #f1f5f9;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.landing-fund-section .landing-copy {
    max-width: 700px;
    margin: 0 auto;
}

.fund-milestones-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
}
@media (max-width: 900px) { .fund-milestones-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .fund-milestones-list { grid-template-columns: 1fr; } }

.fund-milestone-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: .85rem;
    padding: 1.4rem 1.15rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.fund-milestone-icon {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4f46e5;
    color: white;
    border-radius: .55rem;
    font-size: 1.05rem;
}
.fund-milestone-body { flex: 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.fund-milestone-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.fund-milestone-top h4 { font-size: 1.02rem; color: #f1f5f9; margin: 0; }
.fund-milestone-body p { color: #94a3b8; font-size: .82rem; margin: 0; }
.fund-milestone-badge {
    align-self: flex-start;
    font-size: .7rem;
    font-weight: 700;
    padding: .22rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}
.fund-milestone-badge.planned { background: #334155; color: #e2e8f0; }
.fund-milestone-badge.in_progress { background: #78350f; color: #fef08a; }
.fund-milestone-badge.done { background: #065f46; color: #bbf7d0; }

.fund-milestone-progress { margin-top: .75rem; }
.fund-milestone-progress .progress-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
}
.fund-milestone-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
}
.fund-milestone-amount { font-size: .75rem; color: #94a3b8; margin-top: .25rem; }

.fund-revolut-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1.4rem 1.6rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.fund-revolut-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #1e40af;
    color: white;
    font-weight: 600;
    font-size: .9rem;
    padding: .55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid #2563eb;
}
.fund-revolut-badge i { color: #f87171; }

.fund-back-to-top {
    display: flex;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.fund-back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #334155;
    color: #cbd5e1;
    border: 1px solid #475569;
    border-radius: 999px;
    padding: .5rem 1rem;
    font-size: .85rem;
    text-decoration: none;
    transition: all .2s;
}
.fund-back-to-top a:hover {
    background: #4f46e5;
    color: white;
    border-color: #6366f1;
}

.landing-fund-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 1.5rem auto 0;
    padding: .7rem 1.6rem;
    background: transparent;
    border: 1px solid #475569;
    border-radius: 999px;
    color: #94a3b8;
    font-size: .85rem;
    text-decoration: none;
}
.landing-fund-btn:hover { border-color: #f6ad55; color: #f6ad55; }
.landing-fund-btn i { color: #f87171; }

/* ===== FOOTER ===== */
.landing-footer {
    text-align: center;
    color: #94a3b8;
    padding: 1.2rem;
    font-size: .85rem;
}

/* ===== TOAST ===== */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: .75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: all .3s ease;
    color: #1e293b;
    font-weight: 500;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.success { background: #dcfce7; color: #166534; }
#toast.error { background: #fee2e2; color: #991b1b; }

/* ===== Header for logged-out landing ===== */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(16, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    z-index: 1000;
    padding: 12px 0;
}
.landing-header .header-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.landing-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #f7fafc;
}
.landing-header .logo i { color: #667eea; }
.landing-header .logo span { color: #f6ad55; }
.landing-header .nav { display: flex; gap: 20px; }
.landing-header .nav-link {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all .3s ease;
}
.landing-header .nav-link:hover { color: #667eea; }
.landing-header .admin-link { color: #f6ad55; font-weight: 600; }
