:root {
  --blue: #57829e;
  --blue-dark: #3f6580;
  --blue-soft: #8da9c0;
  --ink: #4a6f88;
  --muted: #6d8ea4;
  --line: #57829e;
  --bg: #ffffff;
  --serif: "Libre Caslon Text", "Adobe Caslon Pro", Georgia, serif;
  --script: "Pinyon Script", "Exmouth", cursive;
  --sans: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.7; letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.rule-top { height: 12px; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); margin-top: 44px; }
.rule { border-top: 2px solid var(--line); margin-bottom: 48px; }

/* Language switch */
.lang-switch {
  position: fixed; top: 10px; right: 14px; z-index: 30;
  display: flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,.92); border: 1px solid var(--blue-soft); border-radius: 999px; padding: 3px 12px;
  font-size: 13px; color: var(--blue-soft);
}
.lang-switch button {
  border: 0; background: none; font: inherit; letter-spacing: .12em; color: var(--blue-soft); cursor: pointer; padding: 4px 2px;
}
.lang-switch button[aria-pressed="true"] { color: var(--blue-dark); font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }

/* Masthead */
.masthead { text-align: center; padding: 56px 16px 28px; }
.names { margin: 0; font-family: var(--serif); font-weight: 400; color: var(--blue); text-transform: uppercase; letter-spacing: .045em; font-size: clamp(42px, 7vw, 64px); line-height: 1.05; }
.names span { display: block; }
.names .and { font-family: var(--script); text-transform: none; font-size: .55em; letter-spacing: 0; line-height: 1; margin: .05em 0 .1em; }
html[lang="sr"] .names .and { font-size: .8em; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20; padding: 14px 110px; background: var(--bg); /* side padding keeps links clear of the EN | SR toggle */
  font-family: var(--serif); text-transform: uppercase; font-size: 13px; letter-spacing: .04em;
  transition: background .2s, color .2s;
}
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; }
.nav a { text-decoration: none; color: var(--blue); white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--blue-soft); }
.nav.stuck { background: var(--blue); box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.nav.stuck a { color: #fff; }
.nav.stuck a.active, .nav.stuck a:hover { color: #c9d8e4; }
@media (min-width: 721px) and (max-width: 1100px) {
  .nav { padding-left: 96px; padding-right: 96px; font-size: 12px; }
  .nav-links { gap: 4px 16px; }
}
@media (max-width: 720px) {
  /* Links scroll sideways; the right padding keeps them clear of the EN | SR toggle. */
  .nav { padding-left: 16px; padding-right: 100px; }
  .nav-links { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 22px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .lang-switch { top: 8px; }
}

/* Hero */
.hero { text-align: center; padding: 8px 16px 48px; }
.hero img { width: min(1100px, 100%); margin: 0 auto 36px; aspect-ratio: 2400/1300; object-fit: cover; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: .02em; }
.invite { color: var(--blue); font-size: clamp(30px, 4.6vw, 54px); margin: 0; line-height: 1.2; }
.date { font-family: var(--serif); color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(26px, 4vw, 40px); margin: 18px 0 4px; }
.place { text-transform: uppercase; letter-spacing: .25em; font-size: 14px; color: var(--muted); margin: 0; }

/* Story */
.story { background: var(--blue-soft); color: #fff; text-align: center; padding: 72px 20px 80px; }
.story h2 { font-size: clamp(56px, 8vw, 84px); margin: 0 0 18px; line-height: 1.1; }
.story p { max-width: 900px; margin: 0 auto; }
.proposal { margin: 48px auto 40px; width: min(940px, calc(100% - 32px)); }
.proposal img { width: 100%; }

/* Sections */
.section { max-width: 920px; margin: 0 auto; padding: 72px 20px 40px; text-align: center; }
.section.wide { max-width: 1200px; }
.section-title { font-family: var(--serif); font-weight: 400; text-transform: uppercase; color: var(--blue); letter-spacing: .06em; font-size: clamp(34px, 5vw, 46px); margin: 0; }
.divider { width: 176px; height: 2px; background: var(--line); margin: 28px auto 36px; }
.sub { font-family: var(--serif); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-size: 22px; margin: 36px 0 10px; }
.caps { text-transform: uppercase; letter-spacing: .14em; font-size: 14px; }
.muted { color: var(--muted); font-size: 15px; }
.link { color: var(--blue); text-underline-offset: 4px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: 6px 0; }
.plain a { color: var(--blue); text-underline-offset: 4px; }

/* Event / item blocks */
.block { margin: 0 auto 40px; max-width: 760px; }
.block + .block::before { content: ""; display: block; width: 176px; height: 2px; background: var(--line); margin: 0 auto 40px; }
.block h3 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-size: 24px; margin: 0 0 8px; }
.block .meta { margin: 0; line-height: 1.6; }
.block .place-name { margin: 14px 0 0; }
.block p { white-space: pre-line; }
.block .about { margin: 32px auto 0; padding: 28px 32px 8px; background: #f4f7fa; border-top: 2px solid var(--blue-soft); text-align: left; }
.block .about h4 { font-family: var(--serif); font-weight: 400; color: var(--blue); font-size: 20px; margin: 0 0 6px; text-align: center; }
.block .about p { white-space: normal; max-width: 66ch; margin: 0 auto 18px; }
@media (max-width: 600px) { .block .about { padding: 22px 18px 4px; } }
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 2px;
  font: inherit; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; padding: 12px 28px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: none; color: var(--blue); border: 1px solid var(--blue); }
.btn-ghost:hover { background: #f1f6f9; }

/* Hotels */
.cards { display: grid; gap: 28px; margin-top: 28px; }
.card h4 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); font-size: 20px; margin: 0; }
.stars { color: var(--blue-soft); letter-spacing: .1em; }

/* Registry */
.registry-card {
  display: inline-flex; flex-direction: column; width: 260px; border: 1px solid #dfe7ee; border-radius: 6px; overflow: hidden;
  text-decoration: none; text-align: left; box-shadow: 0 2px 10px rgba(87,130,158,.12); transition: transform .15s;
}
.registry-card:hover { transform: translateY(-2px); }
.registry-art { display: grid; place-items: center; height: 180px; background: linear-gradient(135deg, #e9f0f5, #c9d8e4); font-size: 64px; color: var(--blue); }
.registry-label { font-size: 12px; padding: 12px 14px 0; color: var(--muted); }
.registry-card strong { font-weight: 400; padding: 0 14px 14px; color: var(--blue-dark); }

/* Gallery */
.gallery { columns: 4 240px; column-gap: 10px; margin: 28px 0; }
@media (max-width: 600px) { .gallery { columns: 2; column-gap: 6px; } .gallery button { margin-bottom: 6px; } }
.gallery button { display: block; width: 100%; padding: 0; border: 0; margin: 0 0 10px; background: #eef3f7; cursor: zoom-in; break-inside: avoid; }
.gallery img { width: 100%; height: auto; transition: opacity .2s; }
.gallery button:hover img { opacity: .88; }

.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(20,32,42,.94); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: rgba(20,32,42,.94); }
.lightbox img { max-width: 100%; max-height: 92vh; margin: auto; object-fit: contain; grid-column: 2; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 48px; cursor: pointer; line-height: 1; padding: 12px; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 8px; right: 14px; font-size: 40px !important; }
.lb-count { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 13px; opacity: .7; margin: 0; }
@media (max-width: 600px) { .lightbox[open] { grid-template-columns: 0 1fr 0; } .lb-prev, .lb-next { display: none; } }

/* FAQ */
.faq-group { margin-bottom: 32px; }
.faq-item { text-align: left; max-width: 760px; margin: 0 auto 26px; }
.faq-item h4 { font-family: var(--serif); font-weight: 400; color: var(--blue); font-size: 19px; letter-spacing: .03em; margin: 0 0 6px; }
.faq-item p { margin: 0 0 8px; }
.faq-item ul { margin: 0; padding-left: 20px; }

/* RSVP */
.rsvp-card { max-width: 560px; margin: 0 auto 24px; }
.rsvp-step label { display: block; font-size: 15px; margin-bottom: 6px; }
.rsvp-step input[type=text], .rsvp-step input:not([type]), .rsvp-step input[type=email], .rsvp-step textarea {
  width: 100%; border: 1px solid #c9d8e4; border-radius: 2px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff;
}
.rsvp-step input:focus, .rsvp-step textarea:focus { outline: 2px solid var(--blue-soft); outline-offset: 1px; }
#rsvp-find .btn { width: 100%; margin-top: 10px; }
.rsvp-msg { min-height: 1.7em; color: var(--blue-dark); font-size: 15px; margin: 12px 0 0; }
.rsvp-matches { list-style: none; padding: 0; margin: 6px 0 0; }
.rsvp-matches button { width: 100%; margin: 6px 0; }
.rsvp-guest { text-align: left; border: 1px solid #dfe7ee; border-radius: 4px; padding: 16px 18px; margin: 14px 0; }
.rsvp-guest .gname { font-family: var(--serif); font-size: 19px; color: var(--blue); margin: 0 0 6px; }
.rsvp-event { border: 0; padding: 0; margin: 10px 0 0; }
.rsvp-event legend { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; padding: 0; margin-bottom: 4px; }
.rsvp-step .choice { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; font-size: 15px; cursor: pointer; }
.choice input { accent-color: var(--blue); width: 17px; height: 17px; }
.rsvp-guest .diet { margin-top: 10px; }
.rsvp-field { text-align: left; margin: 16px 0; }
.rsvp-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.thanks { font-size: 40px; color: var(--blue); line-height: 1.25; }

/* Footer */
.footer { text-align: center; padding: 40px 16px 60px; margin-top: 40px; }
.footer p { font-size: 34px; color: var(--blue); margin: 0; }

/* FAQ extras */
.faq-item ul + p { margin-top: 10px; }
.faq-closing { font-family: var(--serif); color: var(--blue); font-size: 19px; margin: 8px auto 0; max-width: 760px; }

/* Schedule at a glance */
.schedule-open-wrap { margin: -8px 0 36px; }
html.modal-open { overflow: hidden; }
.schedule {
  --gold: #c2a463; --grey: #c9ced3;
  border: 0; padding: 0; border-radius: 12px; background: #fff; color: var(--ink);
  width: min(640px, calc(100vw - 32px)); max-height: min(860px, calc(100dvh - 32px));
  box-shadow: 0 12px 40px rgba(20,32,42,.25); overflow: hidden;
}
.schedule[open] { display: flex; }
.schedule::backdrop { background: rgba(20,32,42,.5); }
.schedule-panel { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.schedule h2 {
  margin: 0; padding: 20px 24px 16px; text-align: center; border-bottom: 1px solid #edf1f4;
  font-family: var(--serif); font-weight: 400; color: var(--blue); text-transform: uppercase; letter-spacing: .14em; font-size: 17px;
}
.schedule-body { overflow-y: auto; overscroll-behavior: contain; padding: 22px 32px 8px; flex: 1 1 auto; min-height: 0; outline: none; }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-day h3 {
  margin: 0; padding: 4px 0 14px 44px; font-family: var(--sans); font-weight: 400; font-size: 13px;
  text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
}
.tl-item + .tl-day h3 { padding-top: 10px; }
.tl-item { position: relative; padding: 0 0 22px 44px; }
.tl-item::before { /* the line */
  content: ""; position: absolute; left: 10px; top: 4px; bottom: -4px; width: 2px; background: #e3e7ea;
}
.tl-item:last-child::before { bottom: auto; height: 24px; }
.tl-item::after { /* the dot */
  content: ""; position: absolute; left: 2px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--grey); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--grey);
}
.tl-item.major::after { border-color: var(--gold); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--gold); }
.tl-item p { margin: 0; line-height: 1.45; letter-spacing: .02em; }
.tl-time { font-variant: small-caps; text-transform: lowercase; font-weight: 400; font-size: 16px; letter-spacing: .14em; color: var(--blue-dark); }
.tl-title { font-family: var(--serif); color: var(--blue-dark); font-size: 17px; margin-top: 2px !important; }
.tl-item.major .tl-title { font-weight: 700; font-size: 20px; }
.tl-place { font-size: 15px; font-weight: 400; color: var(--ink); }
.tl-addr, .tl-more { font-size: 14px; }
.tl-addr a, .tl-more a { color: var(--blue); text-underline-offset: 3px; }
.tl-more { margin-top: 2px !important; }
.schedule-foot { padding: 14px 20px 18px; border-top: 1px solid #edf1f4; }
.schedule-close {
  width: 100%; background: #fff; border: 1px solid var(--gold); color: var(--blue-dark); border-radius: 2px;
  font: inherit; text-transform: uppercase; letter-spacing: .2em; font-size: 14px; padding: 13px; cursor: pointer;
}
.schedule-close:hover, .schedule-close:focus-visible { background: #faf6ec; }
.block .about:focus { outline: none; }
@media (max-width: 600px) {
  .schedule { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .schedule-body { padding: 18px 18px 6px; }
  .tl-item, .tl-day h3 { padding-left: 36px; }
  .tl-item.major .tl-title { font-size: 18px; }
}

/* Serbian is shown in Cyrillic; these faces have Cyrillic and sit close to Caslon / Pinyon / Josefin. */
html[lang="sr-Cyrl"] {
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: "Raleway", "Helvetica Neue", Arial, sans-serif;
}
