/* Каркас страницы: шапка, навигация, подвал. */

.page {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  background: var(--cream);
  overflow-x: clip;
}

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 24px);
  padding: clamp(10px, 1.2vw, 22px) var(--gutter);
  background: var(--cream);

  /* Тень появляется, когда страница уходит под шапку. */
  animation: header-shadow linear both;
  animation-timeline: scroll(root);
  animation-range: 0 64px;
}

@keyframes header-shadow {
  from { box-shadow: 0 8px 20px rgb(0 0 0 / 0%); }
  to { box-shadow: 0 8px 20px rgb(0 0 0 / 12%); }
}

.logo {
  position: relative;
  flex: none;
  width: clamp(152px, 11vw, 165px);
  height: 53px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--wine);
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}

.logo:hover {
  background: var(--ink);
  transform: scale(1.04);
}

.logo__shape {
  position: absolute;
  left: 0;
  top: 0;
  width: 54.77px;
  height: 95.34px;
  transform-origin: 0 0;
  transform: matrix(0.999, -0.041, 0.041, 0.999, 9.204, 2.239);
  pointer-events: none;
}

.logo__eye {
  position: absolute;
  top: 37.8px;
  width: 5.2px;
  height: 5.8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--wine);
}

.logo__eye--left { left: 38.1px; }
.logo__eye--right { left: 50.1px; }

.logo__name {
  position: absolute;
  left: 68px;
  top: 17px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--cream);
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.6vw, 40px);
  height: 53px;
  padding: 0 clamp(20px, 5vw, 120px);
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--wine);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.35vw, 24px);
}

.nav__link {
  position: relative;
  padding: 4px 2px;
  white-space: nowrap;
  color: var(--cream);
}

.nav__link:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.nav__link--current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
}

.icon-btn {
  position: relative;
  flex: none;
  width: 62px;
  height: 53px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--wine);
  overflow: hidden;
  transition: background 0.2s, transform 0.2s;
}

.icon-btn:hover {
  background: var(--ink);
  transform: scale(1.07);
}

.icon-btn__shape {
  position: absolute;
  left: -4px;
  top: 0;
  width: 56.15px;
  height: 97.74px;
  transform-origin: 0 0;
  transform: matrix(0.999, -0.041, 0.041, 0.999, 3.477, 1.136);
  pointer-events: none;
}

.icon-btn__eye {
  position: absolute;
  top: 38.25px;
  width: 5.4px;
  height: 6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--wine);
}

.icon-btn__eye--left { left: 29.6px; }
.icon-btn__eye--right { left: 41.9px; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  width: 62px;
  height: 53px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--wine);
}

.burger span {
  display: block;
  height: 2px;
  background: var(--cream);
}

.menu {
  display: none;
  position: sticky;
  top: 76px;
  z-index: 55;
  flex-direction: column;
  gap: 4px;
  margin: 0 var(--gutter) 16px;
  padding: 14px;
  border-radius: 28px;
  border: 2px solid var(--ink);
  background: var(--wine);
  font-family: var(--font-display);
  font-size: 20px;
}

.menu[data-open="true"] {
  display: flex;
  animation: pop-in 0.3s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.menu__link {
  padding: 12px 16px;
  border-radius: 20px;
  text-align: left;
  color: var(--cream);
  transition: background 0.2s, transform 0.2s;
}

.menu__link:hover {
  background: rgb(252 244 241 / 14%);
  color: var(--cream);
  transform: translateX(6px);
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: flex; }
}

.main {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 var(--gutter) clamp(24px, 3vw, 36px);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.2vw, 18px);
  padding: clamp(14px, 1.6vw, 22px) var(--gutter) clamp(24px, 3vw, 36px);
}

.footer__contacts {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 6vw, 120px);
  min-height: 93px;
  padding: 18px clamp(22px, 2.4vw, 43px);
  border-radius: var(--radius-card);
  border: 2px solid var(--ink);
  background: var(--wine);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text);
  color: var(--cream);
}

.footer__contacts span,
.footer__contacts a {
  white-space: nowrap;
  color: var(--cream);
}

.footer__contacts a:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

.footer__socials {
  display: flex;
  gap: clamp(10px, 1.2vw, 18px);
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(90px, 8vw, 150px);
  min-height: 93px;
  border-radius: var(--radius-card);
  border: 2px solid var(--ink);
  background: var(--wine);
  transition: background 0.2s, transform 0.2s;
}

.footer__social:hover {
  background: var(--ink);
  transform: translateY(-4px) scale(1.04);
}

.flash {
  margin: 0 var(--gutter) var(--gap);
  padding: 16px clamp(22px, 2.4vw, 40px);
  border-radius: var(--radius-card-sm);
  border: 2px solid var(--ink);
  background: var(--blue);
  font-family: var(--font-mono);
  font-size: 17.3px;
  animation: pop-in 0.4s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.flash--alert {
  background: var(--wine);
  color: var(--cream);
}
