/* ===========================================================
   «Є привід» · стиль «Нитка»
   Кремовий папір і бордо, каліграфія, одна нитка проходить крізь увесь день.
   =========================================================== */
:root {
  --paper: #FDF6F1;
  --wine: #7E0F22;
  --wine-2: #6A0A1B;
  --ink: #3A2A2B;
  --muted: #86706F;
  --script: 'Marck Script', 'Bad Script', cursive;
  --body: 'Manrope', system-ui, sans-serif;
  /* Текстура зім'ятого паперу для бордових блоків */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --crumple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='7'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='3'%3E%3CfeDistantLight azimuth='45' elevation='55'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .33 0 0 0 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }

.backdrop { display: none; }
.sheet { max-width: 560px; margin: 0 auto; background: var(--paper); position: relative; overflow: hidden; }

.blk { padding: 56px 28px; position: relative; text-align: center; }
.blk p { margin: 0 0 12px; font-size: 15px; font-weight: 400; }
.script { font-family: var(--script); color: var(--wine); font-weight: 400; line-height: 1.1; }
.h { font-family: var(--script); color: var(--wine); font-weight: 400; font-size: 40px; line-height: 1.1; margin: 0 0 16px; }

/* Бордовий блок із текстурою паперу */
.wine { background: var(--crumple), var(--grain), var(--wine); background-size: 600px, 240px, auto; color: #FBEFEA; }
.wine .h, .wine .script { color: #FFF4EE; }

/* Кнопка-рамка */
.btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 34px;
  min-width: 240px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(58,42,43,.35);
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }

/* Хвилясті переходи між блоками */
.wave { display: block; width: 100%; height: 46px; margin: -1px 0; }

/* Нитка: тонка бордова лінія */
.thread path { fill: none; stroke: var(--wine); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- 1. Обкладинка ---------- */
.hero { padding: 46px 22px 40px; text-align: left; }
.to { font-size: 13px; color: var(--muted); letter-spacing: .08em; margin-bottom: 10px; text-align: center; }
.names { margin: 0; font-family: var(--script); font-weight: 400; color: var(--ink); line-height: .9; position: relative; z-index: 2; }
.names .a { display: block; font-size: clamp(54px, 15vw, 78px); padding-left: 18%; }
.names .amp { display: block; font-size: 34px; color: var(--wine); padding-left: 60%; margin: -4px 0; }
.names .b { display: block; font-size: clamp(54px, 15vw, 78px); padding-left: 32%; }
.names .cap { font-size: 1.3em; color: var(--wine); margin-right: -.1em; }
/* Блідий рукописний підпис позаду імен */
.ghost { position: absolute; left: 6%; top: 44%; font-family: var(--script); font-size: 64px; color: var(--wine); opacity: .08; transform: rotate(-14deg); pointer-events: none; }
.motto { font-family: var(--script); font-size: 26px; color: var(--wine); transform: rotate(-10deg); margin: 12px 0 0 8%; display: inline-block; position: relative; z-index: 2; }
.pair { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 26px; z-index: 1; }
.pair img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.pair img:first-child { filter: grayscale(1); }
.hero .thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- 2. Вступ і «наш вересень» ---------- */
.intro p { max-width: 360px; margin-left: auto; margin-right: auto; color: var(--ink); }
.month { font-size: 34px; margin: 30px 0 18px; }
.days { display: flex; justify-content: center; align-items: center; gap: 12px; }
.days > span { display: flex; align-items: center; justify-content: center; border: 1px solid rgba(58,42,43,.45); border-radius: 6px; font-size: 15px; color: var(--ink); }
.days .s1 { width: 36px; height: 42px; opacity: .6; font-size: 13px; }
.days .s2 { width: 44px; height: 50px; }
.days .on { width: 78px; height: 72px; border: 0; position: relative; color: #fff; font-size: 20px; font-weight: 600; }
.days .on svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.days .on b { position: relative; font-weight: 600; }

/* ---------- 3. Програма дня вздовж нитки ---------- */
.flow { position: relative; margin: 0 -28px; }
.flow > .thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.stop { position: relative; min-height: 190px; display: flex; align-items: center; padding: 0 28px; }
.stop .box { width: 62%; text-align: left; }
.stop.r { justify-content: flex-end; }
.stop.r .box { text-align: left; }
.stop .t { font-family: var(--script); font-size: 30px; color: var(--wine); display: block; }
.stop .n { font-family: var(--script); font-size: 30px; color: var(--ink); display: block; line-height: 1.05; margin-bottom: 6px; }
.stop p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- 4. Локація на бордо ---------- */
.place { border-radius: 4px; margin: 10px 18px 0; padding: 46px 24px 34px; }
.place .h { font-size: 46px; }
.place p { color: #F3DED8; }

/* ---------- 5. Велике ч/б фото ---------- */
.wide img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.05) sepia(.08); }

/* ---------- 6. Звернення на бордо з серцем на нитці ---------- */
.letter { padding: 60px 30px 50px; }
.letter p { max-width: 330px; margin-left: auto; margin-right: auto; color: #F6E4DE; }
.letter .wait { font-size: 36px; margin: 26px 0 0; }
.heartline { position: relative; height: 90px; margin: 14px -30px; }
.heartline svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.heartline path.l { fill: none; stroke: #FFF4EE; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.heartline .hh { position: absolute; left: 50%; top: 50%; width: 72px; height: 66px; transform: translate(-50%, -50%); }
.sign { letter-spacing: .12em; text-transform: uppercase; font-size: 15px; color: #FFF4EE; margin-top: 18px; }

/* ---------- 7. Підпис по дузі й фото ---------- */
.arcblk { padding-top: 26px; }
.arc { display: block; width: 100%; height: 70px; overflow: visible; }
.arc text { font-family: var(--body); font-size: 15px; fill: var(--ink); }
.arcphoto { position: relative; width: min(78%, 330px); margin: 0 auto; }
.arcphoto img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }
.arcphoto .flag { position: absolute; right: -16px; top: -16px; width: 40px; height: 80px; background: var(--wine); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); }

/* ---------- 8. «Ми скажемо ТАК» і таймер ---------- */
.yes { position: relative; margin: 34px 0 6px; }
.yes .big { font-family: var(--script); font-size: 110px; line-height: .8; color: var(--wine); opacity: .2; margin-top: -6px; }
.yes .over { font-family: var(--script); font-size: 30px; color: var(--wine); position: relative; z-index: 1; }
.yes .via { font-size: 15px; color: var(--ink); margin-top: -18px; }
.count { display: flex; justify-content: center; align-items: flex-start; gap: 6px; margin-top: 10px; }
.count .u b { display: block; font-size: 36px; font-weight: 300; letter-spacing: .02em; line-height: 1; color: var(--ink); min-width: 54px; }
.count .u small { font-size: 11px; color: var(--muted); }
.count .sep { font-size: 30px; font-weight: 300; line-height: 1; color: var(--ink); }

/* ---------- 9. Анкета ---------- */
.formcard { margin-top: 18px; text-align: left; background: #fff; border-radius: 12px; padding: 22px 18px; box-shadow: 0 10px 30px rgba(126,15,34,.08); }

/* ---------- 10. Побажання, дрес-код, контакти на бордо ---------- */
.wineinfo { text-align: left; padding: 46px 32px 50px; }
.wineinfo .item + .item { margin-top: 40px; }
.wineinfo .h { font-size: 36px; }
.wineinfo p { color: #F3DED8; }
.dots { display: flex; gap: 10px; margin-top: 10px; }
.dots i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,244,238,.55); }
.wineinfo .btn { min-width: 220px; text-align: center; }
.wineinfo a.tel { color: #FFF4EE; }
.foot { text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,244,238,.65); margin-top: 46px; }

/* Плавна поява */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* ---------- Комп'ютер ---------- */
@media (min-width: 900px) {
  .backdrop { display: block; position: fixed; inset: -40px; background: var(--bg) center / cover no-repeat; filter: grayscale(1) blur(10px) brightness(.55); z-index: -1; }
  body { background: #2a2526; }
  .sheet { max-width: 1080px; margin: 50px auto; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
  .blk { padding: 80px 90px; }
  .blk p { font-size: 16px; }
  .h { font-size: 50px; }

  /* Обкладинка: імена ліворуч, фото праворуч */
  .hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding: 80px 70px; }
  .hero .left { grid-column: 1; }
  .pair { grid-column: 2; margin: 0; }
  .names .a, .names .b { font-size: 92px; }
  .motto { font-size: 32px; }

  .flow { max-width: 760px; margin: 0 auto; }
  .stop { min-height: 170px; }
  .stop .box { width: 46%; }

  .place { margin: 10px 90px 0; padding: 60px; }
  .wide img { aspect-ratio: 21 / 9; }

  /* Звернення: текст і серце поруч */
  .letter p { max-width: 520px; }

  .arcblk { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .arcblk .arcwrap { grid-column: 1; }
  .arcblk .after { grid-column: 2; }
  .yes { margin-top: 0; }
  .count .u b { font-size: 48px; min-width: 70px; }

  .formcard { max-width: 560px; margin-left: auto; margin-right: auto; }

  .wineinfo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px; padding: 70px 90px; }
  .wineinfo .item + .item { margin-top: 0; }
  .wineinfo .foot { grid-column: 1 / -1; }
}

/* Довга нитка програми малюється повільніше */
.flow > .thread path { transition-duration: 4.5s !important; }
