@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/golos-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/golos-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1f1b17;
  --ink-2: #5a4e44;
  --ink-3: #3f3630;
  --accent: #e8734a;
  --glass: rgba(255, 248, 240, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Положение элементов фона — считает assets/main.js по высоте экрана. */
  --group-top: 15%;
  --city-h: 34%;
  --sun-top: 80%;
  --birds-top: 66%;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #f3b696;
}

body {
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Страница — ровно экран, без прокрутки. */
.page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

/* ── Фон: закат над Калининградом ── */
.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
  background: linear-gradient(180deg, #f7e4d3 0%, #f7d3ba 40%, #f3b696 68%, #ee9e7d 85%, #e98a68 100%);
}
.bg__dusk {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e6daee 0%, #e4bfcb 40%, #e59d8a 70%, #da7e62 100%);
  opacity: 0;
  animation: achDusk 36s ease-in-out infinite;
}
.bg__glow, .bg__sun {
  position: absolute;
  left: 50%;
  top: var(--sun-top);
  border-radius: 50%;
  animation: achSun 36s ease-in-out infinite;
}
.bg__glow {
  width: 80cqmin;
  height: 80cqmin;
  margin-top: -40cqmin;
  background: radial-gradient(circle, rgba(255, 236, 206, 1) 0%, rgba(255, 206, 160, 0.75) 18%, rgba(255, 190, 140, 0.25) 40%, rgba(255, 180, 130, 0) 65%);
}
.bg__sun {
  width: 9cqmin;
  height: 9cqmin;
  margin-top: -4.5cqmin;
  background: #ffe6c2;
}
.bg__birds {
  position: absolute;
  left: 0;
  top: var(--birds-top);
  animation: achBirds 70s linear infinite;
}
.bg__birds svg { display: block; animation: achFlap 1.4s ease-in-out infinite; }
.bg__city {
  position: absolute;
  left: -60px;
  right: -60px;
  bottom: 0;
  height: var(--city-h);
}
.bg__city svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.bg__layer { position: absolute; inset: 0; will-change: transform; }
.bg__haze {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  height: 30%;
  background: linear-gradient(180deg, rgba(250, 222, 204, 0) 0%, rgba(250, 222, 204, 0.55) 60%, rgba(250, 222, 204, 0) 100%);
}
.bg__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22220%22 height=%22220%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.85%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
}

/* ── Содержимое ── */
.main { position: absolute; inset: 0; }

.group {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--group-top);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: achRise 900ms var(--ease) 100ms both;
}
.brand__mark {
  font-size: clamp(36px, 6.5cqh, 64px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.brand__name {
  margin: 8px 0 0;
  font-size: clamp(52px, min(16cqw, 10cqh), 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.brand__tagline {
  margin-top: 10px;
  font-size: clamp(17px, min(4.8cqw, 2.8cqh), 26px);
  font-weight: 500;
  color: var(--ink-2);
}

.topics {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 2.4cqw, 11px);
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  white-space: nowrap;
  animation: achRise 700ms var(--ease) 420ms both;
}
.topics__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.stores {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 36px;
  animation: achRise 900ms var(--ease) 820ms both;
}
.store {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 14px 0 12px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  border-radius: 9px;
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms;
}
.store svg { flex: none; }
.store__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.store__small { font-size: 10px; font-weight: 500; }
.store__big { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.store--gp { gap: 9px; }
.store--gp .store__small { font-size: 9px; letter-spacing: 0.06em; }
.store--gp .store__big { font-size: 19px; margin-top: 3px; }
/* На Android первым — Google Play (класс ставит main.js). */
.is-android .store--gp { order: -1; }

.site {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(31, 27, 23, 0.3);
  text-underline-offset: 5px;
  transition: text-decoration-color 160ms, color 160ms;
  animation: achRise 900ms var(--ease) 820ms both;
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  animation: achRise 900ms var(--ease) 1050ms both;
}
.social { position: relative; }
.social__link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  transition: transform 180ms var(--ease), background-color 180ms;
}
.social__link svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.social__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: #fff8f0;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.footer {
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-3);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.footer a { color: inherit; text-decoration: none; }
/* Позиционируется обёртка: анимация transform делает её точкой отсчёта для absolute внутри. */
.footer-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(env(safe-area-inset-bottom), 14px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: achRise 900ms var(--ease) 1200ms both;
}
.footer-wrap > * { pointer-events: auto; }

/* Десктоп/широкий планшет: QR справа. */
.qr {
  display: none;
  position: absolute;
  right: clamp(32px, 5cqw, 80px);
  top: var(--group-top);
  width: 232px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 248, 240, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  animation: achRise 900ms var(--ease) 1250ms both;
}
.qr__code { background: #fff; border-radius: 14px; overflow: hidden; }
.qr__code img { display: block; width: 200px; height: 200px; }
.qr__text { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
@container (min-width: 900px) {
  .qr { display: flex; }
}

/* Низкий экран (телефон боком): всё сжимаем, чтобы влезло над подписью внизу. */
@container (max-height: 560px) {
  .brand__mark { font-size: 26px; }
  .brand__name { margin-top: 4px; font-size: 44px; }
  .brand__tagline { margin-top: 4px; font-size: 15px; }
  .topics { display: none; }
  .stores { margin-top: 14px; }
  .store { height: 44px; }
  .site { margin-top: 10px; padding: 6px 14px; font-size: 15px; }
  .socials { margin-top: 10px; }
  .qr { display: none; }
}

/* ── Наведение и нажатие ── */
@media (hover: hover) {
  .store:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31, 27, 23, 0.22); }
  .site:hover { text-decoration-color: var(--accent); }
  .social__link:hover { transform: translateY(-2px); background-color: rgba(255, 248, 240, 0.9); }
  .social:hover .social__tip { opacity: 1; visibility: visible; animation: achTip 180ms ease-out both; }
}
.store:active { transform: scale(0.96); box-shadow: none; }
.social__link:active { transform: scale(0.92); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Анимации ── */
@keyframes achRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes achTip { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes achDusk { 0%, 100% { opacity: 0; } 50% { opacity: 0.8; } }
@keyframes achSun { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10cqh); } }
@keyframes achGlow { 0%, 100% { opacity: 0.35; transform: scale(0.9); } 50% { opacity: 0.9; transform: scale(1.2); } }
@keyframes achLamp { 0%, 30% { opacity: 0; } 42%, 70% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes achRipple { 0% { transform: scale(0.5); opacity: 0.75; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes achRouteDraw { 0% { stroke-dasharray: 1; stroke-dashoffset: 1; } 60%, 90% { stroke-dasharray: 1; stroke-dashoffset: 0; } 100% { stroke-dasharray: 1; stroke-dashoffset: -1; } }
@keyframes achDash { to { stroke-dashoffset: -14; } }
@keyframes achGlint { 0%, 100% { opacity: 0; } 50% { opacity: 0.8; } }
@keyframes achBirds { from { transform: translateX(-10cqw); } to { transform: translateX(110cqw); } }
@keyframes achFlap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.4); } }
@keyframes achShimmer { 0%, 100% { opacity: 0.5; transform: scaleX(1); } 50% { opacity: 0.85; transform: scaleX(1.15); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
