/* Дима Билан, я хочу с тобой сфотографироваться.
   Значения цветов, размеров и анимаций — из макета «Сайт для Димы» (Main.dc.html). */

:root {
  --bg: #0E0716;
  --text: #F6F1FA;
  --muted: #CFC4DC;
  --muted-2: #9C8FB0;
  --accent: #FF3D9A;
  --accent-soft: #FF85BF;
  --yellow: #F4FF3D;
  --pink-deep: #D4166F;
  --paper: #FFF9F2;
  --ink: #1A1026;
  --ink-muted: #5B4A6E;
  --ink-soft: #2A1B3D;
  --line: #2D1F42;
  --stripe-a: #1C1029;
  --stripe-b: #24153A;

  --font-display: Unbounded, system-ui, sans-serif;
  --font-body: Manrope, system-ui, sans-serif;
  --font-hand: "Marck Script", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-soft); }

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

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nowrap { white-space: nowrap; }
.accent { color: var(--accent); }

.chrome {
  background: linear-gradient(180deg, #FFFFFF 0%, #D9D2E6 38%, #7C7390 52%, #F2EEF8 64%, #B9B1C9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page {
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--bg);
  /* блёстки */
  background-image:
    radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 61, 154, .5) 1px, transparent 1.5px);
  background-size: 46px 46px, 73px 73px;
  background-position: 0 0, 23px 31px;
}

/* ---------- бегущая строка ---------- */

.marquee {
  background: var(--accent);
  color: var(--bg);
  padding: 12px 0;
  overflow: hidden;
  border-bottom: 3px solid var(--yellow);
}

.marquee__track {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .04em;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

/* отступ внутри span, а не gap: тогда -50% ровно равно одной копии и шов не дёргается */
.marquee__track > span { padding-right: 40px; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- hero ---------- */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  text-align: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(18px, 5.6vw, 80px);
  line-height: 1;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 28px;
  text-align: left;
}

.sticker {
  background: var(--yellow);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 34px);
  padding: 14px 24px;
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--accent);
  transform: rotate(-8deg);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1) rotate(-8deg); }
  50% { transform: scale(1.08) rotate(-4deg); }
}

.hero__lead {
  margin: 0;
  max-width: 340px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s;
}

.btn--accent { background: var(--accent); color: var(--bg); }
.btn--accent:hover { background: var(--accent-soft); color: var(--bg); }

.btn--ghost { border: 2px solid var(--text); color: var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--bg); }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
}

/* коллаж «я + ты = 1 фото» */

.equation {
  width: 100%;
  max-width: 1040px;
  padding: 0 clamp(4px, 1.5vw, 20px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(8px, 2.6vw, 36px);
}

.equation__result { display: contents; }

.me {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: clamp(4px, .8vw, 10px) solid var(--text);
  border-bottom-width: clamp(26px, 5.4vw, 70px);
  background: var(--stripe-a);
  transform: rotate(-5deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}

.me img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.me figcaption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: clamp(26px, 5.4vw, 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hand);
  font-size: clamp(14px, 2.6vw, 32px);
  color: var(--ink-soft);
}

.op {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 6.8vw, 88px);
  line-height: 1;
}

.slot {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: clamp(2px, .35vw, 4px) dashed var(--accent);
  border-radius: 6px;
  background: rgba(255, 61, 154, .08);
  transform: rotate(4deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.1vw, 14px);
  padding: clamp(4px, 1.5vw, 20px);
  text-align: center;
}

.slot svg { width: 36%; height: auto; }

.slot__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(8px, 1.7vw, 22px);
  color: var(--accent);
  text-transform: uppercase;
}

.slot__note {
  font-size: clamp(7px, 1.1vw, 14px);
  color: var(--muted);
}

.burst {
  position: relative;
  width: clamp(52px, 13vw, 170px);
  aspect-ratio: 1 / 1;
}

