:root {
    --bg-paper: #F7F6F6;
    --stroke-color: #5D5E57;
    --text-color: #000000;
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-paper);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Эффект текстуры бумаги (шум SVG) */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    min-height: 90vh;
    /* Используем min-height вместо height для адаптивности */
    padding: 2rem 2rem 0;
    /* Уменьшаем внутренние отступы чтобы влезло */
    gap: 2rem;
}

/* --- Логотип с Ромбом --- */
.header-section {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    padding-left: 5%;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Отступ между 'dimcom' и ромбом */
}

.logo-text-dimcom {
    font-size: clamp(2rem, 4vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-color);
}

.diamond-shape {
    width: clamp(70px, 10vw, 110px);
    /* Адаптивный размер ромба */
    height: clamp(70px, 10vw, 110px);
    border: 5px solid var(--text-color);
    border-radius: 12px;
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

/* Возвращаем текст внутри ромба в ровное положение */
.logo-text-one {
    transform: rotate(-45deg);
    font-size: clamp(2rem, 4vw, 4.5rem);
    /* Размер шрифта как у 'dimcom' */
    font-weight: 700;
    letter-spacing: -0.05em;
    /* Убираем transition, чтобы JS-анимация скролла не лагала и не создавала желе-эффект */
}


/* --- Основной контент --- */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    /* Занимаем оставшееся место */
    gap: 2rem;
}


.left-section {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Картинка прижимается к низу */
}

.image-wrapper {
    display: flex;
    justify-content: center;
    /* Центрируем картинку по горизонтали */
    align-items: flex-end;
    height: 100%;
}

.hero-image {
    width: 100%;
    max-width: 700px;
    max-height: 70vh;
    /* Ограничиваем высоту картинки, чтобы она помещалась на небольших Desktop */
    object-fit: contain;
    /* Картинка масштабируется без обрезки */
    filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.05));
    align-self: flex-end;
    /* Убеждаемся что она внизу */
}

.right-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Опускаем меню немного вниз, отрывая от лого */
    align-items: center;
    /* Центрируем меню */
}


.surreal-menu {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 450px;
    /* Ограничиваем ширину меню */
}

.menu-item {
    width: 100%;
    height: clamp(70px, 8vh, 90px);
    /* Адаптивная высота кнопок */
    border: 4px solid var(--stroke-color);
    border-radius: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: border-radius 0.3s ease, border-color 0.3s ease;
    background-color: transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Смещение второй кнопки вправо, как на референсе */
.btn-1 {
    transform: translateX(0);
}

.btn-2 {
    transform: translateX(10%);
}

.btn-3 {
    transform: translateX(0);
}

.btn-text {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 500;
    text-transform: uppercase;
    transition: transform 0.2s;
    pointer-events: none;
}

/* --- Сюрреалистичная анимация --- */

.menu-item:hover,
.menu-item.mobile-hover {
    border-color: var(--text-color);
    animation: surreal-morph 0.9s infinite alternate;
}

.menu-item:hover .btn-text,
.menu-item.mobile-hover .btn-text {
    animation: text-glitch 0.45s infinite alternate;
}

@keyframes surreal-morph {
    0% {
        border-radius: 30% 70% 60% 40% / 40% 40% 60% 60%;
        box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8), -2px -2px 0px rgba(93, 94, 87, 0.4);
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 50% 50% 40%;
        box-shadow: -4px 3px 0px rgba(0, 0, 0, 0.8), 3px -2px 0px rgba(93, 94, 87, 0.4);
    }
}

@keyframes text-glitch {
    0% {
        transform: translate(2px, -1px) skewX(8deg);
        letter-spacing: 2px;
    }

    50% {
        transform: translate(-2px, 1px) skewX(-10deg);
        letter-spacing: -1px;
    }

    100% {
        transform: translate(1px, 2px) skewX(4deg);
        letter-spacing: 4px;
    }
}

/* Адаптивность для мобилок */
@media (max-width: 800px) {
    .btn-2 {
        transform: translateX(0);
    }

    .logo-wrapper {
        justify-content: center;
    }

    .header-section {
        padding-left: 0;
        justify-content: center;
    }

    .grid-container {
        padding: 2rem 1rem 0;
        /* Меньше отступов на мобилке */
    }

    .hero-image {
        max-height: 40vh;
        /* На мобилке картинка поменьше, чтобы всё влезло */
    }
}