/* =========================================================
   Владик & Сашуля — свадебное приглашение (v2)
   Тема: завтраки. Реальная палитра свадьбы (Pantone) + движение.
   ========================================================= */

:root {
  /* Палитра из Pantone-карточек дресс-кода */
  --merlot:      #5E2A32;   /* 19-1534 Merlot — главный акцент */
  --merlot-deep: #47202A;
  --blush:       #C48A86;   /* 15-1614 Blush */
  --blush-deep:  #A96E6A;   /* для рукописных акцентов (контрастнее) */
  --blush-soft:  #ECD6D2;   /* мягкий фон секции */
  --butter:      #EFE0A3;   /* 11-0616 Butter Yellow */
  --black:       #2C2830;   /* 19-3911 Black Beauty — текст */

  /* Тема завтрака */
  --yolk:      #F4B400;
  --yolk-soft: #FBD866;

  /* Светлый фон */
  --cream:     #FBF3DE;
  --cream-hi:  #FFF9EC;
  --card:      #FFFBEF;

  --text:      #2C2830;
  --text-soft: #8A6E63;

  --phone-w: 460px;

  --f-display: "Playfair Display", Georgia, serif;
  --f-body:    "Cormorant Garamond", Georgia, serif;
  --f-script:  "Marck Script", "Cormorant Garamond", cursive;
  --f-util:    "Montserrat", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-body); color: var(--text);
  background: var(--cream); line-height: 1.5; }
img { max-width: 100%; display: block; }

/* ---------- Десктоп-подложка + телефон ---------- */
.stage {
  min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center;
  background:
    radial-gradient(90% 55% at 50% 0%, var(--yolk-soft), transparent 60%),
    radial-gradient(80% 50% at 50% 100%, var(--blush-soft), transparent 60%),
    #F1E3BE;
}
.phone { width: 100%; max-width: var(--phone-w); background: var(--cream);
  overflow: hidden; position: relative; box-shadow: 0 24px 70px rgba(94,42,50,.30); }
@media (min-width: 500px) {
  .stage { padding: 28px 16px; align-items: flex-start; }
  .phone { border-radius: 22px; }
}

/* ---------- Утилиты ---------- */
.eyebrow { font-family: var(--f-util); font-size: 11px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--merlot); font-weight: 600; }

.head { position: relative; text-align: center; margin-bottom: 6px; }
.head__script { display: block; font-family: var(--f-script); font-size: 34px; line-height: 1;
  color: var(--blush-deep); transform: rotate(-4deg); margin-bottom: -14px; position: relative; z-index: 2; }
.head__caps { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 40px;
  letter-spacing: .02em; line-height: .96; color: var(--merlot); text-transform: uppercase; }
.head--center { text-align: center; }
.head__script--light { color: var(--yolk); }
.head__caps--light { color: var(--merlot); }

