@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('assets/fonts/inter-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('assets/fonts/inter-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 {
  color-scheme: light;
  --burgundy: #41041e;
  --text: #440012;
  --pink: #e41146;
  --page-max: 470px;
  --gutter: clamp(16px, 4.7vw, 24px);
  --radius: clamp(18px, 4.8vw, 26px);
}
* { box-sizing: border-box; }
/* Как приложение: без масштабирования щипком и двойным тапом, только вертикальная прокрутка */
html { height: 100%; -webkit-text-size-adjust: 100%; touch-action: pan-y; }
body {
  margin: 0; min-height: 100%;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--burgundy); background: #feeaf2;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }

/* Фон на всю страницу, колонка по центру на любой ширине */
.page {
  width: 100%; min-height: 100vh; min-height: 100dvh;
  display: flex; justify-content: center; overflow: hidden;
  background: linear-gradient(180deg, #fef3f6 0%, #feeaf2 45%, #f7dfee 100%);
}

/* Один экран на телефоне: блоки раздвигаются по высоте. Если экран ниже контента — страница скроллится */
.screen {
  width: 100%; max-width: var(--page-max);
  min-height: 100vh; min-height: 100dvh;
  padding: env(safe-area-inset-top, 0px) var(--gutter) calc(clamp(8px, 1.6dvh, 16px) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(4px, 1dvh, 12px);
  position: relative; isolation: isolate;
}
/* Размытые розовые пятна по бокам, как в макете */
.screen::before {
  content: ""; z-index: -1; pointer-events: none;
  position: absolute; inset: 0 calc(-1 * var(--gutter));
  background:
    radial-gradient(circle 140px at -40px 31%, #ffb0ce 0%, rgba(255, 176, 206, .55) 40%, rgba(255, 200, 222, 0) 100%),
    radial-gradient(circle 150px at -50px 73%, #ffb9d4 0%, rgba(255, 185, 212, .5) 40%, rgba(255, 210, 228, 0) 100%),
    radial-gradient(circle 160px at calc(100% + 50px) 55%, #ffb6d2 0%, rgba(255, 182, 210, .5) 40%, rgba(255, 210, 228, 0) 100%),
    radial-gradient(circle 130px at calc(100% + 30px) 93%, #ffbcd6 0%, rgba(255, 188, 214, .5) 40%, rgba(255, 210, 228, 0) 100%),
    radial-gradient(circle 110px at calc(100% + 10px) 13%, rgba(255, 180, 210, .7) 0%, rgba(255, 200, 222, 0) 100%);
}
/* Волны внизу страницы, под подвалом */
.screen::after {
  content: ""; z-index: -1; pointer-events: none;
  position: absolute; inset: auto calc(-1 * var(--gutter)) 0;
  height: 8dvh; min-height: 40px;
  background: url('assets/footer-waves.webp') bottom center / 100% 100% no-repeat; opacity: .92;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%); mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
}

/* Сердца и заголовок — одним блоком, заголовок сразу под сердцами, как в макете */
.head { flex: 0 0 auto; }
.hearts-art {
  width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter));
  aspect-ratio: 941 / 224; max-height: 125px;
  background: url('assets/hearts-header.webp') top center / 100% 100% no-repeat;
  /* нижний край полоски растворяется в фоне, а не обрывается линией */
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}

/* Заголовок */
.title {
  margin: -.25em -8px 0; position: relative; z-index: 1;
  font-size: clamp(22px, 5.8vw, 28px); line-height: 1.06; letter-spacing: -.01em;
  font-weight: 700; text-align: center; color: var(--burgundy); text-wrap: balance;
}
.title__accent { color: var(--pink); display: inline-block; margin-top: .08em; position: relative; }
.title__stroke { position: absolute; right: -1%; bottom: -.6em; width: 58%; height: .5em; overflow: visible; }

/* Плеер */
.demo {
  width: 100%; position: relative; flex: 0 1 auto;
  height: clamp(150px, 23dvh, 230px); min-height: 150px;
  border-radius: var(--radius); border: 2px solid rgba(255, 252, 253, .96);
  background: #561932;
  box-shadow: 0 0 0 2.5px #feaad4, 0 10px 28px rgba(220, 60, 130, .32), 0 0 30px rgba(254, 130, 195, .5);
}
.demo__cover {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit;
  /* Фон вырезан из макета (затемнение уже в картинке), сверху лёгкая подложка под текст */
  background:
    linear-gradient(180deg, rgba(40, 10, 30, .22) 0%, rgba(40, 10, 30, 0) 35%),
    url('assets/player-cover.webp') center center / cover no-repeat;
}
.demo__header { position: absolute; z-index: 1; top: 6%; left: 6.5%; right: 5.3%; display: flex; align-items: center; gap: clamp(8px, 2.4vw, 12px); color: #fff; }
.demo__avatar {
  width: clamp(32px, 9vw, 44px); height: clamp(32px, 9vw, 44px); border-radius: 50%; flex-shrink: 0;
  background: url('assets/avatar.webp') center / cover no-repeat #df5088;
  border: 1.5px solid #fff; box-shadow: 0 2px 8px #4d082566;
}
.demo__meta { min-width: 0; flex: 1; }
.demo__title { margin: 0; font-size: clamp(12px, 3.3vw, 16px); line-height: 1.15; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo__subtitle { margin: 2px 0 0; font-size: clamp(10px, 2.6vw, 13px); color: #f0c9d6; font-weight: 400; }
.demo__badge {
  flex: none; border-radius: 100px; padding: .42em .85em;
  font-size: clamp(11px, 2.9vw, 14px); white-space: nowrap; font-weight: 600; color: #fff;
  background: linear-gradient(100deg, #fb9b6f, #fd4d71);
  box-shadow: 0 3px 10px rgba(253, 77, 113, .4);
}
.demo__bottom {
  position: absolute; z-index: 1; bottom: 10%; left: 9.4%; right: 4.7%;
  display: flex; align-items: center; gap: clamp(10px, 4.5vw, 22px);
  height: 22%; min-height: 36px; padding: 0 clamp(10px, 2.6vw, 13px) 0 2px;
  background: rgba(45, 22, 26, .72); border: 1px solid rgba(255, 255, 255, .28); border-radius: 100px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* Кнопка play: без grid и процентов внутри <button> — иначе Safari её ломает */
.demo__play {
  all: unset; box-sizing: border-box; position: relative; flex: 0 0 auto;
  width: clamp(42px, 11vw, 50px); height: clamp(42px, 11vw, 50px);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 50%;
  background: rgba(72, 50, 50, .85); cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transition: transform .2s, background .2s; -webkit-tap-highlight-color: transparent;
}
.demo__play:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo__play:active { transform: scale(.93); }
.demo__play svg { display: block; width: clamp(20px, 5.2vw, 24px); height: clamp(20px, 5.2vw, 24px); }
.demo__play .pause-icon { display: none; }
.demo__play.is-playing .play-icon { display: none; }
.demo__play.is-playing .pause-icon { display: block; }
/* Пульсирующее кольцо — приглашает нажать */
.demo__play::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7); pointer-events: none;
  animation: ring 2.2s ease-out infinite;
}
.demo__play.is-playing::after { animation: none; opacity: 0; }
.wave { display: flex; align-items: center; justify-content: space-between; flex: 1; height: 70%; overflow: hidden; cursor: pointer; }
.wave > span {
  display: block; flex: 0 0 3px; height: var(--h); background: #fc4058; border-radius: 3px; opacity: .95;
  transform-origin: center; animation: wave .9s ease-in-out infinite alternate;
}
.wave > span:nth-child(2n) { animation-delay: -.25s; }
.wave > span:nth-child(3n) { animation-delay: -.5s; }
.wave > span:nth-child(4n) { animation-delay: -.7s; }
.wave > span:nth-child(5n) { animation-delay: -.35s; }
.wave > span:nth-child(7n) { animation-delay: -.6s; }
.wave > span:nth-child(n+22) { background: #cfa2ac; }
.demo.is-playing .wave > span { animation-duration: .45s; }
.demo__time { color: #e8d3d5; font-variant-numeric: tabular-nums; flex: none; font-size: clamp(10px, 2.6vw, 13px); white-space: nowrap; font-weight: 400; }
.demo__hearts {
  position: absolute; z-index: 2; left: -2.6%; bottom: -6.9%;
  width: 16.2%; height: auto; display: block;
  filter: drop-shadow(0 5px 10px rgba(140, 0, 60, .3));
  animation: float 3.4s ease-in-out infinite;
}

/* Карточка подарков */
.gift {
  flex: 0 1 auto; border-radius: var(--radius);
  background: rgba(255, 243, 248, .9);
  border: 1.5px solid rgba(255, 255, 255, .98); outline: 1.5px solid #fbd0e0;
  box-shadow: 0 8px 26px rgba(240, 120, 170, .22), inset 0 0 22px #fff8fa;
  padding: clamp(8px, 2.2vw, 10px) clamp(14px, 3.4vw, 16px) clamp(12px, 3.8vw, 18px) clamp(18px, 7vw, 33px);
}
.gift__header { display: flex; align-items: center; gap: clamp(6px, 1.6vw, 8px); margin-bottom: clamp(6px, 1.8vw, 8px); }
.gift__icon { height: clamp(34px, 9vw, 43px); width: clamp(34px, 9vw, 43px); flex: none; color: #fb0058; filter: drop-shadow(0 2px 3px #ed86ae80); transform-origin: 50% 90%; animation: wiggle 4s ease-in-out 1.5s infinite; }
.gift__title {
  margin: 0; font-size: clamp(16px, 5vw, 23.5px); font-weight: 700; line-height: 1.05; letter-spacing: -.015em;
  padding: .15em .55em; background: #ffe0ec; border-radius: 24px; color: var(--burgundy);
}
.gift__title em { font-style: normal; color: #e8134f; }
.gift__list { padding: 0; margin: 0; list-style: none; display: grid; gap: clamp(6px, 1.7vw, 8px); }
.gift__list li { display: flex; align-items: center; gap: clamp(10px, 3vw, 15px); font-size: clamp(13px, 3.4vw, 16px); font-weight: 650; line-height: 1.2; color: var(--text); }
.gift__emoji { font-size: clamp(18px, 4.8vw, 22px); line-height: 1; height: 1em; width: clamp(26px, 7vw, 34px); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Кнопки. Минимум 44px по высоте — удобно попадать пальцем */
.actions { display: grid; gap: clamp(8px, 1.4dvh, 12px); }
.cta {
  position: relative; overflow: hidden;
  height: clamp(56px, 8.6dvh, 76px); border-radius: 100px;
  display: flex; align-items: center; gap: clamp(8px, 2.8vw, 14px); padding: 0 clamp(14px, 4vw, 20px) 0 clamp(14px, 5vw, 26px);
  text-decoration: none; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
  transition: filter .18s, transform .18s; -webkit-tap-highlight-color: transparent;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: scale(.985); }
.cta--tg { background: linear-gradient(180deg, #1fb2f5 0%, #0b89d5 60%, #0172d7 100%); box-shadow: 0 8px 20px rgba(20, 110, 210, .35), inset 0 2px 2px rgba(255, 255, 255, .45); }
.cta--max { background: linear-gradient(180deg, #9d4dfb 0%, #712fe9 60%, #5922db 100%); box-shadow: 0 8px 20px rgba(95, 40, 210, .35), inset 0 2px 2px rgba(255, 255, 255, .4); }
/* Блик, пробегающий по кнопке раз в несколько секунд */
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
  transform: translateX(-130%); animation: shine 4.5s ease-in-out infinite;
}
.cta--max::before { animation-delay: 1.2s; }
.cta__icon { width: clamp(34px, 10vw, 48px); height: clamp(34px, 10vw, 48px); flex: none; filter: drop-shadow(0 2px 3px rgba(0, 40, 90, .35)); }
.cta__logo {
  flex: none; width: clamp(32px, 9.6vw, 46px); height: clamp(32px, 9.6vw, 46px); padding: 3px;
  background: #fff; border-radius: 10px; box-shadow: 0 2px 6px rgba(40, 10, 100, .35); display: grid; place-items: center;
}
.cta__logo img { width: 100%; height: 100%; display: block; border-radius: 7px; }
.cta__divider { height: 58%; width: 1.5px; background: rgba(255, 255, 255, .6); flex: none; }
.cta__label { flex: 1; min-width: 0; text-align: center; font-size: clamp(15px, 4.3vw, 22px); font-weight: 600; white-space: nowrap; letter-spacing: -.02em; }
.cta__arrow { flex: none; width: clamp(22px, 5.6vw, 28px); height: clamp(22px, 5.6vw, 28px); }

/* Реквизиты: не меньше 10px, иначе на телефоне не прочитать */
/* Подвал: минимально — две тонкие строки, место отдаём кнопкам */
.footer {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center; color: #6b4457; font-size: 9px; line-height: 1.25; font-weight: 500;
}
.footer__line, .footer__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.footer__line span, .footer__links a { white-space: nowrap; }
.footer__line i, .footer__links i { font-style: normal; color: #d98fae; padding: 0 5px; font-weight: 700; }
.footer__links a { text-decoration: underline; text-decoration-color: rgba(107, 68, 87, .35); text-underline-offset: 2px; }
.footer__links a:active { color: var(--pink); }

.toast {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1000; left: 50%;
  width: max-content; max-width: calc(100% - 32px); transform: translate(-50%, 20px);
  padding: 11px 14px; border-radius: 14px; background: #48132d; color: #fff; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; box-shadow: 0 8px 25px #0003;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Невысокие телефоны (iPhone SE, старые Android): компактнее, чтобы остаться в одном экране */
@media (max-height: 720px) and (max-width: 768px) {
  .screen { gap: 4px; }
  .title { font-size: clamp(21px, 5.9vw, 26px); }
  .demo { height: clamp(120px, 22dvh, 170px); min-height: 120px; }
  .gift { padding: 8px 12px 12px clamp(14px, 5.5vw, 24px); }
  .gift__header { margin-bottom: 5px; }
  .gift__title { font-size: clamp(15px, 4.4vw, 19px); }
  .gift__list { gap: 5px; }
  .gift__list li { font-size: clamp(12px, 3.3vw, 15px); }
  .cta { height: clamp(52px, 8.8dvh, 64px); }
}

/* Реквизиты не влезают в строку — ОГРНИП уходит на вторую без висящей точки */
@media (max-width: 385px) {
  .footer__line i:last-of-type { display: none; }
  .footer__line span:last-child { flex-basis: 100%; }
}

/* Узкие экраны (320px) */
@media (max-width: 350px) {
  .gift { padding-left: 14px; padding-right: 12px; }
  .gift__emoji { width: 24px; }
  .gift__list li { font-size: 11.5px; }
  .demo__header { gap: 6px; }
  .demo__badge { padding: .35em .6em; }
  .cta__label { font-size: 14px; }
  .footer { font-size: 8.5px; }
}

/* Горизонтальный телефон: в один экран не влезает — фиксируем нормальные размеры и даём скролл */
@media (max-height: 560px) {
  .screen { gap: 12px; padding-top: 0; padding-bottom: 16px; justify-content: flex-start; }
  .screen::after { height: 40px; }
  .hearts-art { max-height: 100px; }
  .demo { height: 200px; }
  .demo__hearts { width: 16%; }
  .actions { gap: 12px; }
  .cta { height: 60px; }
}

/* Анимации */
.title, .demo, .gift, .actions, .footer { animation: rise .45s ease-out both; }
.demo { animation-delay: .08s; }
.gift { animation-delay: .16s; }
.actions { animation-delay: .24s; }
.footer { animation-delay: .3s; }
.title__stroke path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .6s ease-out .5s forwards; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wave { from { transform: scaleY(.3); opacity: .6; } to { transform: scaleY(1.65); opacity: 1; } }
@keyframes ring { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes shine { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 82% { transform: rotate(6deg); } 88% { transform: rotate(-4deg); } 94% { transform: rotate(2deg); } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .title__stroke path { stroke-dashoffset: 0; }
}
