/* =========== LANDING SECTIONS (front page only) =========== */

:root {
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-lg: 32px;
    --radius-xl: 48px;
    --radius-pill: 999px;
    --color-tint: #EEF3F7;
}

/* --- Sections: bigger type & more air (yolki-style) --- */
.hp-section {
    padding: 96px 0;
}
.hp-section__title {
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.15;
}

.hp-section__subtitle {
    font-size: 16px;
    color: var(--color-text-light);
    margin: -20px 0 30px 0;
    max-width: 720px;
}
.hp-section--dark .hp-section__subtitle { color: rgba(255,255,255,0.7); }

/* --- Buttons: pill shape (front page only) --- */
.hp .hp-btn {
    border-radius: var(--radius-pill);
    padding: 16px 36px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- Hero: full-bleed slider, header floats on top --- */
.hp-hero {
    position: relative;
    background: #ffffff;
    padding: 0;
}
.hero-slider-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 0;
    border: 0;
    background: #e8ecf1;
}
.hero-slide__media {
    min-height: clamp(560px, 92vh, 980px);
}

/* --- Hero: title/text overlay on slide photo --- */
.hero-slide {
    position: relative;
}
.hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding-bottom: 140px;
    background: linear-gradient(180deg, rgba(10,20,30,0) 40%, rgba(10,20,30,0.6) 100%);
    pointer-events: none;
}
.hero-slide__overlay-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    color: #fff;
}
.hero-slide__overlay-title {
    font-size: clamp(32px, 6.5vw, 84px);
    font-weight: 700;
    line-height: 1.07;
    letter-spacing: -0.01em;
    margin: 0 0 20px 0;
    max-width: 16ch;
    text-shadow: 0 2px 20px rgba(0,0,0,0.35);
}
.hero-slide__overlay-text {
    font-size: clamp(15px, 1.6vw, 20px);
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
    opacity: 0.95;
    text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}

/* --- Hero stats plate --- */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 32px;
}
.hero-stat {
    text-align: left;
    padding: 0;
    border-top: 1px solid var(--color-border, rgba(0,0,0,0.1));
    padding-top: 16px;
}
.hero-stat__value {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 6px;
    line-height: 1.1;
}
.hero-stat__label {
    font-size: 14px;
    color: var(--color-text-light);
}

/* --- Hero stats: overlapping bar (yolki-style) --- */
.hero-stats--bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(20, 40, 70, 0.12);
    margin-top: -88px;
    padding: 32px 8px;
    position: relative;
    z-index: 3;
}
.hero-stats--bar .hero-stat {
    flex: 1 1 0;
    border-top: 0;
    padding: 0 24px;
    text-align: center;
    border-right: 1px solid var(--color-border, rgba(0,0,0,0.08));
}
.hero-stats--bar .hero-stat:last-child {
    border-right: 0;
}
.hero-stats--bar .hero-stat__value {
    font-size: clamp(28px, 3.2vw, 40px);
}

/* --- О проекте --- */
.about-text {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.8;
    max-width: 780px;
    margin-bottom: 20px;
}
.about-text p { margin: 0 0 16px 0; }

/* Project rows: alternating large photo + text */
.project-rows {
    display: flex;
    flex-direction: column;
    gap: 64px;
    margin-top: 48px;
}
.project-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}
.project-row--reverse {
    grid-template-columns: 1fr 1.2fr;
}
.project-row--reverse .project-row__media { order: 2; }
.project-row--reverse .project-row__body { order: 1; }

.project-row__media {
    aspect-ratio: 4/3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-bg-gray);
}
.project-row__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-row__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 14px;
}
.project-row__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
}
.project-row__text {
    font-size: 16px;
    color: var(--color-text-light);
    line-height: 1.8;
}
.project-row__text p { margin: 0 0 16px 0; }

/* --- Преимущества (01-04) --- */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.advantage-card {
    background: var(--color-tint);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: left;
}
.advantage-card__number {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}
.advantage-card__image {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}
.advantage-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.advantage-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.advantage-card__text {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
}

/* --- Квартиры (тизер) --- */
.flats-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.flat-teaser-card {
    display: block;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.25s, box-shadow 0.25s;
}
.flat-teaser-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    color: var(--color-text);
}
.flat-teaser-card__img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-bg-gray);
}
.flat-teaser-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.flat-teaser-card__body {
    padding: 20px 24px;
}
.flat-teaser-card__meta {
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 6px;
}
.flat-teaser-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.flat-teaser-card__price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}
.flat-teaser-card__info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-light);
}

