/* ===================================================
   ЭТАЖИ ЛИПЕЦК — style.css
   Fonts: Unbounded (headings) + Onest (body)
=================================================== */

/* ===== VARIABLES ===== */
:root {
    --red-primary: #E31E24;
    --red-dark: #C0191F;
    --red-gradient: linear-gradient(135deg, #E31E24 0%, #FF4B51 100%);
    --bg-white: #ffffff;
    --bg-light: #F7F8FA;
    --text-dark: #111318;
    --text-gray: #5F6470;
    --text-light: #9AA0AD;
    --border: rgba(0, 0, 0, 0.07);
    --shadow-soft: 0 8px 40px -8px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 24px 56px -12px rgba(227, 30, 36, 0.18);
    --radius-xl: 36px;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Onest', 'Arial', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.65;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: 'Unbounded', sans-serif;
    line-height: 1.15;
    font-weight: 800;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ===== SECTIONS ===== */
.section { padding: 110px 0; }
.section:nth-child(odd) { background: var(--bg-white); }
.section:nth-child(even) { background: var(--bg-light); }

.section-header { text-align: center; margin-bottom: 72px; }
.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--red-primary);
    margin-bottom: 14px;
    font-family: 'Onest', sans-serif;
}
.section-title {
    font-size: clamp(32px, 4.5vw, 50px);
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}
.section-subtitle {
    font-size: 17px;
    color: var(--text-gray);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 14px 0;
    transition: var(--transition);
}
.nav.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-soft);
}
.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.logo {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 26px;
    color: var(--red-primary);
    letter-spacing: -1px;
}
.nav-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-location {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}
.nav-phone {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
    transition: color 0.2s;
}
.nav-phone:hover { color: var(--red-primary); }
.btn-nav {
    padding: 12px 24px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 36px;
    border-radius: var(--radius-sm);
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s;
}
.btn:hover::after { background: rgba(255, 255, 255, 0.12); }

.btn-primary {
    background: var(--red-gradient);
    color: white;
    box-shadow: 0 8px 24px rgba(227, 30, 36, 0.28);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(227, 30, 36, 0.36);
}
.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--red-primary);
    color: var(--red-primary);
    transform: translateY(-2px);
}
.btn-large { width: 100%; padding: 22px; font-size: 17px; }
.btn-sm { padding: 12px 22px; font-size: 14px; }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 90px;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.05) 0%, transparent 65%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -10%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(227, 30, 36, 0.04) 0%, transparent 65%);
    pointer-events: none;
}
.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 72px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(227, 30, 36, 0.08);
    color: var(--red-primary);
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 28px;
    border: 1px solid rgba(227, 30, 36, 0.18);
}
.hero-title {
    font-size: clamp(46px, 7vw, 74px);
    letter-spacing: -3px;
    margin-bottom: 28px;
    line-height: 1.0;
}
.hero-title span { color: var(--red-primary); display: block; }
.hero-description {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 36px;
    max-width: 500px;
    line-height: 1.65;
}

