/* Event-specific editorial polish for Mikhailo & Olena. */
@font-face {
  font-family: "Marianna Wedding";
  src: url("../fonts/marianna.ttf") format("truetype");
  font-display: swap;
}
.hero__bg::after {
  background:
    linear-gradient(90deg, rgba(251,249,245,.68), rgba(251,249,245,.2) 36%, rgba(251,249,245,.2) 64%, rgba(251,249,245,.68)),
    linear-gradient(180deg, rgba(251,249,245,.44), rgba(251,249,245,.1) 55%, rgba(251,249,245,.58));
}
.hero__inner { max-width: 760px; padding: 5rem 1rem 2rem; }
.hero__eyebrow { color: var(--ink); }
.hero__names {
  font-family: "Marianna Wedding", var(--font-display);
  font-size: clamp(3.8rem, 10vw, 8rem);
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 1px 20px rgba(251,249,245,.65);
}
.hero__sep { display: inline-block; font-style: italic; font-size: .72em; margin-inline: .06em; }
.hero__date { font-size: clamp(1.25rem, 3vw, 1.75rem); }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.15rem); }
.hero__calendar { margin-top: 2rem; }
.btn--calendar { background: rgba(251,249,245,.88); color: var(--ink); border-color: var(--ink); backdrop-filter: blur(8px); }
.btn--calendar:hover { background: var(--ink); color: #fff; }

.gallery__grid { grid-auto-flow: dense; }
.gallery__item { position: relative; }
@media (min-width: 768px) {
  .gallery__grid { grid-template-columns: 1.15fr .8fr 1.15fr; grid-auto-rows: 230px; }
  .gallery__item img { height: 100%; aspect-ratio: auto; }
  .gallery__item:nth-child(1), .gallery__item:nth-child(5) { grid-row: span 2; }
  .gallery__item:nth-child(2) { grid-row: span 1; }
  .gallery__item:nth-child(3) { grid-column: 2 / 4; }
}

.timeline__list { position: relative; max-width: 680px; margin-inline: auto; }
.timeline__list::before { content: ""; position: absolute; left: 27px; top: 2rem; bottom: 2rem; width: 1px; background: var(--line); }
.timeline__item { position: relative; display: grid; grid-template-columns: 56px 90px minmax(0,1fr); align-items: center; text-align: left; gap: 1.25rem; padding: 1.5rem 0; border: 0; }
.timeline__marker { position: relative; z-index: 1; width: 54px; height: 54px; border: 1px solid var(--accent); border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--accent-deep); font-size: .65rem; letter-spacing: .1em; }
.timeline__time { font-size: 1.4rem; }
.timeline__copy { display: flex; flex-direction: column; gap: .35rem; }
.timeline__title { font-size: 1rem; }
.timeline__note { opacity: .55; }

.dresscode { overflow: hidden; }
.dresscode .container { max-width: 1040px; }
.dresscode__text { font-size: 1.05rem; max-width: 38rem; }
.dresscode__palette { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: start; gap: clamp(.4rem, 1.5vw, 1rem); margin: 1.5rem 0 3.5rem; }
.swatch { display: grid; justify-items: center; align-content: start; gap: .7rem; min-width: 0; }
.swatch__chip {
  width: min(100%, 132px); height: auto; aspect-ratio: 1;
  border: 1px solid rgba(118,100,68,.25); border-radius: 50%;
  background-color: var(--swatch); background-position: center; background-size: cover;
  box-shadow: 0 10px 28px rgba(45,41,34,.13), inset 0 0 0 1px rgba(255,255,255,.48);
  transition: transform .45s ease, box-shadow .45s ease;
}
.swatch:nth-child(1) .swatch__chip { background-image: url("../img/fabric-ivory.png"); }
.swatch:nth-child(2) .swatch__chip { background-image: url("../img/fabric-sand.png"); }
.swatch:nth-child(3) .swatch__chip { background-image: url("../img/fabric-mocha.png"); }
.swatch:nth-child(4) .swatch__chip { background-image: url("../img/fabric-stone.png"); }
.swatch:nth-child(5) .swatch__chip { background-image: url("../img/fabric-charcoal.png"); }
.swatch__name { font-size: .56rem; line-height: 1.25; text-align: center; }
@media (hover:hover) { .swatch:hover .swatch__chip { transform: translateY(-5px) scale(1.025); box-shadow: 0 16px 34px rgba(45,41,34,.18), inset 0 0 0 1px rgba(255,255,255,.54); } }