.sprig { display: block; height: 30px; width: 120px; margin: 12px auto 20px;
  background: no-repeat center/contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34'%3E%3Cg fill='none' stroke='%23C48A86' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 17h100'/%3E%3Cpath d='M60 17c-6-7-14-9-22-8 3 8 12 11 22 8zM60 17c6-7 14-9 22-8-3 8-12 11-22 8z'/%3E%3C/g%3E%3Ccircle cx='60' cy='17' r='2.6' fill='%235E2A32'/%3E%3C/svg%3E"); }

.prose { font-size: 19px; color: var(--text); }
.prose p { margin: 0 0 14px; }
.prose--center { text-align: center; max-width: 34ch; margin-inline: auto; }
.muted { color: var(--text-soft); font-style: italic; font-size: 17px; }

.btn { display: inline-block; font-family: var(--f-util); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none; padding: 13px 26px; border-radius: 100px;
  border: 1.6px solid var(--merlot); color: var(--merlot); background: transparent; cursor: pointer;
  transition: background .22s, color .22s, transform .1s; }
.btn:hover { background: var(--merlot); color: var(--cream-hi); }
.btn:active { transform: translateY(1px); }
.btn--map { margin-top: 4px; }
.btn--solid { background: var(--merlot); color: var(--cream-hi); }
.btn--solid:hover { background: var(--merlot-deep); }

/* =========================================================
   Плавающие иконки завтрака
   ========================================================= */
.floater { position: absolute; width: 48px; height: 44px; z-index: 1; pointer-events: none;
  opacity: .95; background: center/contain no-repeat; animation: floaty 6s ease-in-out infinite; will-change: transform; }
.floater--egg   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 50'%3E%3Cellipse cx='30' cy='28' rx='26' ry='19' fill='%23FFFDF4' stroke='%23EFE0A3' stroke-width='2'/%3E%3Ccircle cx='30' cy='25' r='10' fill='%23F4B400'/%3E%3C/svg%3E"); animation-duration: 6.5s; }
.floater--crois { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 50'%3E%3Cpath d='M8 34c8-18 36-18 44 0-10-6-16-6-22-6s-12 0-22 6z' fill='%23E8A54B' stroke='%23C67F2E' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); animation-duration: 7.5s; }
.floater--toast { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 50'%3E%3Cpath d='M12 20c0-9 36-9 36 0v22a4 4 0 0 1-4 4H16a4 4 0 0 1-4-4z' fill='%23E8B968' stroke='%23C6902E' stroke-width='2'/%3E%3Crect x='20' y='24' width='20' height='13' rx='3' fill='%23C6902E' opacity='.32'/%3E%3C/svg%3E"); animation-duration: 8s; }
.floater--coffee{ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 50'%3E%3Cpath d='M14 18h26v14a10 10 0 0 1-10 10h-6a10 10 0 0 1-10-10z' fill='%23FBF3E0' stroke='%235E2A32' stroke-width='2'/%3E%3Cpath d='M40 22h5a5 5 0 0 1 0 10h-5' fill='none' stroke='%235E2A32' stroke-width='2'/%3E%3C/svg%3E"); animation-duration: 7s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-14px) rotate(5deg); } }

/* =========================================================
   Смешные фото-вырезки
   ========================================================= */
.cutout { position: absolute; width: 92px; z-index: 3; pointer-events: none;
  animation: wiggle 5s ease-in-out infinite; will-change: transform; }
.cutout img { width: 100%; filter: drop-shadow(0 8px 12px rgba(94,42,50,.22)); }
.cutout--hero    { width: 82px; bottom: 3%; right: 6px; transform: rotate(7deg); }
.cutout--flowers { top: 7%; left: 6px; transform: rotate(-6deg); }
.cutout.is-empty { height: 104px; border: 2px dashed var(--merlot); border-radius: 16px; background: rgba(94,42,50,.06); }
.cutout--hero.is-empty { height: 96px; }
.cutout.is-empty img { display: none; }
.cutout.is-empty::after { content: attr(data-label); position: absolute; inset: 0; padding: 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 600 9px/1.35 var(--f-util); letter-spacing: .12em; text-transform: uppercase; color: var(--merlot); }
@keyframes wiggle { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* =========================================================
   Бегущие строки
   ========================================================= */
.marquee { overflow: hidden; white-space: nowrap; padding: 12px 0; border-block: 2px solid rgba(94,42,50,.14); }
.marquee--yolk   { background: var(--yolk);   color: var(--merlot); }
.marquee--merlot { background: var(--merlot); color: var(--cream-hi); border-color: rgba(255,255,255,.22); }
.marquee--butter { background: var(--butter); color: var(--merlot); }
.marquee__track { display: inline-flex; width: max-content; animation: marquee 20s linear infinite; }
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__track span { font-family: var(--f-display); font-weight: 700; font-style: italic;
  font-size: 22px; text-transform: lowercase; padding-right: 4px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

/* =========================================================
   ПЕРВЫЙ ЭКРАН
   ========================================================= */
.first { height: 100dvh; min-height: 540px; display: flex; flex-direction: column; }
.hero { position: relative; overflow: hidden; flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 24px 26px;
  background: radial-gradient(120% 80% at 50% 12%, var(--yolk-soft), transparent 60%),
    linear-gradient(180deg, var(--cream-hi), var(--cream)); }
.hero .eyebrow { display: block; margin-bottom: 14px; }
.fry { width: 120px; margin: 0 auto 2px; }
.fry__egg { display: block; transform-origin: 50% 60%; animation: rock 3.2s ease-in-out infinite; }
@keyframes rock { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.hero__names { margin: 4px 0 0; font-family: var(--f-display); font-weight: 700; line-height: .98; color: var(--merlot); }
.hero__name { display: block; font-size: clamp(42px, 13vw, 56px); letter-spacing: .01em; }
.hero__amp  { display: block; font-family: var(--f-script); font-size: clamp(30px, 9vw, 38px);
  color: var(--blush-deep); font-weight: 400; margin: 2px 0; }
.hero__date { font-family: var(--f-util); font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  margin: 18px 0 4px; color: var(--text); }
.hero__city { font-family: var(--f-util); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--text-soft); margin: 0; }
.scroll-hint { display: block; width: 26px; height: 42px; margin: 22px auto 0;
  border: 1.6px solid rgba(94,42,50,.45); border-radius: 14px; position: relative; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px;
  background: var(--merlot); border-radius: 2px; animation: scrolldot 1.6s ease-in-out infinite; }
@keyframes scrolldot { 0%{opacity:0;transform:translateY(0)} 40%{opacity:1} 100%{opacity:0;transform:translateY(14px)} }
.first .marquee { flex: 0 0 auto; }

/* =========================================================
   Скролл-сцена: яйца разъезжаются
   ========================================================= */
.pan-scene { padding: 30px 26px 34px; background: var(--cream); }
.pan-stage { position: relative; height: 130px; display: flex; align-items: center; justify-content: center; }
.pan-egg { position: absolute; width: 108px; z-index: 2; will-change: transform; }
.pan-egg--l { transform: translateX(calc(var(--p, 0) * -128px)) rotate(calc(var(--p, 0) * -14deg)); }
.pan-egg--r { transform: translateX(calc(var(--p, 0) *  128px)) rotate(calc(var(--p, 0) *  14deg)); }
.pan-word { position: relative; z-index: 1; font-family: var(--f-script); font-size: 30px; line-height: 1.05;
  color: var(--merlot); text-align: center; opacity: var(--p, 0); transition: opacity .2s linear; }

/* =========================================================
   Секции
   ========================================================= */
.section { padding: 52px 26px; position: relative; overflow: hidden; }
.section--invite { text-align: center; }
.section--invite .prose { font-size: 20px; }

/* Программа + таймлайн */
.section--program { background: var(--cream-hi); }
.journey { position: relative; }
.day { padding: 22px 20px; background: var(--card); border: 1px solid rgba(94,42,50,.12);
  border-radius: 16px; position: relative; overflow: hidden; }
.day::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--merlot); }
.day[data-accent="yolk"]::before  { background: var(--yolk); }
.day[data-accent="blush"]::before { background: var(--blush); }
.day__meta { display: flex; align-items: baseline; justify-content: space-between; }
.day__no { font-family: var(--f-util); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--merlot); }
.day[data-accent="yolk"] .day__no  { color: #B98A00; }
.day[data-accent="blush"] .day__no { color: var(--blush-deep); }
.day__date { font-family: var(--f-util); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.day__place { margin: 8px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.02;
  text-transform: uppercase; color: var(--merlot); }
.day__place span { display: block; font-family: var(--f-script); font-weight: 400; font-size: 22px;
  text-transform: none; color: var(--blush-deep); transform: rotate(-3deg); margin-bottom: -6px; }
.times { margin: 4px 0 12px; display: grid; gap: 8px; }
.times > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  border-bottom: 1px dotted rgba(44,40,48,.28); padding-bottom: 6px; }
.times dt { font-family: var(--f-util); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.times dd { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 20px; color: var(--text); }
.day__addr { margin: 0 0 14px; font-size: 18px; color: var(--text); }
.day__note { margin: 12px 0 0; font-family: var(--f-body); font-style: italic; font-size: 17px; color: var(--text-soft); }

/* Таймлайн между днями */
.daylink { position: relative; height: 66px; display: flex; align-items: center; justify-content: center; }
.daylink__line { position: absolute; top: 0; height: 100%; width: 6px; }
.daylink__line line { stroke: var(--blush); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round;
  animation: dashflow 1.1s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -11; } }
.daylink__badge { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  background: var(--card) center/24px 24px no-repeat; border: 1.6px solid var(--merlot);
  box-shadow: 0 3px 10px rgba(94,42,50,.18); animation: bob 2.6s ease-in-out infinite; }
.daylink__badge--heart { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5-8-11a4.4 4.4 0 0 1 8-2.6A4.4 4.4 0 0 1 20 10c0 6-8 11-8 11z' fill='%23C48A86' stroke='%235E2A32' stroke-width='1.3'/%3E%3C/svg%3E"); }
.daylink__badge--beer { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Crect x='6' y='7' width='9' height='15' fill='%23F4B400' opacity='.55'/%3E%3Cg fill='none' stroke='%235E2A32' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h9v14a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 6 21z'/%3E%3Cpath d='M15 10h2.5a2.5 2.5 0 0 1 0 5H15'/%3E%3Cpath d='M6 7c0-2.4 2-3 4.5-3s4.5 .6 4.5 3'/%3E%3C/g%3E%3C/svg%3E"); }
@keyframes bob { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* Дресс-код */
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 20px; margin: 24px auto 8px; max-width: 340px; }
.pcolor { flex: 0 0 92px; margin: 0; text-align: center; }
.pcolor img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; box-shadow: 0 5px 14px rgba(94,42,50,.18); }
.pcolor figcaption { margin-top: 8px; font-family: var(--f-util); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.dress-sub { text-align: center; font-family: var(--f-util); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blush-deep); margin: 30px 0 14px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.look { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 3/4; cursor: pointer;
  background: linear-gradient(135deg, var(--blush-soft), var(--butter)); }
.look img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.look:hover img, .look:focus-visible img { transform: scale(1.06); }

/* Вместо цветов */
.section--flowers { background: var(--blush-soft); text-align: center; }
.section--flowers .head__script { color: var(--merlot); }
.section--flowers .head__caps   { color: var(--merlot-deep); }
.section--flowers .prose { font-size: 20px; }
.beer { display: block; width: 34px; height: 40px; margin: 12px auto 20px; background: center/contain no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Crect x='10' y='12' width='15' height='9' fill='%23F4B400' opacity='.6'/%3E%3Cg fill='none' stroke='%235E2A32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 12h15v26a2 2 0 0 1-2 2H12a2 2 0 0 1-2-2z'/%3E%3Cpath d='M25 17h4a4 4 0 0 1 4 4v4a4 4 0 0 1-4 4h-4'/%3E%3Cpath d='M10 12c0-4 3-5 7-5s8 1 8 5'/%3E%3Cpath d='M14 24v11M20 24v11'/%3E%3C/g%3E%3C/svg%3E"); }
.beer--rock { transform-origin: 50% 80%; animation: rock 2.6s ease-in-out infinite; }

/* Гостям из других городов */
.section--stay { text-align: center; background: var(--cream-hi); }
.section--stay .btn { margin-top: 22px; }

/* Финал */
.footer { position: relative; overflow: hidden; text-align: center; padding: 52px 26px 44px;
  background: radial-gradient(100% 80% at 50% 0%, var(--yolk-soft), transparent 55%),
    linear-gradient(180deg, var(--cream-hi), var(--blush-soft)); }
.footer__names { font-family: var(--f-display); font-weight: 700; font-size: 30px; margin: 16px 0 4px; color: var(--merlot); }
.footer__date { font-family: var(--f-util); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 6px; }
.footer__note { font-family: var(--f-script); font-size: 22px; color: var(--blush-deep); margin: 0 0 24px; }
.footer__contacts { display: grid; gap: 10px; }
.footer__contacts a { font-family: var(--f-util); font-size: 12px; letter-spacing: .08em; color: var(--text); text-decoration: none; }
.footer__contacts a:hover { color: var(--merlot); }

/* =========================================================
   Лайтбокс
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(38,35,42,.93); padding: 20px; }
.lightbox.is-open { display: flex; }
.lb__stage { margin: 0; max-width: 100%; max-height: 100%; display: flex; }
.lb__img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb__close, .lb__nav { border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; line-height: 1; }
.lb__close:hover, .lb__nav:hover { background: rgba(255,255,255,.3); }
.lb__close { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; font-size: 26px; border-radius: 50%; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; border-radius: 50%; }
.lb__prev { left: 10px; }
.lb__next { right: 10px; }
.lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8);
  font-family: var(--f-util); font-size: 12px; letter-spacing: .1em; }

/* =========================================================
   Появление секций
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
:focus-visible { outline: 2px solid var(--merlot); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .floater, .fry__egg, .beer--rock, .cutout, .scroll-hint span, .marquee__track,
  .daylink__line line, .daylink__badge { animation: none !important; }
  .pan-egg--l, .pan-egg--r { transform: none; }
  .pan-word { opacity: 1; }
  * { scroll-behavior: auto !important; }
}
