

body { min-height: 100vh; overflow-x: hidden; }

/* ===== NAVBAR ===== */
/* la base está en /css/navbar.css; aquí solo el desenfoque y la línea inferior */
.navbar { backdrop-filter: blur(20px); border-bottom: 1px solid rgba(123, 45, 53, 0.3); }

/* ===== FOOTER ===== */
/* la base está en /css/footer.css; aquí solo se sube de capa */
.footer { position: relative; z-index: 1; }

/* ===== HERO ===== */
.hero {
    padding: 8rem 2rem 3rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(123, 45, 53, 0.15) 0%, transparent 70%);
    pointer-events: none;
}


.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--cream);
    opacity: 0.55;
    max-width: 550px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
}

/* ===== CALCULATOR ===== */
.calculator-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.calc-card {
    background: rgba(42, 16, 21, 0.7);
    border: 1px solid rgba(123, 45, 53, 0.25);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.calc-inputs { display: flex; flex-direction: column; gap: 1.5rem; }

.input-group { position: relative; }

.input-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.input-label label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--cream);
    opacity: 0.8;
}

.editable-display {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(201, 168, 76, 0.3);
    color: var(--gold);
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    width: 110px;
    outline: none;
    cursor: text;
    transition: border-color 0.2s;
    padding-bottom: 1px;
}
.editable-display:hover { border-bottom-color: rgba(201, 168, 76, 0.7); }
.editable-display:focus { border-bottom: 1px solid var(--gold); background: rgba(201, 168, 76, 0.05); border-radius: 3px 3px 0 0; }

/* ocultar el input grande y el range-value estático */

/* el input-label ahora lleva el editable-display alineado a la derecha */
.input-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }

/* Range Slider */
.range-container {
    margin-top: 0.5rem;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(123, 45, 53, 0.3);
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
    transition: transform 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--cream);
    opacity: 0.55;
}

/* ===== RESULTS ===== */
.calc-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-main {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(26, 10, 14, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(123, 45, 53, 0.15);
    transition: border-color 0.3s;
}

.result-main:hover { border-color: rgba(201, 168, 76, 0.2); }

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--cream);
    opacity: 0.55;
    margin-bottom: 0.5rem;
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
}

.result-value {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.2;
    transition: all 0.5s;
}

.result-subtitle {
    font-size: 0.85rem;
    color: var(--cream);
    opacity: 0.55;
    margin-top: 0.5rem;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.detail-card {
    padding: 1rem;
    background: rgba(26, 10, 14, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(123, 45, 53, 0.1);
    text-align: center;
}

.detail-value {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-value.loss { color: var(--danger); }

.detail-value.gold { color: var(--gold); }

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cream);
    opacity: 0.55;
}

/* Chart */
.result-chart {
    height: 160px;
    position: relative;
    margin-top: 0.5rem;
}

.result-chart canvas {
    width: 100%;
    height: 100%;
}

/* ===== SCENARIOS ===== */
.scenarios-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--gold);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.scenario-card {
    background: rgba(42, 16, 21, 0.5);
    border: 1px solid rgba(123, 45, 53, 0.2);
    border-radius: 14px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.scenario-card:hover { border-color: rgba(201, 168, 76, 0.3); transform: translateY(-3px); }
.scenario-card:hover::before { opacity: 0.5; }

.scenario-card.active {
    border-color: var(--gold);
    background: rgba(42, 16, 21, 0.8);
}

.scenario-card.active::before { opacity: 1; }

.scenario-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.scenario-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.scenario-rate {
    font-size: 0.8rem;
    color: var(--gold);
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}

.scenario-desc {
    font-size: 0.8rem;
    color: var(--cream);
    opacity: 0.55;
    line-height: 1.5;
}

/* ===== FACTS ===== */
.facts-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.fact-card {
    background: rgba(42, 16, 21, 0.4);
    border: 1px solid rgba(123, 45, 53, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.fact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.fact-text h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.fact-text p {
    font-size: 0.8rem;
    color: var(--cream);
    opacity: 0.55;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    .facts-grid {
        grid-template-columns: 1fr;
    }
    .calc-card {
        padding: 1.5rem;
    }
    .result-value {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .result-details {
        grid-template-columns: 1fr;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Number counter animation */
@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.pulse { animation: countPulse 0.4s ease; }
/* z-index contenedores */
.hero, .calc-section, .info-section, section { position: relative; z-index: 1; }
