:root {
  --cream: #fff6ef;
  --cream-2: #fdeee2;
  --rose: #e08098;
  --rose-deep: #c25c78;
  --berry: #5b3340;
  --gold: #d9a441;
  --ink: #4a2b35;
  --shadow: 0 18px 40px rgba(122, 62, 82, .14);
  --script: 'Marck Script', cursive;
  --serif: 'PT Serif', Georgia, serif;
  --sans: 'PT Sans', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; }
code {
  background: rgba(194, 92, 120, .1);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: .92em;
}

/* ===== Навигация ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: rgba(255, 246, 239, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(194, 92, 120, .12);
}
.nav-logo {
  font-family: var(--script); font-size: 26px;
  color: var(--rose-deep); text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; font-size: 15px; color: var(--berry);
  opacity: .85; transition: .25s;
}
.nav-links a:hover { opacity: 1; color: var(--rose-deep); }

/* ===== Герой ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 22px 80px;
  background:
    linear-gradient(180deg, rgba(255, 246, 239, .72), rgba(255, 240, 231, .9)),
    url(../images/hero.jpg) center/cover no-repeat;
  overflow: hidden;
}
.hearts {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; }
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(224, 128, 152, .35);
  color: var(--rose-deep);
  padding: 8px 18px; border-radius: 999px;
  font-size: 14px; letter-spacing: .4px; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.08; color: var(--berry); margin-bottom: 20px;
}
.hero h1 em {
  font-family: var(--script); color: var(--rose-deep); font-size: 1.12em;
}
.hero-lead {
  font-size: clamp(17px, 2.4vw, 21px);
  max-width: 560px; margin: 0 auto 34px; color: #6b4450;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  border: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px;
  font-size: 17px; font-family: var(--sans);
  transition: transform .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px); }
.btn-main {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff; box-shadow: 0 14px 30px rgba(194, 92, 120, .35);
}
.btn-ghost {
  background: rgba(255, 255, 255, .8); color: var(--rose-deep);
  border: 1.5px solid rgba(194, 92, 120, .4);
}
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--rose-deep); text-decoration: none; font-size: 14px; opacity: .8;
}

/* ===== Секции ===== */
.section { padding: 92px 22px; max-width: 1120px; margin: 0 auto; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  text-align: center; color: var(--berry); margin-bottom: 14px;
}
.section-title em { font-family: var(--script); color: var(--rose-deep); }
.section-lead {
  text-align: center; max-width: 620px; margin: 0 auto 42px;
  font-size: 18px; color: #7a5261;
}
.hint { font-size: 15px; color: #8a6272; margin-top: 22px; }
.hint.center { text-align: center; }

/* ===== Письмо ===== */
.letter-card {
  max-width: 720px; margin: 0 auto;
  background: #fffdf9; border-radius: 26px; padding: 46px 48px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(217, 164, 65, .25);
  font-family: var(--serif); font-size: 19px;
}
.letter-card p { margin-bottom: 18px; }
.letter-fin {
  font-family: var(--script); font-size: 30px; color: var(--rose-deep);
  margin-top: 26px;
}
.signature {
  font-family: var(--script); font-size: 24px; color: var(--gold);
  text-align: right; margin-bottom: 0;
}

/* ===== Плеер ===== */
.player {
  max-width: 640px; margin: 0 auto;
  background: #fffdf9; border-radius: 26px; padding: 32px 34px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(224, 128, 152, .18);
}
.player-top { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.disc {
  width: 74px; height: 74px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  box-shadow: 0 10px 24px rgba(194, 92, 120, .35);
  animation: spinSlow 9s linear infinite; animation-play-state: paused;
}
.player.playing .disc { animation-play-state: running; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.now-label {
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--rose-deep); opacity: .8;
}
.now-title { font-family: var(--serif); font-size: 22px; color: var(--berry); }
.now-note { font-size: 14px; color: #8a6272; }

.progress-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: #8a6272; margin-bottom: 18px;
}
input[type="range"] {
  flex: 1; accent-color: var(--rose-deep); cursor: pointer; height: 6px;
}
.controls {
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
}
.ctrl {
  border: none; cursor: pointer; border-radius: 50%;
  width: 48px; height: 48px; font-size: 18px;
  background: rgba(224, 128, 152, .16); color: var(--rose-deep);
  transition: transform .2s, background .2s;
}
.ctrl:hover { transform: scale(1.08); background: rgba(224, 128, 152, .3); }
.ctrl-main {
  width: 64px; height: 64px; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  box-shadow: 0 12px 26px rgba(194, 92, 120, .4);
}
.volume {
  display: flex; align-items: center; gap: 8px; margin-left: auto; width: 150px;
}

.playlist { list-style: none; }
.playlist li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; cursor: pointer;
  transition: background .2s;
}
.playlist li:hover { background: rgba(224, 128, 152, .1); }
.playlist li.active { background: rgba(224, 128, 152, .18); }
.pl-num {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: rgba(224, 128, 152, .2); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.pl-title { font-size: 16px; color: var(--berry); }
.pl-note { font-size: 13px; color: #8a6272; }
.pl-dur { margin-left: auto; color: var(--rose-deep); opacity: .7; }

.more-songs { max-width: 640px; margin: 38px auto 0; text-align: center; }
.more-songs h3 {
  font-family: var(--serif); font-size: 22px; color: var(--berry); margin-bottom: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  text-decoration: none; font-size: 15px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(224, 128, 152, .14); color: var(--rose-deep);
  border: 1px solid rgba(224, 128, 152, .3);
  transition: .25s;
}
.chip:hover { background: rgba(224, 128, 152, .28); transform: translateY(-2px); }

/* ===== Галерея ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.shot {
  position: relative; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow); cursor: zoom-in;
  background: #fff;
}
.shot img {
  width: 100%; height: 320px; object-fit: cover;
  transition: transform .5s ease;
}
.shot:hover img { transform: scale(1.07); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(74, 43, 53, .72));
  color: #fff; font-size: 15px;
}

/* ===== Факты ===== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.fact {
  background: #fffdf9; border-radius: 22px; padding: 28px 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(217, 164, 65, .18);
  transition: transform .3s;
}
.fact:hover { transform: translateY(-5px); }
.fact-emoji { font-size: 34px; display: block; margin-bottom: 12px; }
.fact p { font-size: 16px; color: #5d3a46; }

/* ===== Стихи ===== */
.poems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.poem {
  background: #fffdf9; border-radius: 22px; padding: 32px 30px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--gold);
  font-family: var(--serif); font-style: italic;
  font-size: 18px; color: var(--berry); line-height: 1.9;
}

/* ===== Финал ===== */
.finale {
  position: relative; overflow: hidden; text-align: center;
  padding: 110px 22px;
  background: linear-gradient(135deg, #f9cdd7, #fbe3d5, #f6b7c6);
}
.finale h2 {
  font-family: var(--serif); font-size: clamp(36px, 6vw, 64px);
  color: var(--berry); margin-bottom: 12px; position: relative;
}
.finale h2 em { font-family: var(--script); color: var(--rose-deep); }
.finale p {
  position: relative;
  font-size: 22px; color: var(--berry); margin-bottom: 30px;
}
.finale .btn { position: relative; }

footer {
  text-align: center; padding: 26px 18px;
  background: var(--berry); color: rgba(255, 246, 239, .85);
  font-size: 14px;
}

/* ===== Светлячки-сердечки ===== */
.heart {
  position: absolute; bottom: -60px;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
  user-select: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: .9; }
  100% { transform: translateY(-105vh) rotate(28deg); opacity: 0; }
}
@keyframes burstUp {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  15%  { opacity: 1; transform: translateY(-20px) scale(1.15); }
  100% { transform: translateY(-300px) scale(1); opacity: 0; }
}
.heart.burst { animation: burstUp ease-out forwards; }

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(46, 24, 32, .88);
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(92vw, 900px); max-height: 78vh;
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox p { color: #ffe9df; font-size: 18px; font-family: var(--script); }
.lb-close {
  position: absolute; top: 22px; right: 26px;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 20px;
  background: rgba(255, 255, 255, .18); color: #fff;
}

/* ===== Появление при скролле ===== */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Адаптив ===== */
@media (max-width: 720px) {
  .nav { padding: 12px 16px; }
  .nav-links { gap: 13px; }
  .nav-links a { font-size: 13px; }
  .section { padding: 70px 16px; }
  .letter-card { padding: 32px 24px; font-size: 17px; }
  .player { padding: 24px 18px; }
  .volume { width: 110px; }
  .shot img { height: 260px; }
}
