:root {
    --bg-top: #C0C0C0;
    --bg-bottom: #f2f2f2;
    --accent: #d4af37;
    --text-dark: #333333;
    --grid-color: rgba(0, 0, 0, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-bottom);
}

.ae-grid-overlay {
    display: none;
}

.ae-main {
    display: block;
    height: auto;
    min-height: 0;
    position: relative;
    z-index: 2;
}

/* Hero */
.ae-hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-top);
    min-height: 38vh;
    height: auto;
    padding: 72px 16px 32px;
}

.ae-watermark {
    position: absolute;
    font-size: 18vw;
    font-weight: 900;
    color: rgba(255,255,255,0.05);
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: 2;
}

.ae-logo-container {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ae-dynamic-logo {
    width: min(220px, 82vw);
    height: auto;
    will-change: transform;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.ae-accent-line {
    display: none;
}

.ae-back-link {
    position: absolute;
    top: 16px;
    left: 16px;
    text-decoration: none;
    color: #fff;
    font-size: 9px;
    letter-spacing: 1.5px;
    font-weight: 700;
    z-index: 5;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.ae-top-contacts-link {
    position: absolute;
    top: 16px;
    right: 16px;
    text-decoration: none;
    color: #fff;
    font-size: 9px;
    letter-spacing: 1.5px;
    font-weight: 700;
    z-index: 5;
    text-transform: uppercase;
    transition: color 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.ae-top-contacts-link:hover {
    color: var(--accent);
}

.ae-top-contacts-link i {
    color: var(--accent);
    margin-right: 6px;
}

/* Cards — stacked by default (mobile) */
.ae-grid-bottom {
    display: block;
    height: auto;
    position: relative;
}

.ae-grid-bottom::after {
    display: none;
}

.ae-card {
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 24px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.ae-card:last-child {
    border-bottom: none;
}

.ae-card-content {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 10;
    transition: color 0.5s;
    padding: 0;
    min-height: 0;
}

.ae-card-title {
    font-size: 1.15rem;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    padding: 0 16px;
}

.ae-card-description {
    max-width: min(280px, 85vw);
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.5;
    opacity: 0.7;
    max-height: none;
    overflow: visible;
    margin-top: 12px;
    transform: none;
}

.ae-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.ae-hero-top .ae-video-wrapper {
    opacity: 1;
}

.ae-card.active .ae-video-wrapper,
.ae-card:hover .ae-video-wrapper {
    opacity: 1;
}

.ae-card.active .ae-card-content,
.ae-card:hover .ae-card-content {
    color: #fff;
}

.ae-video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.ae-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1023px) {
    .ae-hero-top {
        min-height: 42vh;
        padding: 88px 20px 40px;
    }

    .ae-dynamic-logo {
        width: min(280px, 78vw);
    }

    .ae-back-link,
    .ae-top-contacts-link {
        top: 20px;
        font-size: 10px;
        letter-spacing: 2px;
    }

    .ae-back-link { left: 20px; }
    .ae-top-contacts-link { right: 20px; }

    .ae-card {
        padding: 28px 20px;
    }

    .ae-card-title {
        font-size: 1.35rem;
        letter-spacing: 3px;
    }

    .ae-card-description {
        font-size: 0.8rem;
    }
}

/* Desktop — split viewport layout */
@media (min-width: 1024px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }

    .ae-main {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    .ae-hero-top {
        flex: 0 0 calc(50vh + 120px);
        min-height: 0;
        padding: 0;
    }

    .ae-watermark {
        font-size: 15vw;
    }

    .ae-dynamic-logo {
        width: 480px;
    }

    .ae-back-link {
        top: 30px;
        left: 30px;
        font-size: 10px;
        letter-spacing: 2px;
        min-height: 0;
        display: block;
    }

    .ae-top-contacts-link {
        top: 30px;
        right: 30px;
        font-size: 10px;
        letter-spacing: 2px;
        min-height: 0;
        display: block;
    }

    .ae-grid-bottom {
        flex: 1;
        display: flex;
        height: auto;
    }

    .ae-grid-bottom::after {
        content: '';
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 30px;
        bottom: 30px;
        width: 1px;
        background-color: var(--accent);
        z-index: 15;
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.4s ease;
    }

    .ae-grid-bottom:hover::after {
        opacity: 0;
    }

    .ae-card {
        flex: 1;
        display: block;
        width: auto;
        height: auto;
        min-height: 0;
        padding: 0;
        border-bottom: none;
        transition: flex 1s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .ae-card:hover {
        flex: 2.5;
    }

    .ae-card-content {
        position: absolute;
        inset: 0;
        justify-content: center;
    }

    .ae-card-title {
        font-size: 2.5rem;
        letter-spacing: 5px;
        padding: 0;
    }

    .ae-card-description {
        max-width: 250px;
        font-size: 0.8rem;
        line-height: 1.6;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        margin-top: 0;
        transform: translateY(10px);
        transition: opacity 0.5s ease, max-height 0.5s ease, transform 0.5s ease, margin-top 0.5s ease;
    }

    .ae-card:hover .ae-card-description {
        opacity: 0.7;
        max-height: 150px;
        margin-top: 15px;
        transform: translateY(0);
    }

    .ae-card:hover .ae-video-wrapper {
        opacity: 1;
    }
}
