/* Cream, linen and warm taupe. Shared tokens keep every section consistent. */
:root {
  --bg: #f8f5ef;
  --surface: #fffdf8;
  --cream: #f0e8dc;
  --linen: #e6dccd;
  --text: #423c35;
  --muted: #70675d;
  --accent: #89715a;
  --accent-dark: #6c5743;
  --line: #ded3c4;
  --radius: 24px;
  --shadow: 0 14px 44px #64513d0c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: 'Golos Text', sans-serif;
  font-size: clamp(15px, .8vw + 9px, 17px); line-height: 1.7;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.page-backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 10% 10%, #ffffffb3, transparent 55%),
    radial-gradient(ellipse at 90% 80%, #e6dccd66, transparent 55%);
}
.page { width: min(100%, 1600px); margin-inline: auto; }
.panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: min(850px, 100svh);
  padding: clamp(64px, 8vw, 128px) clamp(20px, 6vw, 96px);
}
.panel + .panel { border-top: 1px solid #ded3c466; }
.section-inner { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin-inline: auto; }
.parallax-layer {
  position: absolute; inset: -180px -10%; z-index: -1; pointer-events: none;
  will-change: transform;
}
.layer-hero {
  background: radial-gradient(ellipse at 12% 22%, #fffefa 0%, transparent 45%),
    radial-gradient(ellipse at 90% 55%, #e6dccd99, transparent 48%),
    linear-gradient(145deg, #faf8f3, #f0e8dc);
}
.layer-soft {
  background: radial-gradient(ellipse at 85% 30%, #e6dccd70, transparent 55%),
    linear-gradient(145deg, #fffdf8, #f5efe5);
}
.panel:nth-child(2n+1) .layer-soft {
  background: radial-gradient(ellipse at 12% 75%, #e6dccd80, transparent 55%), linear-gradient(145deg, #f5efe5, #fffdf8);
}
.eyebrow, .place-card__label {
  color: var(--accent-dark); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; margin: 0 0 12px;
}
.section-head { text-align: center; margin-bottom: clamp(28px, 4vw, 50px); }
h1, h2, h3, .hero__title { font-family: 'Cormorant Garamond', serif; font-weight: 500; line-height: 1.15; }
h2 { font-size: clamp(30px, 3.4vw, 48px); margin: 0; text-wrap: balance; }
h3 { font-size: clamp(23px, 2vw, 30px); margin: 0 0 12px; }
p { margin: 0; }
.hero__subtitle, .form-section__lead, .place-card p, .timeline-item__content p, .dress__lead, .footer__lead, .muted { color: var(--muted); }

/* The photo frame and arrow share coordinates and a single swinging parent. */
.hero { text-align: center; min-height: 100svh; padding-block: clamp(48px, 6vh, 84px); }
.hero .section-inner { max-width: 1000px; }
.hero__title { color: var(--accent-dark); font-size: clamp(23px, 3vw, 36px); margin: 0; }
.hero__top { margin-bottom: clamp(36px, 5vw, 60px); }
.hero__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 6vw, 96px); max-width: 720px; margin: 142px auto 146px; padding-inline: 12px; }
.hero-person { min-width: 0; }
.hero-person--right { padding-top: 36px; }
.hero-depth { width: 100%; max-width: 290px; margin-inline: auto; will-change: transform; }
.hero-visual-group { position: relative; }
.photo-card { position: relative; background: var(--surface); padding: clamp(8px, 1vw, 13px); box-shadow: 0 18px 40px #69533b20; border: 1px solid #ffffff; border-radius: 5px; }
.photo-frame { position: relative; aspect-ratio: 4 / 5; }
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.polaroid-caption { display: grid; place-items: center; min-height: 64px; padding: 14px 6px 4px; font-size: clamp(11px, 1vw, 13px); line-height: 1.5; font-weight: 500; }
.swing { transform-origin: 50% 15%; animation: photo-swing 7s ease-in-out infinite; }
.swing-delayed { animation-delay: -3.5s; }
.swing-soft { animation-delay: -.5s; }
@keyframes photo-swing { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
/* Arrows live in reserved space outside the photo card. */
/* Text has its own row; arrow strokes cannot cross the role labels. */
.hero-arrow { position: absolute; left: 0; width: 100%; height: 116px; display: grid; grid-template-rows: 30px minmax(0, 1fr); justify-items: center; row-gap: 8px; pointer-events: none; }
.hero-arrow--bride { top: calc(100% + 12px); grid-template-rows: minmax(0, 1fr) 30px; }
.hero-arrow--groom { bottom: calc(100% + 12px); }
.hero-arrow__drawing { display: block; width: 100%; height: 100%; min-height: 0; grid-row: 2; }
.hero-arrow--bride .hero-arrow__drawing { grid-row: 1; }
.hero-arrow__curve { transform-origin: 130px 48px; animation: arrow-sway 6s ease-in-out infinite; }
.hero-arrow--groom .hero-arrow__curve { animation-delay: -3s; }
.hero-arrow__curve path { stroke: var(--accent-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes arrow-sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.hero-arrow__label { grid-row: 1; grid-column: 1; align-self: center; font: italic 500 27px/30px 'Cormorant Garamond', serif; color: var(--accent-dark); }
.hero-arrow--bride .hero-arrow__label { grid-row: 2; }
.hero__names { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: .12em .22em; font-size: clamp(32px, 5vw, 66px); margin: 0; }
.hero__amp { font-style: italic; color: var(--accent); font-size: .78em; }
.hero__subtitle { max-width: 42ch; margin: 18px auto 0; text-wrap: balance; }

.calendar-stack { max-width: 720px; margin: auto; display: grid; gap: 32px; }
.calendar-card, .wishes-card, .place-card, .rsvp-form, .contacts-card { background: #fffdf8d9; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.calendar-card { padding: clamp(16px, 3vw, 32px); }
.calendar-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.calendar-card__month { font-weight: 600; }
.calendar-card__label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(3px, 1vw, 10px); }
.calendar span { display: grid; place-items: center; min-height: clamp(34px, 5vw, 58px); border-radius: 12px; font-size: clamp(12px, 1.3vw, 16px); }
.calendar span:nth-child(-n+7) { font-size: 11px; color: var(--muted); background: var(--bg); }
.calendar .target { background: var(--cream); font-weight: 600; }
.countdown-title { text-align: center; font-size: 26px; margin: 0 0 20px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, 1.5vw, 16px); }
.countdown__item { text-align: center; border-top: 1px solid var(--line); padding: 20px 4px 0; }
.countdown__item span { display: block; font: 500 clamp(32px, 5vw, 52px)/1.2 'Cormorant Garamond', serif; color: var(--accent-dark); }
.countdown__item small { display: block; color: var(--muted); text-transform: uppercase; font-size: clamp(9px, 1vw, 11px); letter-spacing: .1em; margin-top: 8px; }
.timeline { position: relative; max-width: 850px; margin: auto; }
.timeline::before { content: ''; position: absolute; top: 24px; bottom: 30px; left: 57px; width: 1px; background: var(--line); }
.timeline-item { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 24px; align-items: start; padding: 0 0 28px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item__time { background: var(--cream); color: var(--accent-dark); border: 1px solid var(--line); border-radius: 40px; text-align: center; padding: 10px; font: 500 23px/1.3 'Cormorant Garamond', serif; position: relative; }
.timeline-item__content { padding: 5px 0; }
.timeline-item__content h3 { font-size: clamp(23px, 2vw, 28px); margin-bottom: 8px; }
.dress__lead, .form-section__lead { max-width: 60ch; margin: 0 auto 36px; text-align: center; }
.dress-layout { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 28px; max-width: 760px; margin: auto; align-items: center; }
.dress-layout__palette { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 24px; height: 80%; }
.dress-layout__color { width: clamp(28px, 4vw, 48px); aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--surface); box-shadow: 0 2px 14px #64513d17; }
.dress-layout__visual { min-width: 0; }
.dress-layout__image-box { will-change: transform; }
.dress-layout__image { display: block; width: 100%; max-height: 580px; object-fit: contain; }
.placeholder-visual { display: grid; place-items: center; min-height: 220px; background: var(--cream); color: var(--muted); border-radius: 16px; }
.wishes-card { max-width: 850px; padding: clamp(22px, 4vw, 48px); margin: auto; }
.wishes-list { list-style: none; padding: 0; margin: 0; }
.wishes-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 22px; align-items: start; color: var(--muted); }
.wishes-list li + li { margin-top: 28px; }
.wish-icon { display: grid; place-items: center; width: 40px; height: 40px; }
.wish-icon__img { width: 30px; height: 30px; object-fit: contain; opacity: .65; }
.places-grid { display: grid; gap: 24px; max-width: 1000px; margin: auto; }
.place-card { padding: clamp(20px, 3vw, 36px); }
.place-card__info--pickup { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 24px; align-items: center; }
.place-card__info h3 { margin-bottom: 12px; }
.pickup-bus { display: grid; place-items: center; }
.pickup-bus__image { width: 160px; max-height: 140px; object-fit: contain; opacity: .45; }
.pickup-bus__fallback { display: none; }
.map-frame { overflow: hidden; border-radius: 16px; margin-top: 28px; background: var(--cream); border: 1px solid var(--line); }
.map-frame iframe { display: block; width: 100%; height: clamp(260px, 35vw, 390px); border: 0; }
.restaurant-photo { overflow: hidden; border-radius: 16px; margin-top: 20px; aspect-ratio: 16 / 9; }
.restaurant-photo__image { display: block; width: 100%; height: 115%; object-fit: cover; margin-top: -4%; will-change: transform; }
.rsvp-form { display: grid; gap: 22px; max-width: 640px; margin: auto; padding: clamp(22px, 4vw, 44px); }
.rsvp-form label { display: grid; gap: 9px; min-width: 0; }
.rsvp-form label span { font-size: 14px; font-weight: 500; }
.rsvp-form input, .rsvp-form select { width: 100%; min-width: 0; min-height: 54px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font-size: 16px; }
.rsvp-form input:focus, .rsvp-form select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.rsvp-form button, .music-player__button { background: var(--accent-dark); color: #fffdf8; border: 1px solid var(--accent-dark); cursor: pointer; font-weight: 500; transition: background .2s, transform .2s; }
.rsvp-form button { min-height: 54px; padding: 12px 20px; border-radius: 12px; }
.rsvp-form button.is-loading { opacity: .65; cursor: wait; }
.footer { min-height: auto; padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
.contacts-card { padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.contacts-card h2 { margin-bottom: 18px; }
.footer__phone { margin-top: 18px; font-size: clamp(16px, 1.4vw, 20px); font-weight: 600; }
.social-link { display: flex; align-items: center; gap: 14px; min-height: 60px; color: var(--text); text-decoration: none; background: var(--cream); padding: 16px 20px; border-radius: 16px; line-height: 1.4; }
.social-link__icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: var(--surface); background: var(--accent-dark); border-radius: 50%; }
.social-link__icon svg { width: 22px; height: 22px; fill: currentColor; }
.social-link__text { font-size: 14px; font-weight: 500; }
.music-player { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); pointer-events: none; max-width: calc(100% - 32px); }
.music-player__button { pointer-events: auto; min-height: 48px; border-radius: 40px; padding: 12px 20px; font-size: 13px; box-shadow: 0 6px 24px #423c3526; }
@media (hover: hover) { .music-player__button:hover, .rsvp-form button:hover { background: #53412f; } .social-link:hover { background: var(--linen); } }
.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); width: max-content; max-width: min(460px, calc(100% - 32px)); background: var(--text); color: var(--surface); border-radius: 14px; padding: 16px 22px; font-size: 14px; text-align: center; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: #475c4b; }
.toast.error { background: #804f44; }
.calendar .target { position: relative; }
.flying-heart { position: absolute; inset: 50% auto auto 50%; width: 42px; height: 42px; z-index: 2; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity 900ms ease, transform 1200ms cubic-bezier(.2,.65,.3,1); }
.flying-heart.is-drawn { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.flying-heart__svg { display: block; width: 100%; height: 100%; }
.flying-heart__svg path { fill: none; stroke: var(--accent-dark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1800ms cubic-bezier(.25,.55,.3,1); }
.is-drawn .flying-heart__svg path { stroke-dashoffset: 0; }
/* Content remains readable if JavaScript or an observer is unavailable. */
@media (prefers-reduced-motion: no-preference) {
  .panel.in-view .reveal-item { animation: reveal-in .8s both; }
  .panel.in-view .delay-1 { animation-delay: .06s; }
  .panel.in-view .delay-2 { animation-delay: .12s; }
  .panel.in-view .delay-3 { animation-delay: .18s; }
  .panel.in-view .delay-4 { animation-delay: .24s; }
}
@keyframes reveal-in { from { opacity: .65; } to { opacity: 1; } }
@media (min-width: 1800px) { .page { border-inline: 1px solid var(--line); } }
@media (max-width: 900px) {
  .contacts-card { grid-template-columns: 1fr; gap: 28px; }
  .panel { min-height: auto; }
  .hero { min-height: 100svh; }
}
@media (max-width: 640px) {
  .panel { padding: 64px 20px; }
  .hero { padding: 48px 20px 56px; }
  .hero__top { margin-bottom: 38px; }
  .hero__photos { gap: 22px; padding-inline: 4px; margin-bottom: 90px; }
  .hero-person--right { padding-top: 24px; }
  .photo-card { padding: 7px; }
  .polaroid-caption { min-height: 56px; padding: 10px 1px 4px; font-size: 10px; }
  .hero__names { font-size: clamp(29px, 7.2vw, 43px); gap: .1em .18em; }
  .hero__subtitle { font-size: 14px; }
  .timeline-item { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding-bottom: 26px; }
  .timeline::before { left: 38px; }
  .timeline-item__time { font-size: 19px; padding: 10px 4px; }
  .timeline-item__content h3 { font-size: 22px; }
  .timeline-item__content p { font-size: 14px; }
  .dress-layout { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
  .dress-layout__color { border-width: 3px; }
  .wishes-list li { grid-template-columns: 28px minmax(0, 1fr); gap: 14px; font-size: 14px; }
  .wish-icon { width: 28px; height: 32px; }
  .wish-icon__img { width: 25px; height: 25px; }
  .place-card__info--pickup { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pickup-bus { justify-items: start; }
  .pickup-bus__image { width: 110px; max-height: 90px; }
  .restaurant-photo { aspect-ratio: 4 / 3; }
  .calendar-card__label { font-size: 9px; letter-spacing: .08em; }
  .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 359px) {
  .panel { padding-inline: 16px; }
  .hero__photos { gap: 16px; }
  .hero__names { max-width: 250px; margin-inline: auto; }
  .hero__amp { flex-basis: 100%; line-height: .8; }
  .calendar-card { padding: 12px; }
  .calendar span { min-height: 30px; }
  .rsvp-form, .contacts-card, .place-card, .wishes-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .parallax-layer, [data-depth] { transform: none !important; will-change: auto; }
  .flying-heart { display: block; opacity: 1; transform: translate(-50%, -50%); }
  .flying-heart__svg path { stroke-dashoffset: 0; }
}

/* Visible depth cues: fine concentric arcs move with the background plane. */
.parallax-layer::before, .parallax-layer::after { content: ''; position: absolute; border: 1px solid #aa92742b; border-radius: 50%; width: clamp(300px, 48vw, 760px); aspect-ratio: 1; top: 16%; right: -6%; }
.parallax-layer::after { width: clamp(260px, 40vw, 620px); top: 23%; right: -2%; border-color: #aa92741c; }
.panel:nth-child(even) .parallax-layer::before { right: auto; left: -12%; }
.panel:nth-child(even) .parallax-layer::after { right: auto; left: -7%; }
.hero__names { font-size: clamp(38px, 5.7vw, 78px); font-weight: 500; letter-spacing: -.025em; }
h2 { font-size: clamp(36px, 4vw, 56px); }
.hero__title { font-size: clamp(29px, 3.4vw, 42px); }
@media (max-width: 640px) {
  .hero__photos { margin-top: 120px; }
  .hero__names { font-size: clamp(32px, 8.5vw, 46px); }
  .hero__photos { margin-bottom: 128px; }
  .hero-arrow { height: 96px; }
  .hero-arrow__label { font-size: 24px; }
  .flying-heart { width: 34px; height: 34px; }
}

/* Reset offscreen without reverse drawing, ready for the next calendar visit. */
.flying-heart.is-resetting, .flying-heart.is-resetting path { transition: none; }

