:root {
  --bg: #15130a;
  --ink: #eae9e2;
  --wrap: min(1120px, 92vw);
  --radius: 22px;
  --glow: rgba(255,180,60,0.5);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, Roboto, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  background-image: image-set(
    url("../assets/img/bg.webp") type("image/webp"),
    url("../assets/img/bg.jpg") type("image/jpeg")
  );
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}

/* Верхняя панель */
.top {
  padding: 10px 16px 0;
  background: linear-gradient(180deg,#0b0d09 0%,#0b0d09 55%,transparent 100%);
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.lang {
  width: 28px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: .3s;
}
.lang:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--glow);
}

.icon-btn {
  background: #1a1d13;
  color: #d4a866;
  border: 1px solid #2b2f1c;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 0 10px rgba(255,180,60,0.15);
}
.icon-btn:hover {
  color: #ffe0a0;
  box-shadow: 0 0 16px var(--glow);
}

/* Основная сцена */
.stage {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-areas: "hero" "nav" "gallery";
  row-gap: 10px;
  justify-items: start;
}

/* Логотип */
.overlay-content {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  position: relative;
}

/* --- ГЛАВНЫЙ ЛОГОТИП --- */
.overlay-title {
  font-weight: 800;
  font-size: clamp(28px,4.6vw,56px);
  color: #cba985;
  letter-spacing: 1px;
  position: relative;
  text-shadow:
    0 0 5px rgba(255,150,60,0.4),
    0 0 14px rgba(255,150,60,0.35),
    0 0 28px rgba(255,140,40,0.25);
  transition: text-shadow 0.4s ease, color 0.3s ease;
}

/* --- ЭФФЕКТ "ЗАКЛЁПОК" --- */
.overlay-title::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 10px;
  background-image: radial-gradient(circle at 6px 6px, #bfa580 20%, transparent 25%),
                    radial-gradient(circle at calc(100% - 6px) 6px, #bfa580 20%, transparent 25%),
                    radial-gradient(circle at 6px calc(100% - 6px), #bfa580 20%, transparent 25%),
                    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), #bfa580 20%, transparent 25%),
                    repeating-radial-gradient(circle, rgba(255,200,140,0.4) 0 1px, transparent 2px);
  background-size: 12px 12px, 12px 12px, 12px 12px, 12px 12px, 14px 14px;
  background-repeat: no-repeat;
  opacity: 0.35;
  filter: drop-shadow(0 0 6px rgba(255,190,100,0.25));
  pointer-events: none;
}

/* --- ПОДСВЕТКА ПРИ НАВЕДЕНИИ --- */
.overlay-content:hover .overlay-title {
  color: #f5d8a7;
  text-shadow:
    0 0 8px rgba(255,180,90,0.7),
    0 0 22px rgba(255,150,60,0.5),
    0 0 40px rgba(255,130,40,0.4);
}

.overlay-studio {
  font-size: clamp(18px,2.4vw,26px);
  font-weight: 600;
  color: #b9a28a;
  margin-left: 0.2em;
  text-shadow: 0 0 4px rgba(255,150,50,0.2);
}

/* Кнопки навигации */
.headline-nav {
  grid-area: nav;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hbtn {
  touch-action: manipulation;

  position: relative;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #2b2f1c;
  background: #171207;
  color: #b9a28a;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.4s ease;
}
.hbtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255,180,70,0.35);
}

/* Галерея */
.gallery {
  grid-area: gallery;
  display: flex;
  justify-content: center;
  gap: 0;
  align-items: flex-end; /* видео и коллажи выравниваем по нижнему краю */
}
.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0f09;
  border: 1px solid rgba(255,155,70,0.25);
  margin-left: -8px;
  box-shadow:
    0 10px 26px rgba(0,0,0,0.55),
    0 0 14px rgba(255,170,70,0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}
.card:hover {
  transform: translateY(-20px);
  border-color: rgba(255,175,90,0.55);
  box-shadow:
    0 16px 34px rgba(0,0,0,0.70),
    0 0 24px rgba(255,150,40,0.25),
    inset 0 0 18px rgba(255,165,60,0.10);
}

/* Подсказки (tooltips) */
.tip {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.25, 1, 0.3, 1);
  z-index: 9999;
  color: #fffdf5;
  font-weight: 600;
  font-size: 11px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255,180,60,0.15);
  border: 1px solid rgba(255,210,130,0.4);
  text-shadow: 0 0 6px rgba(255,200,130,0.75), 0 0 10px rgba(255,180,100,0.5);
  box-shadow:
    0 0 10px rgba(255,180,60,0.3),
    inset 0 0 10px rgba(255,180,60,0.15);
  animation: tipglow 2.5s ease-in-out infinite alternate;
  transform-origin: top left;
  white-space: nowrap;
}
.tip.on {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@keyframes tipglow {
  0% {
    box-shadow:
      0 0 6px rgba(255,180,60,0.2),
      inset 0 0 6px rgba(255,180,60,0.1);
  }
  100% {
    box-shadow:
      0 0 14px rgba(255,200,100,0.5),
      inset 0 0 16px rgba(255,180,60,0.25);
  }
}

/* Водяной знак */
.mc-watermark {
  position: fixed;
  right: 14px;
  bottom: 10px;
  font: 600 12px/18px system-ui,Roboto,Arial,sans-serif;
  color: rgba(255,240,210,.8);
  text-shadow: 0 0 6px #000a,0 0 14px #000a;
}
/* --- Соцсети --- */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(0,0,0,0.3);
  transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.25s ease;
}

