:root {
  --bg: #b30000;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.6);
  --line-strong: rgba(255, 255, 255, 0.85);
  --muted: rgba(255, 255, 255, 0.85);

  --gutter: 40px;
  --maxw: 1240px;
  --textMaxw: 1160px;

  --navH: 16px;        /* на десктопе */
  --lineInset: 170px;  /* “врезка” линий слева */
--header-h: 64px;
--pill-offset: 40px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navH);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: "Comfortaa", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.5;
  padding-top: var(--navH);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
top: -5px;
  padding: 0 var(--gutter);
}

.section.container { max-width: var(--textMaxw); }

/* Rubik для меню/заголовков/кнопок/контактов */
.nav__link,
.section__title,
.footer__title,
.footer__subtitle,
.pill,
.hero__btn,
.photo-placeholder {
  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.contact__text {
  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: lowercase;
}

/* =========================
   NAV
   ========================= */
.nav {
  position: relative;
  background: var(--bg);
  z-index: 50;
}

.nav::after {
  content: "";
  position: absolute;
  top: 25px;
  left: 0;
  right: var(--lineInset);
  height: 1px;
  background: #fff;
  z-index: 0;
}

.nav__inner {
  min-height: var(--navH);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;
  padding: 0;
  position: relative;
  width: calc(100% - var(--lineInset));
  margin-left: 0;
  z-index: 1;
}

.nav--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.nav__link {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.18em;
margin-top: 3px;

  padding: 0 0;
  white-space: nowrap;
}

.nav__link:hover { opacity: 0.9; }

.logo-flip{
  display: inline-block;
  perspective: 1000px;
}

.logo-flip__inner{
  position: relative;
  display: inline-block;
  transform-style: preserve-3d;
transform-origin: 50% 50%;   /* ось по центру */
  transition: transform .6s ease;
}

.logo-flip:hover .logo-flip__inner{
  transform: rotateY(180deg);
}


 .logo-flip__face{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.logo-flip__front{ transform: rotateY(0deg); }
.logo-flip__back{
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

/* важно: задаём размер inner по размеру фронтовой картинки */
.logo-flip__front{
  position: relative;   /* вернём фронт в поток, чтобы он задавал размеры */
  inset: auto;
}


/* обе картинки одинаково заполняют “карточку” */
.logo-flip__face img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* или cover, если хочешь заполнять с обрезкой */
}

/* на тач-устройствах hover нет — выключаем переворот */
@media (hover: none){
  .logo-flip:hover .logo-flip__inner{ transform: none; }
}

.social-pill{
  position: fixed;
  top: calc(var(--header-h) + 10px);
  right: 40px;
  z-index: 9999;

  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 999px;

  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(140, 0, 0, 0.15);
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
}

.social-pill__btn{
  width: 50px;
  height: 50px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  color: inherit;
  text-decoration: none;
}

.social-pill__btn:hover{
  background: rgba(140, 0, 0, 0.07);
}

.social-pill__btn img{
  display: block;
}

@media (max-width: 820px){
  .social-pill{
   
    top: calc(var(--header-h) + 165px);
    right: 16px;     /* чтобы не прилипало к краю/не вылезало */
    gap: 4px;
    padding: 3px;
  }

  .social-pill__btn{
    width: 36px;
    height: 36px;
  }

  .social-pill__btn img{
    width: 18px;     /* подбери под свои иконки */
    height: 18px;
  }
}


/* =========================
   HERO
   ========================= */
.hero {
  position: relative;
  padding: 15px 0 150px;
  margin-top: 0;
}

.hero::after {
  content: "";
  position: absolute;
  left: var(--lineInset);
  right: 0;
  bottom: 20px;
  height: 1px;
  background: #fff;
}

.hero__inner { gap: 30px; }

.hero__logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__logo img {
  max-height: 50px;
  width: auto;
}

.hero__mid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 100px;
  align-items: center;
  justify-items: center;
  padding: 0;
}

.hero__btn {
  margin-top: 240px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.hero__product {
  width: 305px;
  height: 305px;
  display: grid;
  place-items: center;
  margin-top: -40px;
  position: relative;
  cursor: pointer;
-webkit-tap-highlight-color: transparent;
}

.hero__tooltip{
  position: absolute;
  left: 50%;
  top: 50%;
   transform: translate(-50%, -50%);


  /* ширина по самой длинной строке */
  display: inline-block;
  width: max-content;     /* можно: fit-content, но max-content точнее под “самую длинную строку” */
  white-space: nowrap;    /* НЕ переносить строки */
  max-width: 90vw;        /* чтобы не вылезло за экран на мобилке */
  overflow-x: auto;       /* если всё-таки длиннее экрана — появится горизонтальная прокрутка */
  z-index: 10;

  background: color-mix(in srgb, var(--bg) 75%, transparent);
  color: #fff;

  /* 2) шрифт меньше */
  font-size: 12px;
  line-height: 1.25;

  /* 3) окно шире */
  width: fit-content;        /* поменяй под себя */
  max-width: 90vw;     /* чтобы не вылезало на мобильном */

  padding: 2px 2px;
  border-radius: 12px;

  padding: 2px 2px;
  border-radius: 12px;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.hero__product.is-open .hero__tooltip{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (hover: hover) {
  .hero__product:hover .hero__tooltip{
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 768px){
  .hero__tooltip{
    left: 50%;
    transform: translateX(-50%);

    width: min(92vw, 520px); /* будет широкое окно, но не больше 520px */
    max-width: none;

    white-space: normal;
    overflow-wrap: break-word; /* переносы, но без “рваных” слов как anywhere */
  }
}

.hero__product img {
  max-height: 800px;
  width: auto;
}

/* =========================
   SPOON ANIMATION (GLOBAL)
   работает на всех ширинах
   ========================= */
.hero__product img {
  animation: spoonFloat 3.6s ease-in-out infinite;
  transform-origin: 50% 60%;
  will-change: transform;
}

@keyframes spoonFloat {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__product img { animation: none; }
}

/* =========================
   SECTIONS
   ========================= */
.section { padding: 22px 0; }

.section__title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.18em;
}

.section__title--wide { margin-top: 12px; }

.gelato-title__up{
  text-transform: uppercase;
}

.gelato-title__low{
  text-transform: lowercase;
}

.text p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  max-width: none;
}

.text__accent {
  margin-top: 10px;
  font-weight: 700;
  color: var(--white);
}

.lead {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.two-col {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  align-items: start;
}

.card-photo { justify-self: end; width: 220px; }

.photo-placeholder {
  width: 220px;
  height: 150px;
  border: 2px solid var(--line-strong);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.btn-row__icon{
  display: inline-block;
  width: 18px;
  height: 18px;
margin-left: 6px;
}

.btn-row--stack{
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start; /* если надо по центру: center */
}

.btn-row--inline{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* =========================
   BUTTONS
   ========================= */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 12px;
  white-space: nowrap;
}

.pill--lg {
  padding: 20px 55px;
  font-size: 34px;
  min-width: 220px;
}

.pill:hover { background: rgba(255, 255, 255, 0.08); }

.pill--pdf{
  background: #fff;
  color: var(--bg);
  border-color: #fff;
}

.pill--pdf:hover{
  background: rgba(255,255,255,.92);
}



/* =========================
   FOOTER
   линия до края экрана + центр текста по линии
   ========================= */
.footer {
  position: relative;
  padding: 36px 0 70px; /* запас под линию и копирайт */
}

.footer::after {
  content: "";
  position: absolute;
  left: var(--lineInset);
  right: 0;
  bottom: 34px;
  height: 1px;
  background: #fff;
}

.footer__grid {
  display: grid;
  gap: 20px;
}

.footer__title {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 24px;
}

.footer__subtitle {
  font-weight: 500;
  letter-spacing: 0.16em;
  font-size: 17
px;
  margin-bottom: 12px;
}

.footer__row,
.footer__row--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 40px;
  align-items: start;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #fff;
  text-align: left;
}

.footer__row .contact,
.footer__row--3 .contact { justify-self: start; }

.icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex: 0 0 auto;
}

.icon--tg   { background-image: url("img/icons/telegram.svg"); }
.icon--vk   { background-image: url("img/icons/vk.svg"); }
.icon--phone{ background-image: url("img/icons/phone.svg"); }
.icon--mail { background-image: url("img/icons/mail.svg"); }

.contact__text {
  font-size: 12px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  font-weight: 500;
}

/* копирайт “привязан” к экрану по ширине линии */
.footer__rights {
  position: absolute;
  left: var(--lineInset);
  right: 0;
  bottom: 8px;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 980px) {
  .nav__inner {
    width: 100%;
    gap: 28px;
    padding: 0 14px;
  }

  .nav::after { right: 0; }
  .hero::after { left: 0; }

  .hero__mid { gap: 40px; }
}

@media (max-width: 820px) {
  :root {
    --navH: 86px;      /* высота фикс-меню на мобилке */
    --lineInset: 0px;  /* линии от края */
  }

  body { padding-top: var(--navH); }
  html { scroll-padding-top: var(--navH); }

  /* nav фиксируем и линию ставим “внутрь” */
  .nav { position: fixed; top: 0; left: 0; right: 0; }
  .nav::after { position: fixed; top: 80px; left: 0; right: 0; }

  /* меню в 2 ряда по 3 пункта */
  .nav__inner{
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    justify-items: center;
    gap: 10px 18px;
    padding: 10px 12px;
    width: 100%;
    min-height: var(--navH);
  }

  .nav__link {
    font-size: 14px;
    letter-spacing: 0.12em;
    padding: 4px 0;
  }

  .hero { padding: 6px 0 56px; }
  .hero__logo { margin-bottom: 18px; }

  .hero__mid {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 100%;
    justify-items: center;
  }

  .hero__btn { margin-top: 0; }

  .hero__product {
    margin: 0;
    width: 220px;
    height: 220px;
  }

  .hero__product img { max-height: 220px; }

  .pill--lg {
    min-width: 220px;
    padding: 14px 28px;
    font-size: 20px;
    letter-spacing: 0.16em;
  }

  .two-col { grid-template-columns: 1fr; }
  .card-photo { justify-self: start; }

  .map { padding: 28px 0 60px; }
  .map__frame iframe { height: 420px; }

  .footer { padding: 28px 0 60px; }
  .footer__grid { padding-bottom: 26px; }

  .footer::after { bottom: 24px; }
  .footer__rights { bottom: 6px; padding: 0 14px; }

  .footer__row,
  .footer__row--3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact__text {
    white-space: normal;
    letter-spacing: 0.14em;
  }
}

.to-top{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;

  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
  cursor: pointer;

  /* по умолчанию скрыта, покажем при прокрутке */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.to-top.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top__icon{ display: block; }
.to-top:hover{ background: rgba(255,255,255,0.98); }

@media (max-width: 420px) {
  .pill--lg { min-width: 100%; }
  .section__title { font-size: 18px; }

  .contact__text {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .nav__link { font-size: 13px; letter-spacing: 0.10em; }
}

@media (max-width: 820px){
  :root{ --gutter: 16px; }          /* отступы по бокам на мобилке */

  .container{
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  /* если часть текста не в .container */
  .section{
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}


/* Modal */
.cookieModal{ position: fixed; inset: 0; z-index: 10000; }
.cookieModal__backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,0.35); }

.cookieModal__card{
  position: relative;
  max-width: 520px;
  margin: 10vh auto 0;
  padding: 16px;
  background: rgba(179, 0, 0, 0.96);
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 16px;
  color: #fff;
}

.cookieModal__title{
  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin-bottom: 10px;
}

.cookieModal__row{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.25);
}

.cookieModal__row:first-of-type{ border-top: 0; }

.cookieModal__actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.cookieModal__hint{
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.9;
}

.cookieModal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: start center;
}

.cookieModal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.cookieModal__card{
  position: relative;
  z-index: 1; /* важно: поверх backdrop */
}

@media (max-width: 520px){
  .cookie__box{ flex-direction: column; align-items: stretch; }
  .cookie__actions{ width: 100%; }
  .cookie__btn{ width: 100%; }
  .cookieModal__card{ margin: 8vh 14px 0; }
}


.footer__legal{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}

.footer__legal a{ text-decoration: underline; }
.footer__sep{ opacity: 0.7; }




/* шире/выше карта */
.map.container{ max-width: var(--maxw); }   /* можно убрать, если не нужно шире контейнера */

.map__frame{
  max-width: 980px;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}



/* Заглушка такого же размера, как будущая карта */
.map__placeholder{
  height: 200px;                      /* высота карты на десктопе */
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  padding: 18px;
}

.map__placeholderText{
  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255,255,255,0.92);
  max-width: 520px;
}

/* кнопка "как на сайте" */
.pill--map{
background: transparent !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.85) !important;  
padding: 12px 22px;
  font-size: 12px;
  letter-spacing: 0.18em;
}

.pill--map:hover{
  background: rgba(255,255,255,0.08) !important;
}

/* iframe после загрузки */
.map__iframe{
  display: block;
  width: 100%;
  height: 560px;
  border: 0;
}

@media (max-width: 820px){
  .map.container{ max-width: var(--maxw); }
  .map__placeholder{ height: 360px; }
  .map__iframe{ height: 360px; }
}

/* === COOKIE (clean + minimal) === */
[hidden]{ display:none !important; }

.cookie{
  position: fixed;
  left: var(--lineInset);
  right: 0;
  bottom: 4px;
  padding: 6px;
  z-index: 99999;

  display: flex;
  justify-content: center;
}

.cookie__box{
  width: 820px;
  max-width: calc(100% - 16px);
  margin: 0;

  padding: 2px 6px;
  border: none !important;
  border-radius: 30px;

  background: rgba(179, 0, 0, 0.92);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cookie__text{
  font-size: 10.5px;   /* минимальное из твоих дублей */
  line-height: 1.15;
  color: rgba(255,255,255,0.92);

  white-space: nowrap;      /* строго 1 строка */
  overflow: hidden;         /* если не влезет */
  text-overflow: ellipsis;  /* троеточие */
}

.cookie__text a{ text-decoration: underline; }

.cookie__actions{
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}


.cookie__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 2px 4px;     /* минимальное из твоих дублей */
  font-size: 8px;       /* минимальное из твоих дублей */
  letter-spacing: 0.06em;
  font-weight: 500;     /* самое “тонкое” из того, что у тебя было */
  line-height: 1;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.85); /* обводка кнопок оставлена */
  background: transparent;
  color: #fff;

  font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.cookie__btn:hover{ background: rgba(255,255,255,0.08); }
.cookie__btn--ghost{ opacity: 0.9; }

@media (max-width: 520px){
  .cookie__box{
    width: 100%;
    max-width: calc(100% - 16px);
  }
}

@media (max-width: 520px){
  .cookie__text{ 
font-size: 9px;
max-width: 90vw;
white-space: normal;      /* отменяем nowrap */
    text-overflow: clip;      /* ellipsis для multiline не нужно */

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
 } 
  .cookie__btn{ font-size: 8px; padding: 2px 3px; }
}