.hp-section__cta {
    text-align: center;
}

/* --- Рядом / Расположение --- */
.nearby-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.amenities-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.amenities-list__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1));
    font-size: 17px;
}
.amenities-list__item:first-child {
    border-top: 1px solid var(--color-border, rgba(0,0,0,0.1));
}
.amenities-list__label {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    font-weight: 600;
}
.amenities-list__label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-accent);
    transform: translateY(-2px);
}
.amenities-list__distance {
    color: var(--color-text-light);
    font-size: 14px;
    white-space: nowrap;
}
.location-map {
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-bg-gray);
}
.location-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* --- Ход строительства --- */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.progress-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-gray);
}
.progress-card__link {
    position: absolute;
    inset: 0;
    z-index: 2;
}
.progress-card__img {
    aspect-ratio: 4/3;
}
.progress-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.progress-card__date {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1;
    padding: 8px 16px;
    background: #fff;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
}

/* --- Визуализация --- */
.viz-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.viz-tab {
    padding: 10px 24px;
    border: 1px solid var(--color-border, rgba(0,0,0,0.15));
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
    font-family: var(--font);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.viz-tab:hover {
    border-color: var(--color-accent);
}
.viz-tab.is-active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.viz-panel {
    display: none;
}
.viz-panel.is-active {
    display: grid;
}

/* --- Галерея / визуализация: сетка изображений --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.gallery-item {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-bg-gray);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox overlay (injected by landing.js) */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
}
.gallery-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}
.gallery-lightbox__close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.gallery-lightbox__close:hover {
    background: rgba(255,255,255,0.3);
}

/* --- Контакты --- */
.contacts-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.contacts-info__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.contacts-info__label {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.contacts-info__value {
    font-size: 17px;
}
.contacts-maps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}
.hp-section--dark .contacts-maps .hp-btn--outline {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.hp-section--dark .contacts-maps .hp-btn--outline:hover {
    border-color: #fff;
}

/* --- Форма заявки --- */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 480px;
}
.lead-form input,
.lead-form textarea {
    padding: 14px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-family: var(--font);
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.lead-form textarea {
    border-radius: var(--radius-md);
}
.lead-form input::placeholder,
.lead-form textarea::placeholder {
    color: rgba(255,255,255,0.4);
}
.lead-form input:focus,
.lead-form textarea:focus {
    border-color: var(--color-accent);
}
.lead-form button {
    align-self: flex-start;
}
.lead-form-msg {
    margin-top: 14px;
    font-size: 14px;
    color: #6fcf97;
}

/* --- Scroll reveal --- */
@media (prefers-reduced-motion: no-preference) {
    .hp-section,
    .hero-stats {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .hp-section.is-visible,
    .hero-stats.is-visible {
        opacity: 1;
        transform: none;
    }
}

/* =========== RESPONSIVE =========== */
@media (max-width: 1024px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stats--bar { flex-wrap: wrap; }
    .hero-stats--bar .hero-stat {
        flex: 1 1 50%;
        border-right: 0;
        border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.08));
        padding: 16px 24px;
    }
    .hero-stats--bar .hero-stat:nth-last-child(-n+2) { border-bottom: 0; }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .project-row,
    .project-row--reverse { grid-template-columns: 1fr; }
    .project-row--reverse .project-row__media,
    .project-row--reverse .project-row__body,
    .project-row .project-row__media,
    .project-row .project-row__body { order: initial; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .progress-grid { grid-template-columns: repeat(2, 1fr); }
    .flats-teaser-grid { grid-template-columns: repeat(2, 1fr); }
    .nearby-layout { grid-template-columns: 1fr; }
    .contacts-layout { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-stats--bar {
        margin-top: -48px;
        padding: 8px 24px;
    }
    .hero-stats--bar .hero-stat {
        flex: 1 1 100%;
        border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.08));
        border-right: 0;
        padding: 18px 0;
        text-align: left;
    }
    .hero-stats--bar .hero-stat:last-child { border-bottom: 0; }
    .hero-slide__overlay { padding-bottom: 80px; }
    .advantages-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .progress-grid { grid-template-columns: 1fr; }
    .flats-teaser-grid { grid-template-columns: 1fr; }
    .lead-form { max-width: none; }
    .project-rows { gap: 40px; }
}
