/* Layout and components. Colors and fonts live in theme.css. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); font-weight: 500; text-transform: uppercase; letter-spacing: .14em; }
h2 { font-size: clamp(2rem, 7vw, 2.6rem); }
h3 { font-size: 1.55rem; font-weight: 500; }
p { margin: 0 0 1em; }

a { color: var(--slate); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 12px 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: 17px; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.05; }
.amp { font-family: var(--font-head); font-style: italic; font-weight: 400; }

/* Small uppercase labels, like "SAVE THE DATE" on the card */
.kicker, .facts .k, .label {
  font-family: var(--font-body); font-size: 16px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft);
}
.kicker { display: block; margin-bottom: 14px; }

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 8px 12px;
}
.brand {
  justify-self: center; color: var(--ink); text-decoration: none;
  font-family: var(--font-script); font-size: 2.3rem; line-height: 1; padding: 6px 8px; min-height: 48px;
  display: inline-flex; align-items: center;
}
.brand:hover { color: var(--ink); }
.brand .amp { font-size: .62em; margin: 0 .18em; color: var(--ink-soft); }
.bar-left { justify-self: start; }
.bar-right { justify-self: end; }

.menu-btn, .rsvp-link {
  font-family: var(--font-body); font-size: 16px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  min-height: 48px; padding: 0 12px; display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; color: var(--ink); cursor: pointer; text-decoration: none;
}
.rsvp-link { border: 1px solid var(--ink); padding: 0 16px; }
.rsvp-link:hover { background: var(--ink); color: var(--on-dark); }
.menu-btn .bars { width: 20px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
}
.menu-btn .bars::before { top: 0; } .menu-btn .bars::after { bottom: 0; }

.nav { display: none; }
.nav.open {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 30;
  background: var(--bg); overflow-y: auto; padding: 8px 12px 40px;
}
.nav-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 24px; }
.nav-top .brand { grid-column: 2; }
.nav-top .menu-btn { grid-column: 3; justify-self: end; }
.nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.nav li a {
  display: block; padding: 14px 4px; font-family: var(--font-head); font-size: 1.75rem; font-weight: 400;
  letter-spacing: .04em; color: var(--ink); text-decoration: none;
}
.nav li a[aria-current="page"] { font-style: italic; color: var(--slate); }
.nav-foot { margin-top: auto; padding-top: 32px; text-align: center; }

@media (min-width: 900px) {
  .bar { padding: 14px 32px 4px; }
  .brand { font-size: 2.8rem; }
  .bar .menu-btn { display: none; }
  .nav, .nav.open { display: block; position: static; padding: 0 0 6px; background: none; overflow: visible; }
  .nav-top, .nav-foot { display: none; }
  .nav ul { display: flex; gap: 6px 28px; flex-wrap: wrap; justify-content: center; }
  .nav li a {
    font-family: var(--font-body); font-size: 16px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
    padding: 10px 2px; border-bottom: 1px solid transparent;
  }
  .nav li a:hover { border-bottom-color: var(--line-strong); }
  .nav li a[aria-current="page"] { font-style: normal; color: var(--ink); border-bottom-color: var(--ink); }
  .nav li.nav-rsvp { display: none; }
}
body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 28px;
  font-family: var(--font-body); font-size: 17px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; line-height: 1.2;
  text-decoration: none; text-align: center;
  background: var(--accent); color: var(--on-dark); border: 1px solid var(--accent);
  border-radius: var(--radius); cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-small { min-height: 48px; padding: 8px 18px; font-size: 16px; }