.burst svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 14s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.burst__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6px, 1.15vw, 15px);
  line-height: 1.1;
  color: var(--bg);
  transform: rotate(-12deg);
}

/* на телефоне «= всего 1 фото» уходит второй строкой, чтобы карточки не превращались в марки */
@media (max-width: 600px) {
  .equation {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    row-gap: 28px;
  }
  .equation__result {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
  }
  .op { font-size: 34px; }
  .me { border-width: 6px; border-bottom-width: 34px; }
  .me figcaption { height: 34px; font-size: 20px; }
  .slot { border-width: 2px; gap: 6px; padding: 8px; }
  .slot__title { font-size: 11px; }
  .slot__note { font-size: 10px; }
  .burst { width: 104px; }
  .burst__label { font-size: 12px; }
}

/* ---------- цифры ---------- */

.stats {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: rgba(14, 7, 22, .7);
}

.stats__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 6vw, 72px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__label { font-size: 16px; color: var(--muted); }

.stat--zero .stat__value { color: var(--accent); }
.stat--zero .stat__label { color: var(--text); font-weight: 800; }

/* ---------- письмо ---------- */

.letter { padding: 104px 24px 16px; }

.letter__wrap {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.letter__tape {
  position: absolute;
  top: -26px;
  left: 50%;
  z-index: 1;
  width: 160px;
  height: 44px;
  background: rgba(244, 255, 61, .75);
  transform: translateX(-50%) rotate(-3deg);
}

.letter__paper {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(32px, 6vw, 72px);
  border-radius: 4px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .55), 12px 12px 0 var(--accent);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.letter__paper h2 {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1;
  color: var(--pink-deep);
}

.letter__paper p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

.letter__sign {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.letter__sign-pre { font-size: 16px; color: var(--ink-muted); }

.letter__sign-name {
  font-family: var(--font-hand);
  font-size: 40px;
  color: var(--ink);
}

/* ---------- ретроспектива ---------- */

.retro {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.retro__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--yellow);
}

.retro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.05;
  text-transform: uppercase;
}

.retro__lead {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.retro__hint { display: none; }

.retro__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 36px 28px;
}

.shot {
  margin: 0;
  background: var(--text);
  padding: 14px 14px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .3s ease;
}

.shot:nth-child(6n + 1) { --tilt: -2deg; }
.shot:nth-child(6n + 2) { --tilt: 1.5deg; }
.shot:nth-child(6n + 3) { --tilt: -1deg; }
.shot:nth-child(6n + 4) { --tilt: 2deg; }
.shot:nth-child(6n + 5) { --tilt: -2.5deg; }
.shot:nth-child(6n + 6) { --tilt: 1deg; }

@media (hover: hover) {
  .shot:hover { transform: rotate(0deg) scale(1.02); }
}

.shot__zoom {
  display: block;
  cursor: zoom-in;
}

.shot__img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--stripe-a);
}

.shot__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
}

.shot__year {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  color: var(--pink-deep);
}

.shot__text {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 22px;
  line-height: 1.2;
}

.shot--future { background: var(--yellow); }

.shot__placeholder {
  aspect-ratio: 4 / 5;
  border: 3px dashed var(--pink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--pink-deep);
}

/* 2006 и 2008: фото нет, есть телевизор */

.tv {
  aspect-ratio: 4 / 5;
  background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 14px, var(--stripe-b) 14px 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 48px 16px 16px;
  text-align: center;
}

.tv__set {
  position: relative;
  width: 80%;
  aspect-ratio: 4 / 3;
  padding: 10px;
  border-radius: 18px;
  background: var(--ink-soft);
  box-shadow: inset 0 0 0 3px #3B2756, 0 14px 28px rgba(0, 0, 0, .45);
}

/* антенны */
.tv__set::before,
.tv__set::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 3px;
  height: 38px;
  background: var(--muted-2);
  border-radius: 2px;
  transform-origin: 50% 100%;
}
.tv__set::before { transform: rotate(-32deg); }
.tv__set::after { transform: rotate(28deg); }

