:root {
  --paper: #f8f4ec;
  --paper-deep: #f1e9da;
  --ink: #3b2f2a;
  --muted: #7a6a60;
  --gold: #b08a4a;
  --rose: #c2477a;
  --leaf: #5f7a4a;
  --line: rgba(176, 138, 74, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(rgba(176, 138, 74, 0.07) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.55;
}

.script { font-family: "Pinyon Script", cursive; font-weight: 400; }
.eyebrow {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 1rem;
}
.center { text-align: center; }
h2 {
  text-align: center;
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 2.5rem;
  letter-spacing: 0.02em;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 520px);
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 3rem 1.5rem;
}
.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  animation: rise 1.4s ease-out both;
}
.hero-text { text-align: center; animation: rise 1.4s 0.25s ease-out both; }
h1 { margin: 0; line-height: 1; font-weight: 400; }
h1 .script { display: block; font-size: clamp(4rem, 9vw, 6.5rem); color: var(--ink); }
h1 .amp {
  display: block;
  font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--rose);
  margin: 0.2rem 0 0.4rem;
}
.lede { font-style: italic; color: var(--muted); font-size: 1.25rem; margin: 1.5rem 0 2rem; }

.date {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: "Jost", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.date strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.countdown { display: flex; justify-content: center; gap: 2rem; margin: 2rem 0; }
.countdown b { display: block; font-size: 2.2rem; font-weight: 500; color: var(--gold); line-height: 1; }
.countdown small {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--muted);
}

.btn {
  display: inline-block;
  font-family: "Jost", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 1rem 2.2rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: var(--rose); border-color: var(--rose); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Events */
.events, .rsvp { padding: 6rem 1.5rem; }
.events { background: var(--paper-deep); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: -10px;
  padding: 3rem 2rem;
  text-align: center;
}
.ornament { color: var(--gold); font-size: 1.6rem; margin-bottom: 0.5rem; }
.card h3 {
  font-family: "Pinyon Script", cursive;
  font-weight: 400;
  font-size: 2.6rem;
  margin: 0 0 1rem;
  color: var(--rose);
}
.card p { margin: 0.2rem 0; }
.time {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.9rem !important;
}
.venue { font-size: 1.5rem; font-weight: 600; }
.place { color: var(--muted); font-style: italic; }
.link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--leaf);
  font-family: "Jost", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.add-cal { text-align: center; margin-top: 3rem; }

/* Schedule */
.schedule { max-width: 620px; margin: 4.5rem auto 0; text-align: center; }
.schedule h3 {
  font-family: "Pinyon Script", cursive;
  font-weight: 400;
  font-size: 2.6rem;
  color: var(--rose);
  margin: 0;
}
.schedule .note { font-style: italic; color: var(--muted); margin: 0.3rem 0 2.2rem; }
.schedule ol { list-style: none; margin: 0; padding: 0; text-align: left; }
.schedule li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.schedule li:last-child { border-bottom: 1px solid var(--line); }
.schedule time {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--gold);
  text-align: right;
  padding-top: 0.3rem;
}
.schedule h4 { margin: 0; font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
.schedule li p { margin: 0.1rem 0 0; color: var(--muted); }

/* Story timeline */
.story, .entourage { padding: 6rem 1.5rem; }
.timeline {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.5rem;
  bottom: 0.5rem;
  border-left: 1px solid var(--line);
}
.timeline li {
  position: relative;
  width: 50%;
  padding: 0 2.5rem 2.8rem 0;
  text-align: right;
}
.timeline li:nth-child(even) { margin-left: 50%; padding: 0 0 2.8rem 2.5rem; text-align: left; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gold);
}
.timeline li:nth-child(even)::before { right: auto; left: -6px; }
.timeline li.today::before { background: var(--rose); border-color: var(--rose); }
.when {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--gold);
}
.timeline h3 {
  font-family: "Pinyon Script", cursive;
  font-weight: 400;
  font-size: 2.1rem;
  color: var(--rose);
  margin: 0.2rem 0 0.3rem;
  line-height: 1.2;
}
.timeline p { margin: 0; color: var(--muted); }

/* Entourage */
.entourage { background: var(--paper-deep); }
.party {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.side h3 {
  font-family: "Jost", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--leaf);
  margin: 0 0 1.6rem;
}
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.side .name { display: block; font-size: 1.45rem; font-weight: 500; }
.side .role { display: block; font-style: italic; color: var(--muted); font-size: 1rem; }
.divider { color: var(--gold); font-size: 1.6rem; align-self: center; }

/* Gallery */
.gallery { padding: 6rem 1.5rem; }
.portrait {
  max-width: 380px;
  margin: 0 auto 4rem;
  padding: 14px 14px 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgba(59, 47, 42, 0.45);
  transform: rotate(-1.5deg);
  text-align: center;
}
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption { padding: 0.6rem 0 0.9rem; }
.portrait .script { font-size: 2.2rem; color: var(--rose); }
.photos {
  columns: 3 260px;
  column-gap: 1.2rem;
  max-width: 980px;
  margin: 0 auto;
}
.photos figure {
  margin: 0 0 1.2rem;
  break-inside: avoid;
  overflow: hidden;
  border: 1px solid var(--line);
}
.photos img { display: block; width: 100%; height: auto; transition: transform 0.6s ease; }
.photos figure:hover img { transform: scale(1.04); }
.rsvp { background: var(--paper-deep); }

/* RSVP */
.rsvp .sub { text-align: center; color: var(--muted); font-style: italic; margin: -1.5rem 0 2.5rem; }
form { max-width: 560px; margin: 0 auto; display: grid; gap: 1.4rem; }
.hidden { display: none; }
.field { display: grid; gap: 0.4rem; border: 0; padding: 0; margin: 0; }
.field > span, .field legend {
  font-family: "Jost", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
}
.field em { text-transform: none; letter-spacing: 0; }
input[type="text"], input[type="tel"], input[type="number"], textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.1rem;
  width: 100%;
  border-radius: 0;
}
input:focus, textarea:focus { outline: none; border-bottom-color: var(--gold); }
textarea { resize: vertical; }
.choice { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.choice legend { width: 100%; margin-bottom: 0.6rem; }
.choice label { flex: 1 1 200px; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice label span {
  display: block;
  text-align: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
form .btn { justify-self: center; margin-top: 0.6rem; }
.form-status { text-align: center; min-height: 1.5em; margin: 0; font-style: italic; }
.form-status.ok { color: var(--leaf); font-size: 1.35rem; }
.form-status.err { color: var(--rose); }

footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Jost", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
footer .small { font-size: 2.4rem; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 0 0 0.3rem; }

/* Music toggle */
.music {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem 0.7rem 0.9rem;
  font-family: "Jost", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(248, 244, 236, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(59, 47, 42, 0.5);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.music:hover { border-color: var(--rose); color: var(--rose); }
.music .note { font-size: 1.1rem; color: var(--rose); line-height: 1; }
.music[aria-pressed="true"] .note { animation: sway 1.6s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateY(-3px) rotate(-10deg); } }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 1.5rem; }
  .hero-art { max-width: 360px; margin: 0 auto; }
  .row { grid-template-columns: 1fr; }
  .schedule li { grid-template-columns: 4.8rem 1fr; gap: 1rem; }
  .timeline::before { left: 6px; }
  .timeline li, .timeline li:nth-child(even) { width: auto; margin-left: 0; padding: 0 0 2.4rem 2rem; text-align: left; }
  .timeline li::before, .timeline li:nth-child(even)::before { left: 0; right: auto; }
  .party { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}
