/* Подключаем кастомный шрифт OneDay */
@font-face {
    font-family: 'OneDay';
    src: url('fonts/ONEDAY.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Брейкпоинты */
    --mobile: 576px;
    --tablet: 768px;
    --desktop: 1024px;
    --large: 1200px;
    --xlarge: 1400px;
    
    /* Отступы и размеры */
    --header-padding: 20px;
    --transition-duration: 0.3s;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Базовые стили */
body {
    margin: 0;
    padding: 0;
    background: #000;
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    font-family: 'OneDay', sans-serif;
    box-sizing: border-box; /* Устанавливаем box-sizing для всего */
}

*, *:before, *:after {
    box-sizing: inherit;
}

canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Меню */
.menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-btn, .logo-text {
    position: fixed;
    top: var(--header-padding);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition-duration) var(--transition-timing);
}

.menu-btn {
    left: var(--header-padding);
    width: 30px;
    height: 20px;
    cursor: pointer;
    display: none;
}

.logo-text {
    right: var(--header-padding);
    pointer-events: none;
}

.menu-btn.visible,
.logo-text.visible {
    opacity: 1;
    display: block;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: all var(--transition-duration) var(--transition-timing);
}

.logo-text img {
    max-width: 100px;  /* Ограничиваем логотип до 100px по ширине */
    height: auto;
    pointer-events: none;
}

/* Overlay меню (фон убран) */
.overlay-menu {
    position: absolute;
    left: 20px;
    top: 70px;
    width: 220px;
    background: transparent;
    padding: 10px;
    display: none;
    z-index: 1000;
    border-radius: 5px;
    box-shadow: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.overlay-menu ul li {
    margin: 10px 0;
}

.overlay-menu ul li a {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    padding-left: 0;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay-menu ul li a:hover {
    color: #fff;
    transform: translateX(8px) scale(1.02);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Оверлей для попапов */
.overlay-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.overlay-mask.visible {
    opacity: 1;
}

/* Popup блоки (без подложки) */
.popup-block {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: none;
    color: #fff;
    text-align: center;
    z-index: 1002;
    overflow-y: auto;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.popup-block.visible {
    opacity: 1;
}

.popup-block .popup-content {
    padding: 30px;
    max-width: 90%;
    margin: 0 auto;
    position: relative;
}

.popup-block:not(#projects) .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    min-width: 300px;
    width: auto;
}

/* Стили для социальных иконок */
.social-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icons img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    opacity: 0.8;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Для иконок, которые изначально черные */
.social-icons img[alt="Vimeo"],
.social-icons img[alt="Dprofile"],
.social-icons img[alt="Telegram"] {
    filter: invert(1);
}

.social-icons img[alt="Vimeo"]:hover,
.social-icons img[alt="Dprofile"]:hover,
.social-icons img[alt="Telegram"]:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Для иконок, которые изначально белые */
.social-icons img[alt="Behance"],
.social-icons img[alt="Instagram"] {
    filter: none;
}

.social-icons img[alt="Behance"]:hover,
.social-icons img[alt="Instagram"]:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Специальные размеры для некоторых иконок */
.social-icons img[alt="Behance"] {
    width: 75%;
    height: 75%;
}

.social-icons img[alt="Telegram"] {
    width: 75%;
    height: 75%;
}

/* Стили для текста в About */
#about .popup-content {
    width: 100%;
    max-width: min(800px, 95vw);
    margin: 0 auto;
    padding: clamp(20px, 5vw, 40px);
    box-sizing: border-box;
}

.about-text {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #fff;
    width: 100%;
    max-width: min(700px, 90vw);
    margin: 0 auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.about-text > * {
    grid-column: 1 / -1; /* По умолчанию элементы занимают всю ширину */
}

.about-text p {
    font-size: clamp(15px, 1.6vw, 16px);
    line-height: 1.7;
    margin: 0 0 clamp(15px, 2vw, 20px) 0;
    opacity: 0.9;
    text-align: left;
    font-weight: 300;
}

.about-text p:first-child {
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.6;
    font-weight: 300;
    grid-column: 1 / -1;
}

.about-text h3 {
    font-size: clamp(16px, 1.8vw, 18px);
    font-weight: 500;
    margin: clamp(20px, 3vw, 30px) 0 clamp(15px, 2vw, 20px);
    opacity: 0.95;
    text-align: left;
    grid-column: 1 / -1;
}

.about-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    grid-column: 1 / -1;
    display: grid;
    gap: clamp(10px, 1.5vw, 15px);
}

.about-text li {
    font-size: clamp(15px, 1.6vw, 16px);
    line-height: 1.7;
    padding-left: 24px;
    position: relative;
    opacity: 0.85;
    font-weight: 300;
}

.about-text li:before {
    content: "—";
    position: absolute;
    left: 0;
    color: #fff;
}

/* Стили для LedPulse */
#ledpulse .popup-content p {
    font-size: 24px;
    margin: 0;
    letter-spacing: 1px;
}

/* Стили для галереи проектов */
.projects-grid {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

.project-item {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

.project-item picture {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

.project-item img {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

.project-item:hover {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

.project-item span {
    /* Удаляем все стили, так как они будут применяться через JavaScript */
}

/* Добавляем классы для состояний видимости */
.logo-text.visible {
    opacity: 1;
    display: block;
}

.overlay-menu.visible {
    opacity: 1;
    display: block;
}

.menu-btn.visible {
    opacity: 1;
}

.overlay-mask.visible {
    opacity: 1;
}

/* Адаптивные стили */
@media screen and (max-width: 575px) {
    .menu {
        height: 50px;
    }
    .menu-btn {
        width: 35px;
        height: 25px;
        left: 8px;
        top: 12px;
    }
    .menu-btn span {
        height: 3px;
        margin: 4px 0;
    }
    .logo-text {
        top: 8px;
        right: 8px;
        font-size: 16px;
    }
    .overlay-menu {
        width: 160px;
        left: 8px;
        top: 50px;
        padding: 5px;
    }
    .overlay-menu ul li a {
        font-size: 12px;
    }
    .popup-block:not(#projects) .popup-content {
        width: 85%;
        padding: 15px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .project-item span {
        font-size: 0.875rem; /* 14px */
    }
    .social-icons {
        gap: 16px;
    }
    
    .social-icons a {
        width: 48px;
        height: 48px;
    }
}
@media screen and (min-width: 576px) and (max-width: 767px) {
    .logo-text { font-size: 20px; }
    .overlay-menu { width: 200px; top: 60px; left: 15px; }
}
@media screen and (min-width: 768px) and (max-width: 991px) {
    .logo-text { font-size: 22px; }
    .overlay-menu { width: 220px; top: 60px; left: 20px; }
}
@media screen and (min-width: 992px) and (max-width: 1199px) {
    .logo-text { font-size: 24px; }
    .overlay-menu { width: 240px; top: 70px; left: 20px; }
}
@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .logo-text { font-size: 26px; }
    .overlay-menu { width: 260px; top: 80px; left: 20px; }
}
@media screen and (min-width: 1400px) {
    .logo-text { font-size: 28px; }
    .overlay-menu { width: 280px; top: 80px; left: 20px; }
}

.behance-link {
    display: block;
    margin: 20px auto;
    text-align: center;
}

.behance-link img {
    width: 64px;
    height: 64px;
    transition: opacity 0.3s ease;
}

.behance-link:hover img {
    opacity: 0.7;
}

/* Стили для полноэкранного просмотра */
.fullscreen-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-view.active {
  display: flex;
  opacity: 1;
}

.fullscreen-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-media {
  max-width: 95%;
  max-height: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  width: 100%;
}

.fullscreen-media img,
.fullscreen-media video {
  max-width: 100%;
  max-height: 95vh;
  object-fit: contain;
  cursor: auto;
  transition: transform 0.3s ease;
}

/* Стили для видео Vimeo в полноэкранном режиме */
.fullscreen-media > div {
  width: 100%;
  max-width: 1600px; /* Максимальная ширина для видео */
  margin: 0 auto;
}

.fullscreen-media iframe {
  border: none;
  background: #000;
  max-height: 85vh; /* Уменьшенная максимальная высота для видимости панели управления */
}

/* Кнопки управления в полноэкранном режиме */
.close-fullscreen,
.next-fullscreen {
  position: fixed;
  width: 40px;
  height: 40px;
  background: rgba(25, 25, 25, 0.6);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
}

.close-fullscreen {
  top: 20px;
  right: 20px;
}

.next-fullscreen {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: rgba(25, 25, 25, 0.8);
  width: 48px;
  height: 48px;
}

.next-fullscreen::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid white;
  border-right: 2px solid white;
  transform: rotate(45deg);
  margin-left: -2px;
}

.close-fullscreen:hover,
.next-fullscreen:hover {
  background: rgba(25, 25, 25, 0.95);
  transform: scale(1.1);
}

.next-fullscreen:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Добавляем стили для курсора на изображениях */
.fullscreen-trigger {
  cursor: zoom-in;
}

/* Стили для прелоадера видео */
.video-preloader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; /* Уменьшенный размер */
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 1.5s linear infinite; /* Более плавная анимация */
  z-index: 10001;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Стили для иконки жеста */
.gesture-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
    opacity: 0;
    pointer-events: none;
    animation: fadeInOutAndHide 4.5s ease-in-out forwards;
}

.gesture-hint.visible {
    display: flex;
    justify-content: center;
    opacity: 1;
    animation: fadeInOutAndHide 4.5s ease-in-out forwards;
}

.gesture-icon {
    width: clamp(40px, 10vw, 80px);
    height: auto;
    filter: invert(1) opacity(0.85);
    animation: moveUpDown 2s ease-in-out infinite;
}

/* Маска для блокировки взаимодействия */
.gesture-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: none;
    opacity: 0;
    pointer-events: all;
    animation: fadeInOutAndHide 4.5s ease-in-out forwards;
}

.gesture-mask.visible {
    display: block;
    opacity: 1;
}

@keyframes fadeInOutAndHide {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

@keyframes moveUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Специальные стили для блока проектов */
#projects {
    background-color: rgba(0, 0, 0, 0.85);
}

/* Медиа-запросы для адаптивности */
@media (max-width: 576px) {
    .menu-btn {
        top: 15px;
        left: 15px;
    }
    
    .logo-text {
        top: 15px;
        right: 15px;
    }
    
    .logo-text img {
        max-width: 80px;
    }
    
    .overlay-menu {
        left: 15px;
        top: 60px;
        width: 200px;
    }
    
    .overlay-menu ul li a {
        font-size: 14px;
    }
    
    #about .popup-content p {
        font-size: 16px;
    }
    
    #ledpulse .popup-content p {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .popup-block:not(#projects) .popup-content {
        width: 95%;
        padding: 15px;
    }
    
    #projects .popup-content {
        padding: 15px;
    }
}

/* Кнопка сброса для принудительного обновления */
.reset-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reset-button:hover {
    background-color: rgba(50, 50, 50, 0.8);
    transform: rotate(180deg);
}

@media (max-width: 576px) {
    .reset-button {
        width: 35px;
        height: 35px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* Стили для контактной информации */
.contact-info {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.contact-person {
    text-align: left;
    min-width: 280px;
    flex: 1;
}

.contact-person h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.contact-person .contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-person a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.contact-person a:hover {
    opacity: 1;
}

.contact-person p {
    color: #fff;
    font-size: 14px;
    margin: 4px 0;
    opacity: 0.8;
}

/* Адаптивность для разных экранов */
@media screen and (min-width: 1200px) {
    .contact-info, .social-icons {
        max-width: 720px;
    }
}

@media screen and (max-width: 991px) {
    .contact-info, .social-icons {
        max-width: 580px;
    }
}

@media screen and (max-width: 768px) {
    .contact-info {
        gap: 30px;
        padding: 0 20px;
        margin-bottom: 30px;
    }

    .contact-person {
        min-width: 100%;
        text-align: left;
    }

    .social-icons {
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0 20px;
    }

    .social-icons a {
        width: 35px;
        height: 35px;
    }
}

@media screen and (max-width: 480px) {
    .contact-info {
        padding: 0 15px;
    }

    .social-icons {
        gap: 12px;
    }

    .social-icons a {
        width: 30px;
        height: 30px;
    }
}

@media screen and (max-width: 1200px) {
    #about .popup-content {
        padding: 30px;
    }
}

@media screen and (max-width: 768px) {
    .about-text {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
    
    #about .popup-content {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .about-text {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    #about .popup-content {
        padding: 15px;
    }
    
    .about-text p,
    .about-text li {
        font-size: 15px;
    }
    
    .about-text p:first-child,
    .about-text h3 {
        font-size: 16px;
    }
}

/* ---------- Переключатель языка ---------- */
/* Один и тот же элемент на всех страницах, включая главную: левый край,
   под бургером и стрелкой «назад», чтобы не перекрывать их и не прыгать
   при переходах между разделами. */

/* 22px — визуальный левый край стрелки «назад»: сама кнопка стоит на 20px,
   а символ внутри неё смещён ещё на 4px. Совпадение проверено замером. */
.lang-switch {
    position: fixed;
    top: 74px;
    left: 24px;
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: .14em;
}

/* На главной переключатель появляется только вместе с меню — то есть когда куб
   собран. Пока точки разлетелись, на экране не должно быть ничего, кроме куба. */
.lang-switch--home {
    display: none;
    opacity: 0;
    transition: opacity .4s ease;
}

.lang-switch--home.visible {
    opacity: 1;
}

/* При скролле внутри раздела переключатель уходит: он нужен на входе
   на страницу, а дальше только мешает смотреть работы. Возвращается,
   когда пользователь снова у верхнего края. */
.lang-switch {
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
}

.lang-switch--hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
}

.lang-switch a,
.lang-switch .is-active,
.lang-switch .sep {
    text-decoration: none;
    line-height: 1;
}

.lang-switch a {
    color: rgba(255, 255, 255, .45);
    transition: color .25s ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
    color: #fff;
}

.lang-switch .is-active {
    color: #fff;
}

.lang-switch .sep {
    color: rgba(255, 255, 255, .25);
}


@media screen and (max-width: 575px) {
    .lang-switch {
        top: 62px;
        left: 24px;
        font-size: 11px;
    }
}

/* Логотип на внутренних страницах ведёт на главную своего языка */
.logo-text .logo-home {
    display: block;
    line-height: 0;
    cursor: pointer;
    /* Обёртка логотипа пропускает клики насквозь (pointer-events: none на
       .logo-text), чтобы не перехватывать вращение куба. Самой ссылке реакцию
       возвращаем — иначе по ней невозможно попасть мышью. */
    pointer-events: auto;
    transition: opacity .25s ease;
}

.logo-text .logo-home:hover,
.logo-text .logo-home:focus-visible {
    opacity: .75;
}

/* ---------- Уведомление о cookie ----------
   Не полоса во всю ширину, а компактная плашка по центру внизу: куб продолжает
   вращаться и просвечивать сквозь неё. Разделительной линии нет — форму держит
   сама подложка. */

.cookie-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 2200;
    display: none;
    padding: 0 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s ease, transform .7s ease;
    pointer-events: none;
}

.cookie-notice.visible {
    opacity: 1;
    transform: translateY(0);
}

.cookie-notice__inner {
    width: fit-content;
    max-width: min(1120px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 12px 22px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    /* Подложка держит читаемость, но остаётся прозрачной: куб виден и вращается
       сквозь неё. Сильное размытие глушило его целиком, поэтому оставлена дымка. */
    background: rgba(0, 0, 0, .34);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 4px;
    pointer-events: auto;
}

.cookie-notice__text {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .72);
}

/* Ссылка идёт той же строкой, что и текст */
.cookie-notice__link {
    display: inline;
    margin-left: 6px;
    font-size: 11.5px;
    white-space: nowrap;

    color: rgba(255, 255, 255, .72);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, .28);
    transition: color .25s ease, text-decoration-color .25s ease;
}

.cookie-notice__link:hover,
.cookie-notice__link:focus-visible {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, .7);
}

