/* =========================================
   OSTROV — landing and section layout

   Ported from the pre-WordPress main.css. Design tokens now live in
   theme.json and are aliased in tokens.css, which must load first.
   ========================================= */

/* =========================================
   Gutenberg spacing reset

   Core global styles put `margin-block-start: 24px` between sibling blocks.
   Every container below already spaces its children — through `gap`, or
   through margins the design sets deliberately — so the two rules stack and
   every card grows taller than the original layout.

   Scoped to the design components on purpose: inside post content (a case
   study, say) the core rhythm is exactly what an editor expects.
   ========================================= */
.glass-card > *,
.glass-banner > *,
.dual-col .col-left > *,
.dual-col .col-right > *,
.list-column > *,
.numbered-list > *,
.bullet-list > *,
.plain-list > *,
.hero-center > *,
.section-header > *,
.messenger-icons > *,
.contact-row > *,
.section-content > * {
    margin-block-start: 0;
}

.section {
    min-height: 100vh;
    padding: 0;
    /* Padding is now on .section-content */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Screen 1: Hero */
.screen-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-center {
    order: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 10vh;
    /* Сдвинем чуть вниз для центрирования */
}

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    /* Black */
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;

    /* Эффект глубокого синего свечения из макета OSTROV */
    text-shadow:
        0 0 10px rgba(var(--color-accent-rgb), 0.8),
        0 0 25px rgba(var(--color-accent-rgb), 0.6),
        0 0 50px rgba(var(--color-accent-rgb), 0.4),
        0 0 80px rgba(var(--color-accent-rgb), 0.2),
        0 0 120px rgba(var(--color-accent-rgb), 0.1);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    /* Very wide tracking */
    color: var(--color-text-muted);
}

.hero-bottom {
    text-align: center;
    padding-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-seo-title {
    order: 2;
    margin: 0;
    margin-top: auto;
    padding: 0 1.5rem 2rem;
    max-width: 900px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.5;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* Common Section Styles */
.section-header {
    margin-bottom: 2rem;
}

.section-header.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-header.center .section-description {
    margin-bottom: 0;
}

.section-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;

    /* Умеренный воздушный синий неон для внутренних заголовков */
    text-shadow:
        0 0 10px rgba(var(--color-accent-rgb), 0.7),
        0 0 25px rgba(var(--color-accent-rgb), 0.5),
        0 0 50px rgba(var(--color-accent-rgb), 0.3),
        0 0 80px rgba(var(--color-accent-rgb), 0.15);
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px var(--color-accent);
    /* Neon glow */
}

.section-description {
    font-size: 1.5rem;
    font-weight: 700;
    max-width: 800px;
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 3rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Grid Layouts */
.glass-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

/* Used for CREATE, GROW, UNITE to swap sides */
.layout-list-card {
    grid-template-columns: 1fr 1.2fr;
}

.layout-card-list {
    grid-template-columns: 1.2fr 1fr;
}

/* Glass Card */
.glass-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Dual Column inside Glass Card */
.glass-card.dual-col {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.dual-col .col-left,
.dual-col .col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dual-col p {
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: left;
}

.vertical-divider {
    width: 2px;
    background: var(--color-accent);
    opacity: 0.7;
    box-shadow: 0 0 8px var(--color-accent);
}

/* Lists */
.numbered-list,
.bullet-list,
.plain-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

/* Bullet markers (glowing spheres) */
.list-column {
    display: flex;
    align-items: center;
    /* Center list vertically beside card */
}

.bullet-list li {
    position: relative;
    padding-left: 2.5rem;
    font-size: 1.2rem;
    line-height: 1.5;
}

.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent), inset 0 0 5px #fff;
}

.plain-list li {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-glass-border);
}

.plain-list li:last-child {
    border-bottom: none;
}

/* Numbered specific */
.numbered-list li {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.numbered-list .num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-accent);
    line-height: 1;
    text-shadow: 0 0 15px rgba(var(--color-accent-rgb), 0.4);
}