.socials a:hover {
  transform: scale(1.08);
  background: rgba(255,200,100,0.12);
  box-shadow: 0 0 12px rgba(255,180,60,0.4);
}

.socials img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.3));
  transition: transform 0.25s ease;
}

.socials a:hover img {
  transform: scale(1.1);
}


/* === PATCH: top-right cart button (index) === */
.top-actions{
  gap:12px;
}
.top-cart{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.22);
  color: var(--ink);
  text-decoration:none;
}
.top-cart:hover{
  background: rgba(0,0,0,.32);
}
.top-cart-ico{ width:20px; height:20px; display:block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.top-cart-text{ font-weight:800; letter-spacing:.02em; }
.top-cart-badge{
  min-width:18px; height:18px; padding:0 6px;
  border-radius:999px;
  background: rgba(255,180,70,.22);
  border:1px solid rgba(255,180,70,.48);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:900;
}
/* Главная: компактная сетка кнопок */
.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 520px) {
  .home-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.home-actions .btn,
.home-actions a.btn,
.home-actions button.btn {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  line-height: 1.15;
  white-space: normal;
}

/* === MOBILE PATCH (MAKEYCOLLECTION) === */
@media (max-width: 820px){
  body{ background-attachment: scroll; }
}

/* Главная: кнопки 2 ряда по 3 на телефоне */
@media (max-width: 520px){
/* Mobile: ровно 6 кнопок = 2 ряда по 3 (после удаления Facebook) */
  .headline-nav{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .headline-nav .hbtn{
    width: 100%;
    text-align: center;
    padding: 10px 10px;
  }

  .home-actions{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .home-actions a,
  .home-actions a.big{
    grid-column: auto !important;
    padding: 12px 10px;
    font-size: 15px;
    min-height: 48px;
  }
}

/* На совсем узких экранах возвращаем 2 колонки, чтобы не было "микро-кнопок" */
@media (max-width: 360px){
  .home-actions{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Коллаж на главной: на телефоне делаем 2x2 по центру */
@media (max-width: 520px){
  .gallery{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 92vw;
    margin: 16px auto 0;
  }

  /* Видео должно быть ВНУТРИ коллажей: после 1-й строки (между рядами) */
  .gallery .video-tile{
    grid-column: 1 / -1;
    order: 3;
  }
  .gallery .card:nth-child(1){ order: 1; }
  .gallery .card:nth-child(2){ order: 2; }
  .gallery .card:nth-child(3){ order: 4; }
  .gallery .card:nth-child(4){ order: 5; }

  .gallery .card{
    width: 100%;
    margin: 0 !important;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 180px 260px;
  }
  .gallery .card img{
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
  }
}

/* Соц-иконки: если где-то используется social-strip (как в About), делаем сетку 3x2 */
.social-strip.icons-only{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  justify-items: center;
  align-items: center;
  max-width: 520px;
  margin: 0 auto;
}
.social-strip.icons-only a{
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.social-strip.icons-only img{
  width: 44px;
  height: 44px;
  object-fit: contain;
}
@media (max-width: 420px){
  .social-strip.icons-only a{ width: 64px; height: 64px; border-radius: 16px; }
  .social-strip.icons-only img{ width: 40px; height: 40px; }
}


/* Touch devices: disable hover tooltips completely (prevents "stuck" tips) */
@media (hover: none), (pointer: coarse){
  .tip{ display:none !important; }
}


/* === Video tile (homepage) === */
.video-card{ position: relative; }
.video-card .mc-video{
  width:100%;
  height:440px;
  object-fit:cover;
  display:block;
  transform: scale(1.01);
}
.mc-video-sound{
  position:absolute;
  top:10px;
  right:10px;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.20);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.75);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.25,1,.3,1);
}
.video-card:hover .mc-video-sound{ opacity:1; transform: translateY(0); }
.mc-video-sound:active{ transform: translateY(0) scale(0.98); }
.mc-video-sound.is-on{
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,210,120,0.35);
  background: rgba(20,12,0,0.45);
}
@media (max-width: 820px){
  .mc-video-sound{ opacity:1; transform:none; }
  .video-card .mc-video{ height: 360px; }
}


/* === Collage Parallax + Dirty Orange Glow === */

.gallery .card{
  border-color: rgba(255,190,120,0.18);
  box-shadow:
    0 0 0 1px rgba(255,150,70,0.10),
    0 0 14px rgba(255,130,50,0.14),
    inset 0 0 10px rgba(255,160,80,0.06);
}

@media (hover:hover) and (pointer:fine){
  .gallery{
    gap: 14px;
    padding: 10px 12px;
  }
  .gallery .card{
    margin-left: 0;
    --mx: 0px;
    --my: 0px;
    transform: translate3d(var(--mx), var(--my), 0);
    will-change: transform;
    border-color: rgba(255,190,120,0.22);
    box-shadow:
      0 0 0 1px rgba(255,150,70,0.12),
      0 0 18px rgba(255,130,50,0.18),
      inset 0 0 12px rgba(255,160,80,0.08);
    transition:
      transform 120ms ease-out,
      box-shadow 220ms ease,
      border-color 220ms ease;
  }
  .gallery .card:hover{
    border-color: rgba(255,200,140,0.45);
    box-shadow:
      0 0 0 1px rgba(255,170,90,0.35),
      0 0 26px rgba(255,140,60,0.38),
      0 0 52px rgba(255,110,40,0.22),
      inset 0 0 16px rgba(255,160,80,0.12);
    transform: translate3d(var(--mx), var(--my), 0) translateY(-3px) scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce){
  .gallery .card{
    transition: none !important;
    transform: none !important;
  }
}