/* Search Box */
.hero-search {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    margin-bottom: 36px;
}
.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.search-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    font-family: 'Onest', sans-serif;
}
.search-field select {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #EBEBEB;
    border-radius: 12px;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239AA0AD' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}
.search-field select:focus { outline: none; border-color: var(--red-primary); }
.search-btn { margin-top: 0; }

/* Trust Badges */
.trust-badges { display: flex; gap: 36px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-icon {
    width: 48px; height: 48px;
    background: rgba(227, 30, 36, 0.08);
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.trust-text strong { display: block; font-size: 20px; font-family: 'Unbounded', sans-serif; }
.trust-text span { font-size: 12px; color: var(--text-gray); }

/* Hero Visual */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-main-img {
    width: 100%;
    max-width: 700px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    animation: floatHero 7s ease-in-out infinite;
    border: 5px solid white;
    object-fit: cover;
    aspect-ratio: 4/3;
}
.hero-sub-img {
    position: absolute;
    bottom: -36px;
    left: -28px;
    width: 250px;
    border-radius: var(--radius-md);
    border: 4px solid white;
    box-shadow: var(--shadow-soft);
    animation: floatHero 9s ease-in-out infinite reverse;
    z-index: 2;
    object-fit: cover;
    aspect-ratio: 4/3;
}
@keyframes floatHero {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(0.8deg); }
}

/* ===== COUNTER SECTION ===== */
.counter-section {
    background: var(--red-gradient);
    color: white;
    padding: 72px 0;
}
.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.counter-item h4 {
    font-size: clamp(40px, 5.5vw, 54px);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 8px;
    font-family: 'Unbounded', sans-serif;
}
.counter-item p { font-size: 14px; opacity: 0.9; font-weight: 500; }

/* ===== CARDS ===== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.card {
    background: white;
    padding: 44px 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(227, 30, 36, 0.15);
}
.card:hover::before { transform: scaleX(1); }
.card-icon { font-size: 48px; margin-bottom: 20px; display: block; }
.card-title { font-size: 22px; margin-bottom: 12px; font-family: 'Unbounded', sans-serif; }
.card-text { font-size: 15px; color: var(--text-gray); line-height: 1.65; }

/* ===== QUIZ ===== */
.quiz-container {
    max-width: 820px;
    margin: 0 auto;
    background: white;
    padding: 64px 56px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}
.quiz-progress {
    width: 100%; height: 5px;
    background: #EDEFF3;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}
.quiz-progress-bar {
    height: 100%;
    background: var(--red-gradient);
    border-radius: 3px;
    transition: width 0.55s ease;
}
.quiz-step {
    font-size: 13px;
    font-weight: 700;
    color: var(--red-primary);
    margin-bottom: 28px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.quiz-screen { display: none; }
.quiz-screen.active { display: block; }
.quiz-question {
    font-size: clamp(22px, 3.5vw, 30px);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}
.room-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.room-option {
    padding: 26px 16px;
    border: 2px solid #EDEFF3;
    background: white;
    border-radius: var(--radius-md);
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    color: var(--text-dark);
}
.room-option:hover {
    border-color: var(--red-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(227, 30, 36, 0.1);
}
.room-option.selected {
    border-color: var(--red-primary);
    background: rgba(227, 30, 36, 0.06);
    color: var(--red-primary);
}
.quiz-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}
.quiz-nav .btn-secondary { flex: 1; }
.quiz-nav .btn-primary { flex: 2; }

/* Quiz Result */
.quiz-result-header { text-align: center; margin-bottom: 36px; }
.quiz-result-icon { font-size: 56px; margin-bottom: 16px; }
.quiz-result-text {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 460px;
    margin: 12px auto 0;
    line-height: 1.65;
}
.quiz-result-text strong { color: var(--red-primary); }
.quiz-form { display: flex; flex-direction: column; gap: 20px; }

/* ===== MORTGAGE ===== */
.mortgage-card {
    max-width: 820px;
    margin: 0 auto;
    background: white;
    padding: 64px 56px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}
.mortgage-header { text-align: center; margin-bottom: 48px; }
.mortgage-header h3 { font-size: 20px; margin-bottom: 8px; }
.rate-display {
    font-size: clamp(60px, 10vw, 84px);
    font-weight: 900;
    color: var(--red-primary);
    line-height: 1;
    margin: 12px 0;
    font-family: 'Unbounded', sans-serif;
    letter-spacing: -3px;
}
.rate-label { color: var(--text-gray); font-size: 15px; }

/* Sliders */
.slider-group { margin-bottom: 40px; }
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.slider-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
}
.slider-value { font-weight: 700; font-size: 20px; color: var(--red-primary); font-family: 'Unbounded', sans-serif; }
.slider {
    width: 100%;
    height: 7px;
    border-radius: 4px;
    background: #E8EAF0;
    outline: none;
    -webkit-appearance: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--red-gradient);
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(227, 30, 36, 0.4);
    transition: transform 0.2s;
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.18); }
.slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}
.payment-result {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid rgba(227, 30, 36, 0.1);
    margin-bottom: 36px;
}
.payment-label { font-size: 13px; color: var(--text-gray); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.payment-amount {
    font-size: clamp(34px, 5.5vw, 50px);
    font-weight: 900;
    color: var(--red-primary);
    font-family: 'Unbounded', sans-serif;
    letter-spacing: -2px;
}
.chart-container { height: 260px; }

/* ===== FLOORPLANS ===== */
.floorplans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
}
.floorplan-card { padding: 0; overflow: hidden; }
.floorplan-img-wrap {
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    border-bottom: 1px solid var(--border);
}
.floorplan-placeholder { font-size: 64px; }
.floorplan-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 20px;
}
.floorplan-info { padding: 28px 28px 32px; }
.floorplan-title { font-size: 20px; margin-bottom: 8px; font-family: 'Unbounded', sans-serif; }
.floorplan-area { font-size: 14px; color: var(--text-gray); margin-bottom: 6px; }
.floorplan-price { font-size: 22px; font-weight: 700; color: var(--red-primary); margin-bottom: 20px; font-family: 'Unbounded', sans-serif; }

/* ===== CONTACT FORM ===== */
.contact-container {
    max-width: 580px;
    margin: 0 auto;
    background: white;
    padding: 64px 52px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}
