@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Dosis:wght@400;600&display=swap');

:root {
    --brand-red: #c90101;
    --menu-font: 'Dela Gothic One', sans-serif;
    --body-font: 'Dosis', sans-serif;
    --logo-red-filter: brightness(0) saturate(100%) invert(12%) sepia(92%) saturate(7489%) hue-rotate(357deg) brightness(97%) contrast(112%);
}

body {
    margin: 0;
    font-family: var(--body-font);
    overflow: hidden;
}

canvas {
    display: block;
}

@keyframes blink-red {
    0%, 100% { color: #c90101; }
    50% { color: transparent; }
}

@keyframes blink-white {
    0%, 100% { color: #ffffff; }
    50% { color: transparent; }
}

@keyframes logo-pulse {
    0% {
        transform: scale(1);
        filter: var(--logo-red-filter) drop-shadow(0 0 6px rgba(201, 1, 1, 0.45));
    }
    50% {
        transform: scale(1.05);
        filter: var(--logo-red-filter) drop-shadow(0 0 14px rgba(201, 1, 1, 0.95));
    }
    100% {
        transform: scale(1);
        filter: var(--logo-red-filter) drop-shadow(0 0 6px rgba(201, 1, 1, 0.45));
    }
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding: 18px 48px;
    z-index: 200;
    gap: 24px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-header__group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-left {
    justify-self: flex-start;
    justify-content: flex-start;
}

.nav-right {
    justify-self: flex-end;
    justify-content: flex-end;
}

.desktop-nav a {
    font-family: var(--menu-font);
    font-size: 16px;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #ffffff;
    text-transform: uppercase;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
    animation: blink-red 0.25s infinite;
    color: var(--brand-red);
}

.logo {
    justify-self: center;
    width: 80px;
    z-index: 210;
}

.logo img {
    width: 100%;
    height: auto;
    transition: filter 0.35s ease, transform 0.35s ease;
}

.logo a {
    display: inline-block;
}

.logo:hover img,
.logo:focus-within img {
    filter: var(--logo-red-filter) drop-shadow(0 0 6px rgba(201, 1, 1, 0.65));
    animation: logo-pulse 1.05s ease-in-out infinite;
}

.mobile-menu-toggle {
    display: none;
    width: 30px;
    height: 24px;
    border: none;
    background: transparent;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 400;
    position: relative;
}

.mobile-menu-toggle__line {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-open .mobile-menu-toggle__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-header-cta {
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 220;
    color: #ffffff;
}

.mobile-header-shop {
    font-family: var(--menu-font);
    font-size: 14px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
}

.mobile-cart-link {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.mobile-cart-link svg {
    width: 28px;
    height: 28px;
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.mobile-menu-panel {
    position: fixed;
    inset: 0;
    background: var(--brand-red);
    color: #ffffff;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
    z-index: 300;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}

.mobile-menu-panel.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel__content {
    width: 100%;
    padding: 88px 32px 40px;
    font-family: var(--menu-font);
    text-transform: uppercase;
    overflow-y: auto;
    position: relative;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-menu-list a,
.mobile-menu-accordion__toggle {
    font-size: 32px;
    text-decoration: none;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background: transparent;
    padding: 0;
    font-family: var(--menu-font);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: 100%;
}

.mobile-menu-accordion__indicator {
    font-size: 34px;
    line-height: 1;
    margin-left: auto;
}

.mobile-menu-sublist {
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease;
}

.mobile-menu-sublist.is-open {
    margin-top: 12px;
    max-height: 320px;
    opacity: 1;
}

.mobile-menu-sublist a {
    font-size: 24px;
    text-transform: uppercase;
}

.mobile-menu-sublist[hidden] {
    display: none;
}

.mobile-menu-accordion__toggle:focus-visible,
.mobile-menu-list a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.mobile-menu-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close span {
    position: absolute;
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-menu-close span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-close span:last-child {
    transform: rotate(-45deg);
}

.mobile-menu-panel__footer {
    margin-top: 48px;
    font-size: 14px;
}

body.mobile-menu-open {
    overflow: hidden;
}

.social-buttons {
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: var(--brand-red);
    font-weight: 400;
    z-index: 100;
}

.social-buttons a {
    margin: 0 5px;
    text-decoration: none;
    color: var(--brand-red);
    transition: none;
}

.social-buttons span {
    color: var(--brand-red);
}

.social-buttons a:hover {
    animation: blink-white 0.25s infinite;
    color: #ffffff;
}

/* Стили для элементов управления */
.controls-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
}

.controls-container label {
    display: block;
    margin-bottom: 5px;
}

.controls-container input[type="range"] {
    width: 100%;
    margin-bottom: 15px;
}

.controls-container input[type="color"] {
    width: 100%;
    height: 30px;
    margin-bottom: 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.controls-container input[type="checkbox"] {
    margin-right: 5px;
}

@media (max-width: 1024px) {
    .site-header {
        padding: 16px 32px;
    }

    .desktop-nav a {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .site-header {
        grid-template-columns: minmax(auto, 1fr) auto minmax(auto, 1fr);
        padding: 12px 18px;
    }

    .logo {
        width: 64px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle,
    .mobile-header-cta {
        display: flex;
    }

    .social-buttons {
        bottom: 2%;
        width: 65%;
        text-align: center;
    }

    .controls-container {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 10px 16px;
    }

    .mobile-menu-list a,
    .mobile-menu-accordion__toggle {
        font-size: 28px;
    }

    .mobile-menu-sublist a {
        font-size: 20px;
    }

    .social-buttons {
        font-size: 14px;
    }

    .controls-container {
        padding: 10px;
        font-size: 12px;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader__container {
    width: 300px;
    text-align: center;
}

.preloader__progress {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.preloader__progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #c90101;
    transition: width 0.3s ease;
}

.preloader__text {
    color: #c90101;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.preloader__spinner {
    display: block;
    margin: 0 auto;
    animation: preloader-rotate 1s linear infinite;
}

.preloader__spinner-bg {
    opacity: 0.1;
    stroke-width: 3;
}

.preloader__spinner-fg {
    stroke: #c90101;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 90 150;
    stroke-dashoffset: 0;
    animation: preloader-dash 1.2s ease-in-out infinite;
}

@keyframes preloader-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes preloader-dash {
    0% {
        stroke-dasharray: 1 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90 150;
        stroke-dashoffset: -124;
    }
}

/* Hide preloader when loaded */
.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
} 