.btn-big { min-height: 62px; padding: 16px 36px; width: 100%; max-width: 420px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-row .btn { flex: 1 1 220px; max-width: 320px; }

/* ---------- Sections ---------- */

main { display: block; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section + .section { padding-top: 8px; }
.section + .section.band, .section.band + .section { padding-top: 56px; }
.band { background: var(--bg-soft); }
.band-blush { background: var(--blush-bg); }
.page-head { padding-top: 56px; padding-bottom: 16px; text-align: center; }
.page-head p { color: var(--ink-soft); font-size: 1.1rem; max-width: 32em; margin-left: auto; margin-right: auto; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; }
.card + .card { margin-top: 20px; }
@media (min-width: 600px) { .card { padding: 44px 48px; } }

.divider { display: flex; align-items: center; gap: 16px; margin: 26px auto; max-width: 220px; color: var(--tulip); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.divider svg { width: 22px; height: 22px; flex: none; }

/* ---------- Home ---------- */

.std-stage { position: relative; overflow: hidden; background: var(--dark); }
.std-stage::before {
  content: ""; position: absolute; inset: -40px; background-image: var(--std-bg); background-size: cover; background-position: center;
  filter: blur(28px) brightness(.55); transform: scale(1.1);
}
.std-card { position: relative; margin: 0 auto; max-width: 520px; }
.std-card img { width: 100%; height: auto; }
@media (min-width: 600px) {
  .std-stage { padding: 56px 20px; }
  .std-card img { box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
}

.hero { text-align: center; padding-top: 48px; padding-bottom: 24px; }
.hero h1.script { font-size: clamp(3.4rem, 14vw, 6rem); margin-bottom: .1em; }
.hero-date { font-family: var(--font-head); font-size: clamp(1.7rem, 6vw, 2.3rem); margin: 0; }
.hero-place { font-size: 16px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); margin: .8em 0 0; }
.hero-note { font-family: var(--font-head); font-style: italic; font-size: 1.45rem; color: var(--ink-soft); margin-top: 14px; }

.countdown { margin: 34px auto 6px; text-align: center; }
.countdown .num { display: block; font-family: var(--font-head); font-size: 3.6rem; font-weight: 400; line-height: 1; }
.countdown .lbl { font-size: 16px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }

.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Venue photos (The Bower) */
.venue { text-align: center; }
.venue-hero { margin: 0; }
.venue-hero img { width: 100%; height: auto; max-height: 82vh; object-fit: cover; }
.venue-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 980px; margin: 28px auto 0; padding: 0 8px; }
.venue-gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.venue-caption { margin-top: 22px; }
.venue-caption .name { font-family: var(--font-head); font-size: 2.2rem; margin: 6px 0 2px; }
.venue > .kicker { margin-bottom: 22px; }

/* Dark band, like the card */
.band-dark { background: var(--dark); color: var(--on-dark); }
.band-dark h2, .band-dark h3, .band-dark .hero-date { color: var(--on-dark); }
.band-dark .kicker, .band-dark .muted { color: var(--on-dark-soft); }
.band-dark .btn { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.band-dark .btn:hover { background: transparent; color: var(--on-dark); }

/* ---------- Detail lists ---------- */

.facts { list-style: none; padding: 0; margin: 0; }
.facts li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts li:first-child { padding-top: 0; }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 600px) { .facts li { grid-template-columns: 10em 1fr; gap: 20px; } .facts .k { padding-top: 4px; } }

.schedule { list-style: none; margin: 0; padding: 0; }
.schedule li { display: grid; grid-template-columns: 6.5em 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.schedule li:last-child { border-bottom: 0; }
.schedule .t { font-weight: 500; letter-spacing: .06em; }
.schedule .what { font-family: var(--font-head); font-size: 1.45rem; line-height: 1.2; }

.hotel h3 { margin-bottom: .25em; }
.hotel p { margin-bottom: .5em; }

.photos { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
@media (min-width: 600px) { .photos { grid-template-columns: 1fr 1fr; } }
.photos figure { margin: 0; }
.photos img { width: 100%; }
.photos figcaption { font-size: 17px; color: var(--ink-soft); margin-top: 8px; text-align: center; font-family: var(--font-head); font-style: italic; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--font-head); font-size: 1.5rem; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font-size: 1.7rem; font-weight: 300; color: var(--ink-soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 22px; }

/* ---------- Placeholders ---------- */

.ph { font-style: italic; color: var(--ink-soft); }
.ph-dev {
  background: var(--placeholder-bg); color: #5a4a00; font-style: normal; font-weight: 600;
  padding: 1px 6px; outline: 1px dashed #c9a400; font-size: .9em; letter-spacing: 0; text-transform: none;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 20px; }
.field label, .legend { display: block; font-weight: 500; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 17px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; font: inherit; font-size: 1.1rem; color: var(--ink);
  min-height: 56px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: 2px solid rgba(58, 42, 32, .15); outline-offset: 0; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 2fr 1fr 1fr; } }

.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { position: relative; flex: 1 1 140px; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 58px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); font-weight: 500; cursor: pointer; line-height: 1.25;
}
.choice input:focus-visible + span { outline: 2px solid var(--slate); outline-offset: 2px; }
.choice input:checked + span { border: 2px solid var(--ink); background: var(--ok-bg); }
.choice input:checked + span::before { content: "\2713"; }
.choice.no input:checked + span { background: var(--bg-soft); }

.alert { padding: 16px 18px; border-radius: var(--radius); margin: 0 0 20px; font-weight: 500; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #e2b4b9; }
.alert-ok { background: var(--ok-bg); color: var(--boxwood); border: 1px solid #c5d3b8; }
.alert-info { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
.field-error { color: var(--error); font-weight: 500; font-size: 17px; margin-top: 6px; }
.has-error .choice span, .has-error input { border-color: var(--error); }

.spinner {
  width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner.dark { border-color: var(--line); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 32px 0; color: var(--ink-soft); }

/* ---------- RSVP ---------- */

.event-card { margin-top: 22px; }
.event-card .event-when { color: var(--ink-soft); margin-top: -.25em; }
.person { padding: 22px 0; border-top: 1px solid var(--line); }
.person:first-of-type { border-top: 0; }
.person-name { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 12px; }
.person .more { margin-top: 16px; }
.plus-one { margin-top: 16px; padding: 18px; background: var(--bg-soft); }
.household-pick { display: grid; gap: 12px; margin-top: 12px; }
.household-pick button {
  font: inherit; text-align: left; padding: 16px 18px; min-height: 64px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
.household-pick button:hover { border-color: var(--ink); }
.household-pick strong { display: block; font-family: var(--font-head); font-size: 1.4rem; font-weight: 500; }
.summary-list { list-style: none; padding: 0; margin: 0; }
.summary-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.summary-list li:last-child { border-bottom: 0; }
.yes { color: var(--boxwood); font-weight: 500; }
.no { color: var(--ink-soft); }

/* ---------- Felafnes ---------- */

.event-hero { padding-top: 72px; padding-bottom: 64px; text-align: center; }
.event-hero h1 { color: var(--on-dark); }
.event-hero .lede {
  font-family: var(--font-head); font-style: italic; font-size: clamp(1.4rem, 4.6vw, 1.75rem); line-height: 1.45;
  color: var(--on-dark); max-width: 28em; margin: 0 auto;
}
/* A single cross-stitch rosette: a quiet nod to Mennonite needlework */
.ornament { display: block; width: 34px; height: 34px; margin: 22px auto 24px; color: var(--tulip); }
.band-dark .ornament { color: var(--blush); }

.details-split { display: grid; grid-template-columns: 1fr; gap: 36px; text-align: center; }
.details-split .detail { font-family: var(--font-head); font-size: 1.65rem; line-height: 1.35; margin: 0; }
.details-split .detail .muted { display: block; font-family: var(--font-body); font-size: 17px; line-height: 1.6; margin-top: 10px; }
.details-split .btn-row { justify-content: center !important; }
@media (min-width: 640px) {
  .details-split { grid-template-columns: 1fr 1fr; gap: 0; }
  .details-split > div { padding: 8px 28px; }
  .details-split > div + div { border-left: 1px solid var(--line-strong); }
}

.prose { max-width: 680px; }
.prose .lead-italic { font-family: var(--font-head); font-style: italic; font-size: 1.45rem; line-height: 1.5; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 72px; padding: 56px 0 64px; text-align: center; background: var(--dark); color: var(--on-dark-soft); }
.site-footer .names { font-family: var(--font-script); font-size: 3.2rem; line-height: 1.1; color: var(--on-dark); margin-bottom: 10px; }
.site-footer .names .amp { font-size: .55em; color: var(--on-dark-soft); margin: 0 .2em; }
.site-footer .when { font-size: 16px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.site-footer a { color: var(--on-dark); }
.site-footer .divider { color: var(--tulip); }
.site-footer .divider::before, .site-footer .divider::after { background: var(--dark-line); }

/* ---------- Password gate ---------- */

html.locked body > *:not(#gate) { display: none !important; }
#gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
#gate .card { width: 100%; max-width: 440px; text-align: center; }
#gate .script { font-size: 3rem; }

/* ---------- Small text links (directions, calendar) ---------- */

.text-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-top: 10px; font-size: 17px; line-height: 1.3; }
.text-links .label { font-size: 16px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-right: 4px; }
.text-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--slate); }
.text-links .dot { color: var(--line-strong); }
.center .text-links, .details-split .text-links, .hero .text-links { justify-content: center; }
.hero .text-links { margin-top: 26px; }
.facts .text-links { margin-top: 6px; }

/* ---------- Two celebrations ---------- */

.celebrations h2 { margin-bottom: 30px; }
.celebrate-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 980px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .celebrate-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.celebrate {
  position: relative; text-align: center; background: var(--surface); border: 1px solid var(--line);
  padding: 40px 24px 36px; display: flex; flex-direction: column; align-items: center;
}
.celebrate-first { background: var(--blush-bg); border-color: var(--blush); }
.celebrate .numeral { font-family: var(--font-head); font-size: 3rem; line-height: 1; color: var(--tulip); }
.celebrate-first .numeral { color: #b98680; }
.celebrate .flag { margin: 12px 0 6px; font-size: 16px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.celebrate h3 { font-size: 2rem; font-weight: 400; margin-bottom: 10px; }
.celebrate .when { font-family: var(--font-head); font-size: 1.35rem; margin: 0; }
.celebrate .where { font-size: 16px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin: 4px 0 16px; }
.celebrate .blurb { max-width: 26em; margin: 0 auto 24px; color: var(--ink-soft); }
.celebrate .btn { min-width: 180px; }
.celebrate [data-felafnes-cta] { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.celebrate > .btn { margin-top: auto; }

/* ---------- Gentle fade-in ---------- */

.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.will-reveal.in { opacity: 1; transform: none; }

/* ---------- Faspa (Felafnes page) ---------- */

.faspa-tag { margin: 22px 0 0; font-family: var(--font-body); font-size: 16px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--on-dark-soft); }
.faspa-tag .script { display: block; margin-top: 6px; font-size: 3.6rem; line-height: 1; letter-spacing: 0; text-transform: none; color: var(--blush); }