.cookie-notice__button {
    flex: 0 0 auto;
    padding: 8px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 0;
    color: rgba(255, 255, 255, .9);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.cookie-notice__button:hover,
.cookie-notice__button:focus-visible {
    background: #fff;
    border-color: #fff;
    color: #000;
}

/* Одна строка держится только на широком экране: ниже фраза не влезает
   и её перенос выглядит естественнее, чем сжатый текст */
@media screen and (min-width: 1180px) {
    .cookie-notice__text {
        white-space: nowrap;
    }
}

@media screen and (max-width: 700px) {
    .cookie-notice {
        bottom: calc(18px + env(safe-area-inset-bottom));
        padding: 0 16px;
    }

    /* В одну строку фраза не помещается — на узком экране возвращаем стек */
    .cookie-notice__inner {
        flex-direction: column;
        padding: 14px 18px 16px;
        gap: 11px;
    }

    .cookie-notice__text,
    .cookie-notice__link {
        white-space: normal;
    }

    .cookie-notice__link {
        display: block;
        margin: 4px 0 0;
    }

    .cookie-notice__text,
    .cookie-notice__link {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-notice {
        transition: none;
    }
}

/* ---------- Ритм левого верхнего угла ----------
   Бургер, переключатель языка и список разделов стоят одной колонкой.
   Раньше меню начиналось на 2px ниже переключателя — они слипались в одну
   строку, особенно заметно на планшете и телефоне. Разводим по вертикали:
   бургер 15–40, переключатель ~56, первый пункт меню ~112. */

.lang-switch--home {
    top: 56px;
}

.overlay-menu {
    top: 92px;
}

@media screen and (max-width: 575px) {
    .lang-switch--home {
        top: 52px;
        left: 24px;
    }

    .overlay-menu {
        top: 86px;
        left: 20px;
    }
}

/* Альбомный телефон: высоты мало, поджимаем всю колонку вверх */
@media screen and (max-height: 460px) and (orientation: landscape) {
    .lang-switch--home {
        top: 46px;
    }

    .overlay-menu {
        top: 74px;
    }

    .overlay-menu ul li {
        margin: 6px 0;
    }
}

/* Заголовок страницы, скрытый от глаз, но доступный поиску и скринридерам.
   Нужен там, где по замыслу страница — это галерея без текста: без H1
   поисковик не понимает, о чём она. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- Описание студии под пунктами меню ----------
   Одна фраза о том, чем занимается студия. Нужна и человеку, и поиску:
   описание в мета-тегах должно быть подкреплено видимым текстом, иначе
   поисковик вправе показать в выдаче свою выдержку. Набок от меню —
   приглушённая, чтобы не спорить с пунктами. */

.overlay-menu .menu-about {
    max-width: 300px;
    margin: 26px 0 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.55;
    color: rgba(255, 255, 255, .5);
}

@media screen and (max-width: 575px) {
    /* Меню узкое (220px), а описание в такой колонке растягивалось на восемь
       строк. Выпускаем его за границу меню — фон там всё равно прозрачный. */
    .overlay-menu .menu-about {
        width: calc(100vw - 60px);
        max-width: 320px;
        margin-top: 20px;
        font-size: 11.5px;
    }
}

/* Альбомный телефон: высоты мало, описание убираем — меню важнее */
@media screen and (max-height: 460px) and (orientation: landscape) {
    .overlay-menu .menu-about {
        display: none;
    }
}