.music-toggle {
  width: 62px; height: 62px;
  right: clamp(1rem, 3vw, 2rem); top: 5.5rem; bottom: auto;
  background: rgba(251,249,245,.92);
  box-shadow: 0 10px 35px rgba(27,28,26,.16);
  backdrop-filter: blur(10px);
  animation: music-float 3.4s ease-in-out infinite;
}
.music-toggle::after { content: "Музика"; position: absolute; right: 70px; padding: .45rem .65rem; border: 1px solid var(--line); background: rgba(251,249,245,.94); font-size: .55rem; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.music-toggle.is-playing::before { content: ""; position: absolute; inset: -7px; border: 1px solid var(--accent); border-radius: 50%; animation: music-pulse 1.8s ease-out infinite; }

.venue { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.venue__img-wrap { order: -1; }
.venue__map { margin: .75rem 0 1.5rem; overflow: hidden; }
.venue__map iframe { display: block; border: 0; width: 100%; height: 190px; filter: grayscale(.85) sepia(.12); }
.venue__route { margin-top: auto; }

.wishes__grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wish { padding: 2.5rem clamp(1.5rem,3vw,3rem); }
.wish + .wish { border-left: 1px solid var(--line); }
.wish__number { display: block; color: var(--accent); font-size: .65rem; letter-spacing: .2em; margin-bottom: 2rem; }
.wish__title { font-size: 1.55rem; margin-bottom: 1rem; }
.wish__text { color: var(--ink-2); }

.calendar-dialog { width: min(92vw, 520px); border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: clamp(2rem,5vw,3.5rem); text-align: center; box-shadow: 0 30px 100px rgba(27,28,26,.22); }
.calendar-dialog::backdrop { background: rgba(27,28,26,.56); backdrop-filter: blur(5px); }
.calendar-dialog__close { position: absolute; top: .8rem; right: 1rem; border: 0; background: transparent; font-size: 2rem; line-height: 1; color: var(--muted); }
.calendar-dialog__title { font-size: var(--fs-h2); margin-bottom: 2rem; }
.calendar-dialog__actions { display: grid; gap: .8rem; }

@media (max-width: 767px) {
  .nav__brand { font-size: 1.15rem; }
  .hero { min-height: 92svh; }
  .hero__bg { background-position: 52% center; }
  .hero__inner { padding-top: 3.5rem; }
  .hero__names { font-size: clamp(4.2rem, 21vw, 6.2rem); line-height: 1; }
  .hero__names .hero__sep { display: block; margin: .16em 0; line-height: .7; }
  .hero__subtitle { max-width: 28ch; }
  .timeline__item { grid-template-columns: 48px minmax(0,1fr); gap: .8rem 1rem; }
  .timeline__list::before { left: 23px; }
  .timeline__marker { width: 46px; height: 46px; }
  .timeline__time { font-size: 1.2rem; }
  .timeline__copy { grid-column: 2; }
  .timeline__title { font-size: .84rem; letter-spacing: .09em; }
  .timeline__note { font-size: .6rem; }
  .swatch__name { font-size: .48rem; letter-spacing: .08em; }
  .music-toggle { width: 54px; height: 54px; top: 4.5rem; }
  .music-toggle::after { display: none; }
  .wishes__grid { grid-template-columns: 1fr; }
  .wish + .wish { border-left: 0; border-top: 1px solid var(--line); }
  .wish { padding-inline: .5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__bg { animation: hero-breathe 12s ease-out both; }
  .hero__eyebrow { animation: hero-copy-in .9s .1s both; }
  .hero__names { animation: hero-names-in 1.35s .2s both; }
  .hero__divider, .hero__date, .hero__subtitle, .hero__calendar { animation: hero-copy-in .9s .7s both; }
  .swatch:nth-child(1) { transition-delay: 0ms; }
  .swatch:nth-child(2) { transition-delay: 80ms; }
  .swatch:nth-child(3) { transition-delay: 160ms; }
  .swatch:nth-child(4) { transition-delay: 240ms; }
  .swatch:nth-child(5) { transition-delay: 320ms; }
  @keyframes hero-breathe { from { transform: scale(1.06); } to { transform: scale(1); } }
  @keyframes hero-names-in { from { opacity: 0; transform: translateY(28px) scale(.96); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes hero-copy-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes music-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  @keyframes music-pulse { from { opacity: .65; transform: scale(.88); } to { opacity: 0; transform: scale(1.18); } }
}
