/* Palette and type lifted verbatim from the flier's own design tokens
   so the site and the print piece are the same object. */
:root {
  --bg:        #f5ead8;
  --surface:   #ebddc5;
  --maroon:    #6e1f28;
  --terracotta:#c67139;
  --gold:      #c9962f;
  --gold-lt:   #f0c46a;
  --sage:      #7a8a5e;
  --ink:       #201e1d;
  --muted:     #4a4340;
  --faint:     #a08a6a;
  --divider:   #e0cfb2;
  --cream:     #f5ead8;
  --cream-dim: #e8d9c2;

  --font-head: Caprasimo, Georgia, serif;
  --font-body: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 22px;
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* The four-colour rule that runs across the top of the flier. */
.ribbon {
  height: 10px;
  background: repeating-linear-gradient(90deg,
    var(--maroon) 0 3.2%, var(--terracotta) 3.2% 6.4%,
    var(--gold) 6.4% 9.6%, var(--sage) 9.6% 12.8%);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--divider); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--faint);
  margin: 0 0 10px;
}

h2 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--maroon);
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  margin: 0 0 18px;
}

p { margin: 0 0 16px; max-width: 62ch; }

/* Centred regions: the 62ch cap above makes a paragraph a narrow left-flush
   block, so text-align alone would centre the text inside that box rather than
   on the page. These need the box itself centred too. */
.hero p, footer p, .gift, .thanks p { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { padding: 34px 0 52px; text-align: center; }

.hero-eyebrows {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 26px;
}
.hero-eyebrows span:first-child { color: var(--sage); }
.hero-eyebrows span:last-child  { color: var(--terracotta); }

.hero h1 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--maroon);
  font-size: clamp(52px, 15vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.015em;
  margin: 0;
}
.hero h1 em { font-style: normal; color: var(--terracotta); }

.hero .fullname {
  font-size: clamp(17px, 3.4vw, 21px);
  font-weight: 600;
  color: var(--muted);
  margin: 16px auto 4px;
}
.hero .hosts { font-size: 15px; color: var(--faint); font-weight: 600; margin: 0 auto 30px; }

/* Arched frame, same geometry as the flier's photo. */
.portrait {
  width: min(310px, 74vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border-radius: 999px 999px 22px 22px;
  overflow: hidden;
  background: var(--surface);
  border: 6px solid var(--gold);
  box-shadow: 0 16px 34px rgba(110, 31, 40, 0.18);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 34% 34%; filter: saturate(0.94) contrast(0.97); }

.diamonds { display: flex; gap: 8px; justify-content: center; margin: 20px 0 0; }
.diamonds i { width: 9px; height: 9px; transform: rotate(45deg); display: block; }
.diamonds i:nth-child(1) { background: var(--maroon); }
.diamonds i:nth-child(2) { background: var(--gold); }
.diamonds i:nth-child(3) { background: var(--sage); }

.hero-date {
  font-family: var(--font-head);
  color: var(--maroon);
  font-size: clamp(21px, 4.6vw, 28px);
  margin: 26px 0 0;
}
.hero-date small { display: block; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; margin-top: 6px; }

/* ---------- Details ---------- */
.details { display: grid; gap: 34px; }
@media (min-width: 720px) { .details { grid-template-columns: 1fr 1fr; gap: 44px; } }

.detail h3 {
  font-family: var(--font-head); font-weight: 400; color: var(--maroon);
  font-size: clamp(22px, 4.4vw, 28px); line-height: 1.15; margin: 0 0 8px;
}
.detail .line { font-size: 16px; color: var(--muted); font-weight: 500; margin: 0 0 4px; }
.detail .note { font-size: 15px; font-weight: 600; color: var(--sage); margin-top: 10px; }

.btn {
  display: inline-block;
  background: var(--maroon);
  color: var(--cream);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover, .btn:focus-visible { background: #86262f; color: var(--cream); }
.btn.ghost { background: transparent; color: var(--maroon); border: 2px solid var(--maroon); }
.btn.ghost:hover { background: var(--maroon); color: var(--cream); }

/* ---------- Schedule ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--divider);
}
.timeline li { position: relative; padding: 0 0 24px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline .t {
  font-family: var(--font-head); color: var(--maroon);
  font-size: 20px; line-height: 1.2; margin-bottom: 2px;
}
.timeline .d { font-size: 15px; color: var(--muted); }

/* ---------- Doljabi ---------- */
.objects {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.objects li {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
}
.objects .o { font-weight: 800; color: var(--maroon); font-size: 15px; }
.objects .m { font-size: 14px; color: var(--muted); }

/* ---------- Maroon card (food + rsvp) ---------- */
.card {
  background: var(--maroon);
  color: var(--cream);
  border-radius: 26px;
  padding: 32px var(--gutter);
}
.card h2 { color: var(--gold-lt); }
.card p { color: var(--cream-dim); }
@media (min-width: 720px) { .card { padding: 40px 44px; } }

.split { display: grid; gap: 24px; }
@media (min-width: 720px) { .split { grid-template-columns: 1fr 1fr; gap: 40px; } }
.split h3 { font-family: var(--font-head); font-weight: 400; color: var(--gold-lt); font-size: 24px; margin: 0 0 6px; }
.split p { margin: 0; font-size: 15px; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 4;
}
.gallery figure.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- RSVP form ---------- */
.form { margin-top: 22px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-lt); margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px; /* 16px minimum stops iOS zooming on focus */
  color: var(--ink);
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }

.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; }
/* Visually hidden but still focusable. Needs an explicit size: the .field input
   rule above sets width:100%, which on an absolutely positioned element resolves
   against the containing block and blows the page out sideways. */
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice label {
  display: block; text-align: center; cursor: pointer;
  background: transparent; color: var(--cream);
  border: 2px solid rgba(245, 234, 216, 0.45);
  border-radius: 12px; padding: 13px 10px;
  font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none;
  margin: 0; transition: background 0.15s ease, border-color 0.15s ease;
}
.choice input:checked + label { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--maroon); }
.choice input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.submit { width: 100%; background: var(--gold-lt); color: var(--maroon); font-size: 17px; padding: 16px; }
.submit:hover, .submit:focus-visible { background: #f7d183; color: var(--maroon); }
.submit[disabled] { opacity: 0.6; cursor: not-allowed; }

.err { color: #ffd9c9; font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.gift { font-size: 15px; color: var(--cream-dim); margin: 18px auto 0; text-align: center; }

.thanks { text-align: center; padding: 18px 0; }
.thanks h3 { font-family: var(--font-head); font-weight: 400; color: var(--gold-lt); font-size: 30px; margin: 0 0 10px; }
.thanks p { color: var(--cream-dim); margin: 0 auto; }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 40px 0 56px; }
footer .name { font-family: var(--font-head); color: var(--maroon); font-size: 22px; margin-bottom: 8px; }
footer .date { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--faint); }