.tv__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 61, 154, .6), #1A0D2B 72%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

/* строки кинескопа */
.tv__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 4px);
  pointer-events: none;
}

.tv__live {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.tv__song {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(15px, 1.7vw, 21px);
  line-height: 1.05;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(255, 61, 154, .9);
}

.tv__place {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yellow);
}

.tv__note {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--muted);
}

/* на телефоне ретроспектива листается вбок, как сторис */
@media (max-width: 639px) {
  .retro { gap: 32px; }
  .retro__hint {
    display: block;
    margin: -12px 0 -20px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted-2);
    text-align: right;
  }
  .retro__grid {
    display: flex;
    gap: 22px;
    margin: 0 -24px;
    padding: 28px 24px 36px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    scrollbar-width: none;
  }
  .retro__grid::-webkit-scrollbar { display: none; }
  .shot {
    flex: 0 0 min(80%, 320px);
    scroll-snap-align: center;
  }
}

/* ---------- финал: да / нет ---------- */

.cta {
  background: var(--accent);
  color: var(--bg);
  padding: 88px 24px;
  overflow: hidden;
}

.cta__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.02;
  text-transform: uppercase;
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  font-size: 16px;
}

.chips li {
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
}

.answer {
  position: relative;
  width: 100%;
  min-height: 280px;
  padding: 0 clamp(0px, 12vw - 32px, 140px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: 24px;
}

.answer[hidden] { display: none; }

.btn-yes {
  min-height: 64px;
  padding: 0 44px;
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--bg);
  transition: transform .15s, box-shadow .15s;
}

.btn-yes:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--bg); }
.btn-yes:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--bg); }
.btn-yes:focus-visible, .btn-no:focus-visible { outline-color: var(--bg); }

.btn-no {
  position: relative;
  z-index: 2;
  min-height: 52px;
  padding: 0 30px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: transparent;
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}

.yay {
  background: var(--bg);
  color: var(--text);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  box-shadow: 10px 10px 0 var(--yellow);
}

.yay[hidden] { display: none; }

.yay__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--yellow);
  outline: none;
}

.yay__text {
  max-width: 520px;
  font-size: 18px;
  line-height: 1.5;
}

.yay__contact {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent-soft);
}

.cta__noscript { margin: 0; font-weight: 800; font-size: 18px; }
.cta__noscript a { color: var(--bg); }

/* ---------- подвал ---------- */

.footer {
  padding: 56px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--muted-2);
}

.share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.share__title {
  margin: 0;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.share__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 7, 22, .7);
  color: var(--text);
  font: 800 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.share__btn:hover { border-color: var(--accent); color: var(--text); }
.share__btn--native { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.share__btn--native:hover { color: var(--bg); }
.share__btn[hidden] { display: none; }

.share__status {
  min-height: 1.4em;
  margin: 0;
  color: var(--yellow);
  font-weight: 800;
}

.footer__credits { margin: 0; }

.footer__note {
  margin: 0;
  max-width: 560px;
  font-size: 12px;
  opacity: .75;
}

/* ---------- просмотр сторис ---------- */

/* сам диалог прозрачный: крестик висит над картинкой и не закрывает текст сторис */
.lightbox {
  width: min(92vw, 460px);
  max-width: none;
  max-height: none;
  padding: 56px 0 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop { background: rgba(14, 7, 22, .88); }

.lightbox__bar {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
}

.lightbox__close {
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.lightbox__close:hover { border-color: var(--accent); }

.lightbox__img {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

/* ---------- конфетти ---------- */

.confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

/* ---------- меньше движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .sticker, .burst svg { animation: none; }
  .btn, .btn-no, .btn-yes, .shot { transition: none; }
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px;
  text-align: center;
}

.notfound__code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(96px, 22vw, 220px);
  line-height: 1;
}

.notfound__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 3.6vw, 40px);
  line-height: 1.15;
  text-transform: uppercase;
}
