@font-face {
  font-family: "Great Vibes";
  src: url("./assets/great-vibes.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alice";
  src: url("./assets/alice.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #1e3d45;
  --muted: #5d7a82;
  --wine: #8b242e;
  --ocean: #2a8f9a;
  --line: #c5dde2;
  --body: "Alice", Georgia, serif;
  --script: "Great Vibes", cursive;
  color-scheme: light;
  font-family: var(--body);
  color: var(--ink);
  background: #244f58;
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 7px; }
p, h1, h2, h3 { margin: 0; }
svg { display: block; }
::selection { background: #c5e8ec; color: #1e3d45; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Clip the helper instead of moving it outside the viewport: mobile browser
   chrome and overscroll must not expose an off-screen fixed link. */
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; background: #fff; color: var(--ink); border-radius: 4px; }
.skip-link:focus-visible { width: auto; height: auto; max-width: calc(100% - 24px); padding: 12px 20px; margin: 0; overflow: visible; clip-path: none; white-space: normal; }

.ocean { position: fixed; inset: 0; z-index: -1; background: #28515b url("./assets/ocean-poster.jpg") center / cover no-repeat; pointer-events: none; }
.ocean video { width: 100%; height: 100%; object-fit: cover; }
.ocean-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(6 31 41 / 27%), rgb(6 31 41 / 19%) 45%, rgb(6 31 41 / 48%)); }
.hero { min-height: 100svh; display: grid; place-items: center; padding: 70px 24px 50px; text-align: center; color: white; }
.hero-content { width: 100%; max-width: 680px; text-shadow: 0 2px 18px rgb(4 25 33 / 24%); }
.hero-intro { font-size: 17px; letter-spacing: .08em; }
.couple-names { display: flex; flex-direction: column; align-items: center; margin-top: 34px; font-family: var(--script); font-weight: 400; font-size: clamp(76px, 8.5vw, 122px); line-height: 1.13; }
.couple-names .ampersand { margin: -9px 0 -11px; font-size: .43em; line-height: 1.3; }
.hero-date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 26px; width: min(360px, 90%); margin: 36px auto 0; }
.date-day { font-size: 65px; line-height: 1; }
.date-side { padding: 12px 0; border-block: 1px solid rgb(255 255 255 / 54%); font-size: 20px; }
.hero-day { margin-top: 15px; font-size: 15px; letter-spacing: .05em; }
.open-invitation { display: flex; flex-direction: column; align-items: center; gap: 10px; width: fit-content; margin: 52px auto 0; padding: 8px; text-decoration: none; font-size: 15px; }
.open-invitation svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; animation: scroll-cue 2.6s ease-in-out infinite; }
.hero-content { animation: invitation-appear 1.4s ease-out both; }
@keyframes invitation-appear { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes scroll-cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.paper { width: min(760px, calc(100% - 64px)); margin: 0 auto; padding: 76px 76px 68px; background: var(--paper); border-radius: 180px 180px 5px 5px / 80px 80px 5px 5px; box-shadow: 0 28px 100px rgb(6 31 41 / 14%); }
.section { text-align: center; }
.script-title { font-family: var(--script); font-size: clamp(48px, 5vw, 63px); font-weight: 400; line-height: 1.2; color: var(--wine); }
.lead { width: min(450px, 100%); margin: 26px auto 0; font-size: 19px; line-height: 1.75; text-wrap: pretty; }
.greeting { padding-top: 20px; }
.greeting .script-title { overflow-wrap: anywhere; }
.signature { margin-top: 24px; color: var(--wine); font-family: var(--script); font-size: 29px; }
.calendar { display: block; width: 306px; max-width: 100%; margin: 52px auto 0; color: inherit; text-decoration: none; border-radius: 4px; }
.calendar-action { display: inline-block; margin-top: 24px; padding-block: 6px; border-bottom: 1px solid var(--line); color: #256975; font-size: 14px; }
.calendar:hover .calendar-action { border-color: currentColor; }
.calendar h3 { font-size: 24px; font-weight: 400; }
.calendar h3 span { margin-left: 5px; font-size: 18px; color: var(--muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 24px; row-gap: 7px; }
.calendar-grid > span { position: relative; display: grid; place-items: center; min-height: 34px; font-size: 17px; }
.calendar-grid .weekday { min-height: 26px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.calendar-grid .outside { opacity: .28; }
.calendar-grid .wedding-day { color: #fff; isolation: isolate; }
.wedding-day svg { position: absolute; z-index: -1; width: 46px; height: 43px; fill: var(--wine); overflow: visible; animation: calendar-heart 1s ease-in-out infinite; }
.wedding-day > span { margin-top: -2px; }
@keyframes calendar-heart { 0%, 42%, 100% { transform: scale(1); } 20% { transform: scale(1.09); } }
.divider { display: flex; justify-content: center; align-items: center; gap: 18px; width: min(300px, 85%); margin: 66px auto; color: var(--wine); }
.divider > span { height: 1px; flex: 1; background: var(--line); }
.divider i { font-family: var(--script); font-style: normal; font-size: 25px; white-space: nowrap; }
.divider b { margin-inline: 2px; font-weight: 400; font-size: 18px; }

.timeline { position: relative; width: 100%; margin: 32px auto 0; }
.timeline-line { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 1.4; }
.timeline-track { stroke: #ead9d9; stroke-dasharray: 3 7; }
.timeline-progress { stroke: var(--wine); }
.timeline-heart { position: absolute; top: 1.58%; left: 50%; z-index: 1; width: 25px; height: 24px; fill: var(--wine); pointer-events: none; transform: translate(-50%, -50%); }
.timeline-events { position: relative; display: grid; grid-template-rows: repeat(4, 1fr); min-height: 720px; margin: 0; padding: 22px 0 12px; list-style: none; }
.timeline-event { display: flex; flex-direction: column; justify-content: center; width: 40%; min-width: 0; min-height: 155px; color: var(--wine); overflow-wrap: anywhere; hyphens: auto; }
.event-left { justify-self: start; text-align: right; }
.event-right { justify-self: end; text-align: left; }
.timeline-event time { font-size: 47px; line-height: 1; font-variant-numeric: tabular-nums; }
.timeline-event h3 { margin-top: 13px; font-size: 19px; font-weight: 400; }
.timeline-event p { margin-top: 10px; color: #796164; font-size: 16px; line-height: 1.5; }
.motion-enabled .timeline-progress { stroke-dasharray: var(--path-length); stroke-dashoffset: var(--path-length); }
.motion-enabled .timeline-event { opacity: 0; transform: translateX(var(--entry-offset)); transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.event-left { --entry-offset: -14px; }
.event-right { --entry-offset: 14px; }
.motion-enabled .timeline-event.is-visible { opacity: 1; transform: none; }

.place { margin-top: 36px; }
.place-icon { width: 78px; height: 68px; margin: 0 auto 22px; stroke: var(--wine); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.place-occasion { color: var(--muted); font-size: 15px; }
.place h3 { margin-top: 14px; font-family: var(--body); font-size: 28px; font-weight: 400; line-height: 1.35; }
.place address { margin-top: 16px; font-style: normal; font-size: 17px; line-height: 1.65; }
.map-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; margin-top: 23px; padding: 12px 23px; border: 1px solid var(--ocean); border-radius: 3px; color: #256975; background: #fff; text-decoration: none; font-size: 16px; transition: color .2s ease, background .2s ease; }
.map-link:hover { background: #eff9fa; color: var(--ink); }
.map-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.place-note { margin-top: 22px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.place-separator { width: 22px; margin: 44px auto 0; }
.place-separator svg { width: 22px; height: 21px; fill: none; stroke: var(--wine); stroke-width: 1; }
.places .place:last-child { margin-top: 38px; }
.dress-note { margin: 27px auto 0; font-size: 16px; line-height: 1.65; color: var(--wine); }
.wishes-lead { max-width: 360px; }
.wish-list { width: min(440px, 100%); margin: 36px auto 0; text-align: left; }
.wish { display: grid; grid-template-columns: 44px 1fr; gap: 24px; padding-block: 21px; }
.wish + .wish { border-top: 1px solid #e7eeef; }
.wish > svg { width: 44px; height: 44px; margin-top: 3px; fill: none; stroke: var(--wine); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.wish h3 { font-size: 21px; font-weight: 400; color: var(--wine); }
.wish p { margin-top: 8px; font-size: 17px; line-height: 1.6; }
.contacts .lead { font-size: 18px; }
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 30px auto 0; max-width: 480px; }
.contact-list > div { min-width: 0; }
.contact-list dt { font-family: var(--script); font-size: 32px; color: var(--wine); }
.contact-list dd { margin: 8px 0 0; font-size: 18px; }
.contact-list a { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding-block: 7px; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-list .telegram-link { color: #256975; font-size: 15px; overflow-wrap: anywhere; }

.countdown-section { width: min(760px, calc(100% - 64px)); margin: 0 auto; padding: 90px 32px 76px; color: #fff; text-align: center; }
.countdown-section .script-title { color: #fff; font-size: clamp(49px, 5.5vw, 68px); text-shadow: 0 2px 18px rgb(4 25 33 / 30%); }
.countdown-section > p { margin-top: 20px; font-size: 18px; text-shadow: 0 1px 8px rgb(4 25 33 / 35%); }
.countdown { display: flex; justify-content: center; gap: 24px; margin-top: 34px; }
.countdown-unit { flex: 1; max-width: 108px; min-width: 0; }
.countdown-value { display: grid; place-items: center; min-height: 100px; padding: 10px; border: 1px solid rgb(255 255 255 / 32%); border-radius: 5px; background: rgb(14 47 57 / 32%); font-size: 53px; line-height: 1; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
.countdown-label { display: block; margin-top: 11px; font-size: 15px; }
.closing { position: relative; width: min(760px, calc(100% - 64px)); margin: 0 auto 56px; padding: 45px 28px 38px; border-radius: 5px 5px 120px 120px / 5px 5px 48px 48px; background: var(--paper); color: var(--wine); text-align: center; }
.closing > svg { width: 26px; height: 25px; margin: 0 auto 20px; fill: none; stroke: currentColor; stroke-width: 1.1; }
.closing-message { font-family: var(--script); font-size: 54px; line-height: 1.2; }
.closing-names { margin-top: 14px; font-family: var(--script); font-size: 33px; }
.back-to-top { display: block; width: fit-content; margin: 24px auto 0; padding: 10px; color: var(--muted); }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 1400px) { .hero { padding-block: 80px; } }
@media (max-width: 700px) {
  .hero { padding: 54px 20px 34px; }
  .hero-intro { font-size: 15px; }
  .couple-names { font-size: clamp(68px, 17vw, 100px); margin-top: 30px; }
  .hero-date { width: min(300px, 85%); gap: 21px; margin-top: 28px; }
  .date-day { font-size: 58px; }
  .date-side { font-size: 18px; }
  .open-invitation { margin-top: 38px; }
  .paper { width: calc(100% - 32px); padding: 52px 28px 44px; border-radius: 100px 100px 4px 4px / 44px 44px 4px 4px; }
  .script-title { font-size: 49px; }
  .lead { font-size: 17px; line-height: 1.7; margin-top: 22px; }
  .signature { font-size: 27px; }
  .calendar { width: 280px; margin-top: 38px; }
  .divider { margin-block: 48px; }
  .timeline { margin-top: 24px; }
  .timeline-events { min-height: 660px; padding-block: 15px; }
  .timeline-event { width: 40%; min-height: 148px; }
  .timeline-event time { font-size: 36px; }
  .timeline-event h3 { font-size: 17px; margin-top: 12px; }
  .timeline-event p { font-size: 14px; line-height: 1.45; }
  .timeline-event p br { display: none; }
  .timeline-heart { width: 21px; height: 20px; }
  .place { margin-top: 28px; }
  .place h3 { font-size: 24px; }
  .place address { font-size: 16px; }
  .place-occasion { font-size: 13px; }
  .place-note { font-size: 14px; }
  .dress-note { font-size: 15px; }
  .wish { grid-template-columns: 35px 1fr; gap: 18px; }
  .wish > svg { width: 35px; height: 35px; }
  .wish h3 { font-size: 19px; }
  .wish p { font-size: 16px; }
  .contact-list { gap: 16px; }
  .contact-list dd { font-size: 16px; }
  .contact-list .telegram-link { font-size: 12px; }
  .countdown-section { width: calc(100% - 32px); padding: 66px 8px 56px; }
  .countdown-section .script-title { font-size: 49px; }
  .countdown-section > p { font-size: 16px; }
  .countdown { gap: 10px; margin-top: 28px; }
  .countdown-value { min-height: 75px; font-size: 37px; padding: 9px 5px; }
  .countdown-label { font-size: 13px; }
  .closing { width: calc(100% - 32px); margin-bottom: 24px; padding: 36px 20px 25px; }
  .closing-message { font-size: 49px; }
  .closing-names { font-size: 30px; }
}

@media (max-width: 360px) {
  .paper { padding-inline: 20px; }
  .couple-names { font-size: 65px; }
  .script-title, .countdown-section .script-title { font-size: 44px; }
  .calendar-grid > span { font-size: 15px; }
  .timeline-event time { font-size: 31px; }
  .timeline-event h3 { font-size: 15px; }
  .timeline-event p { font-size: 13px; }
  .contact-list { grid-template-columns: 1fr; gap: 20px; }
  .countdown { gap: 7px; }
  .countdown-value { font-size: 32px; min-height: 65px; }
}

@media (max-height: 700px) and (min-width: 361px) {
  .hero { padding-block: 38px 24px; }
  .couple-names { font-size: clamp(60px, 14vw, 85px); margin-top: 20px; }
  .hero-date { margin-top: 20px; }
  .date-day { font-size: 50px; }
  .open-invitation { margin-top: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-content, .motion-enabled .timeline-event { opacity: 1; transform: none; }
  .timeline-progress { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .timeline-heart { display: none; }
}