/*
 * Numbers are generated, not typed. Storing 01…06 as block attributes means
 * they go stale the moment an editor drags an item to a new position; a
 * counter always matches the rendered order.
 *
 * The counter is reset on the grid, not on the list, because the ABOUT
 * section runs 01-06 across two separate cards.
 */
.glass-grid-2,
.numbered-list {
    counter-reset: ostrov-num;
}

.glass-grid-2 .numbered-list,
.numbered-list.is-continued {
    counter-reset: none;
}

.numbered-list .num::before {
    counter-increment: ostrov-num;
    content: counter(ostrov-num, decimal-leading-zero);
}

.numbered-list p {
    font-size: 1.15rem;
}

/* Values & Contacts components */
.card-title {
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.glass-banner {
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.2), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-accent);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
}

.glass-banner h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.contact-row {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.contact-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.contact-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-value:hover {
    color: var(--color-accent);
}

.flex-col {
    display: flex;
    flex-direction: column;
}

/* Messenger Icons */
.messenger-icons {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-glass-border);
}

.messenger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    transition: all var(--transition-base);
}

.messenger-icon svg {
    width: 22px;
    height: 22px;
}

.messenger-icon:hover {
    color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.15);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--color-accent-rgb), 0.3);
}

@media (max-width: 1024px) {
    .glass-grid-2 {
        gap: 2rem;
    }

    .glass-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    /* Сглаживаем огромные десктопные отступы */
    .mt-4 {
        margin-top: 2rem !important;
    }

    /* Уменьшаем расстояние между карточками (gap) */
    .glass-grid-2 {
        gap: 2rem !important;
    }

    /* Уменьшаем внутренние падинги карточек */
    .glass-card, .glass-banner {
        padding: 1.5rem;
        border-radius: 16px;
    }

    /* Stack grid columns on mobile */
    .glass-grid-2,
    .layout-list-card,
    .layout-card-list {
        grid-template-columns: 1fr;
    }

    .glass-card.dual-col {
        flex-direction: column;
        gap: 1.5rem;
    }

    .vertical-divider {
        width: 100%;
        height: 2px;
        margin: 1rem 0;
    }

    .hero-title {
        font-size: 4rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-description {
        font-size: 1.25rem;
    }

    .list-column {
        order: -1;
        /* Move list above card on mobile optionally */
        margin-bottom: 2rem;
    }
}

/* =========================================
   STANDARD LAYOUT (NO STICKY OVERLAP)
   ========================================= */

#sticky-container {
    position: relative;
    width: 100%;
}

/* Sections stack in normal flow, one screen each. */
.section {
    position: relative;
    /*
     * A local stacking context. Without it the background below would need
     * z-index: -1 to sit behind the content, which paints it behind the
     * PARENT's background too — and Gutenberg wraps blocks in containers that
     * may have their own background or a transform/backdrop-filter of their
     * own (.site-header and .glass-card both use backdrop-filter). Isolating
     * here keeps the three layers ordered no matter what wraps the section.
     */
    isolation: isolate;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Auto-height variant for inner pages and short sections. */
.section.is-auto-height {
    min-height: 0;
}

.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * Backgrounds are real <img> elements now, not CSS background-image: that
 * buys srcset/sizes, so phones stop downloading the 2-3 MB originals.
 */
.section-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Усиленный вертикальный градиент: чёрный → полупрозрачный → чёрный */
    background:
        linear-gradient(to bottom,
            rgba(5, 5, 5, 1) 0%,
            rgba(5, 5, 5, 0.85) 8%,
            rgba(10, 20, 40, 0.5) 35%,
            rgba(10, 20, 40, 0.5) 65%,
            rgba(5, 5, 5, 0.85) 92%,
            rgba(5, 5, 5, 1) 100%);
    z-index: 1;
}

.section-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: var(--spacing-section);
    padding-bottom: var(--spacing-section);
}