.contact-title { font-size: clamp(32px, 4vw, 42px); text-align: center; margin-bottom: 12px; letter-spacing: -1.5px; }
.contact-subtitle { text-align: center; font-size: 16px; color: var(--text-gray); margin-bottom: 48px; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-gray); text-transform: uppercase; letter-spacing: 1px; }
.form-input {
    padding: 18px 22px;
    border: 2px solid #EDEFF3;
    border-radius: var(--radius-sm);
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    background: white;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
    resize: vertical;
}
.form-input:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.07);
}
.form-input::placeholder { color: #B8BDCA; }
.form-disclaimer { text-align: center; font-size: 12px; color: var(--text-light); line-height: 1.55; margin-top: 8px; }
.form-disclaimer a { color: var(--red-primary); font-weight: 600; }

/* Success State */
.form-success {
    text-align: center;
    padding: 32px 0;
    display: none;
}
.form-success .success-icon { font-size: 56px; margin-bottom: 16px; }
.form-success h3 { font-size: 24px; margin-bottom: 10px; }
.form-success p { color: var(--text-gray); font-size: 15px; }

/* ===== FOOTER ===== */
.footer {
    background: #0D0F14;
    color: white;
    padding: 72px 0 36px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 48px;
    margin-bottom: 52px;
    padding-bottom: 52px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.footer-logo { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 900; color: var(--red-primary); margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    align-items: flex-start;
    justify-content: center;
}
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; font-weight: 500; }
.footer-links a:hover { color: white; }
.footer-contacts { text-align: right; }
.footer-phone { font-size: 18px; font-weight: 700; display: block; margin-bottom: 8px; transition: color 0.2s; }
.footer-phone:hover { color: var(--red-primary); }
.footer-contacts p { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-bottom {
    text-align: center;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,0.25);
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 52px; }
    .hero-description { margin: 0 auto 36px; }
    .hero-search { margin: 0 auto 36px; }
    .search-grid { grid-template-columns: 1fr 1fr; }
    .hero-sub-img { display: none; }
    .trust-badges { justify-content: center; }
    .hero-main-img { max-width: 480px; margin: 0 auto; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-contacts { text-align: left; }
}
@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .nav-controls .btn-nav { display: none; }
    .counter-grid { grid-template-columns: repeat(2, 1fr); }
    .room-options { grid-template-columns: repeat(2, 1fr); }
    .quiz-container, .mortgage-card, .contact-container { padding: 44px 28px; }
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
    .footer-contacts { text-align: left; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
    .section { padding: 60px 0; }
    .section-title { font-size: 26px; letter-spacing: -0.5px; }
    .section-subtitle { font-size: 15px; }
    .section-header { margin-bottom: 40px; }

    .hero { padding: 100px 0 60px; }
    .hero-title { font-size: 34px; letter-spacing: -1.5px; }
    .hero-description { font-size: 15px; margin-bottom: 24px; }
    .hero-badge { font-size: 12px; padding: 8px 16px; margin-bottom: 20px; }
    .hero-sub-img { display: none; }
    .hero-main-img { max-width: 100%; }

    .hero-search { padding: 16px; margin-bottom: 24px; }
    .search-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
    .search-field select { padding: 12px 14px; font-size: 14px; }

    .trust-badges { gap: 16px; justify-content: center; }
    .trust-icon { width: 40px; height: 40px; font-size: 18px; }
    .trust-text strong { font-size: 16px; }
    .trust-text span { font-size: 11px; }

    .counter-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .counter-item h4 { font-size: 32px; }
    .counter-item p { font-size: 12px; }
    .counter-section { padding: 48px 0; }

    .card { padding: 28px 22px; }
    .card-icon { font-size: 36px; margin-bottom: 14px; }
    .card-title { font-size: 18px; }
    .card-text { font-size: 14px; }

    .quiz-container, .mortgage-card, .contact-container { padding: 32px 20px; }
    .quiz-question { font-size: 20px; margin-bottom: 28px; }
    .room-options { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
    .room-option { padding: 18px 10px; font-size: 13px; }
    .quiz-nav { flex-direction: column; }
    .quiz-nav .btn-secondary, .quiz-nav .btn-primary { flex: none; width: 100%; }

    .rate-display { font-size: 52px; }
    .payment-amount { font-size: 30px; }
    .slider-value { font-size: 16px; }

    .floorplans-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .floorplan-img-wrap { height: 140px; }
    .floorplan-info { padding: 16px; }
    .floorplan-title { font-size: 15px; }
    .floorplan-price { font-size: 16px; margin-bottom: 12px; }

    .contact-title { font-size: 26px; }
    .contact-subtitle { font-size: 14px; margin-bottom: 28px; }
    .form-input { padding: 14px 16px; font-size: 15px; }
    .btn-large { padding: 18px; font-size: 15px; }

    .nav-location { display: none; }
    .nav-phone { font-size: 14px; }
    .logo { font-size: 22px; }

    .footer-top { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; font-size: 12px; }
}
