/* ============ calc.html — интерактивный калькулятор потерь ============ */

html { overflow-x: hidden; }
body { overflow-x: hidden; }

.calc-hero { text-align: center; padding-top: 8rem; padding-bottom: 3rem; }
.calc-hero-badge {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid rgba(255,92,92,0.3);
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.8rem;
    backdrop-filter: blur(10px);
}
.calc-hero-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    max-width: 880px;
    margin: 0 auto 1.4rem;
    letter-spacing: -0.02em;
}
.calc-hero-lead {
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === сетка калькулятора === */
.calc-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) { .calc-wrap { grid-template-columns: 1fr; } }

/* === левая колонка — ввод данных === */
.calc-inputs {
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    backdrop-filter: blur(12px);
}
.calc-inputs h2 { font-size: 1.3rem; margin-bottom: 1.6rem; }
.calc-field { margin-bottom: 1.6rem; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.92rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}
.calc-field .field-value {
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    color: var(--cyan);
    font-size: 1.1rem;
}

/* === ползунки === */
.calc-field input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}
.calc-field input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    cursor: pointer;
    box-shadow: 0 0 16px rgba(52,234,210,0.5);
    border: 2px solid #041018;
    transition: transform 0.15s;
}
.calc-field input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.calc-field input[type=range]::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    cursor: pointer;
    box-shadow: 0 0 16px rgba(52,234,210,0.5);
    border: 2px solid #041018;
}

/* === правая колонка — результаты === */
.calc-results {
    position: sticky;
    top: 100px;
    padding: 2rem;
    background: linear-gradient(160deg, rgba(255,92,92,0.06), rgba(10,22,40,0.6));
    border: 1px solid rgba(255,92,92,0.2);
    border-radius: 22px;
    backdrop-filter: blur(12px);
}
@media (max-width: 900px) { .calc-results { position: static; } }
.calc-results-head { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; letter-spacing: 0.02em; }

.calc-big-number {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    line-height: 1;
    background: linear-gradient(135deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
}
.calc-big-number .currency { font-size: 0.5em; opacity: 0.8; }
.calc-big-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.8rem; }

/* мелкие метрики */
.calc-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}
.calc-metric {
    padding: 1rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.calc-metric-num {
    font-family: 'Unbounded', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--orange);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.calc-metric-label { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

/* CTA снизу результатов */
.calc-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.02rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #041018;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(52,234,210,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.calc-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(52,234,210,0.4); }

/* === блок-разбивка «куда уходят деньги» === */
.calc-breakdown { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.calc-breakdown-title { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.8rem; }
.calc-bar-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; font-size: 0.82rem; }
.calc-bar-label { width: 130px; flex-shrink: 0; color: var(--text); }
.calc-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.calc-bar-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.calc-bar-val { width: 60px; flex-shrink: 0; text-align: right; color: var(--muted); font-weight: 600; }

/* === подсказки/легенда === */
.calc-hint {
    margin-top: 3rem;
    padding: 1.2rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--cyan);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}
.calc-hint strong { color: var(--text); }

/* === секция «что делать» === */
.calc-what {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    margin-top: 1rem;
}
@media (max-width: 640px) { .calc-what { grid-template-columns: 1fr; } }
.calc-what-card {
    padding: 1.6rem 1.4rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    backdrop-filter: blur(10px);
}
.calc-what-card .cw-ico { font-size: 1.8rem; margin-bottom: 0.7rem; display: block; }
.calc-what-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.calc-what-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* === анимация пульсации большой цифры при изменении === */
.calc-big-number.flash { animation: calcFlash 0.4s ease; }
@keyframes calcFlash { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
