:root {
  --ink: #1a1f2e;
  --muted: #5e6578;
  --paper: #f8f9fc;
  --line: #d4d8e3;
  --deep-blue: #2e4a6e;
  --dusty-blue: #5b7ea1;
  --gold: #c5a44e;
  --cream: #fdf8f0;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(46, 74, 110, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background:
    linear-gradient(135deg, rgba(46, 74, 110, 0.06), transparent 36%),
    linear-gradient(315deg, rgba(197, 164, 78, 0.05), transparent 34%),
    var(--paper);
  color: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Montserrat", "Trebuchet MS", Verdana, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(46, 74, 110, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 74, 110, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent 78%);
}

a {
  color: inherit;
}

/* ── Page shell ────────────────────────────────── */

.page-shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 36px 24px 48px;
}

/* ── Masthead ──────────────────────────────────── */

.masthead {
  position: relative;
  padding: 26px 0 18px;
  text-align: center;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(197, 164, 78, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.masthead::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cpath d='M10 50 Q20 10 40 30 Q50 40 60 30 Q80 10 110 50' fill='none' stroke='%235b7ea1' stroke-width='1.2'/%3E%3Cpath d='M25 45 Q35 20 50 35 Q60 42 75 25 Q85 15 95 40' fill='none' stroke='%235b7ea1' stroke-width='0.8'/%3E%3Ccircle cx='42' cy='28' r='2' fill='%235b7ea1' opacity='0.5'/%3E%3Ccircle cx='78' cy='22' r='1.5' fill='%235b7ea1' opacity='0.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.masthead.compact {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ── Monogram ──────────────────────────────────── */

.monogram {
  display: inline-block;
  margin: 0 0 14px;
  padding: 10px 22px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* ── Gold divider ──────────────────────────────── */

.gold-divider {
  border: none;
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── Typography ────────────────────────────────── */

.eyebrow {
  margin: 0 0 10px;
  color: var(--dusty-blue);
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.0;
}

h1 {
  max-width: 12ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--deep-blue);
  font-size: 3.6rem;
  font-weight: 500;
}

h2 {
  margin-bottom: 18px;
  color: var(--deep-blue);
  font-size: 2.2rem;
  font-weight: 500;
  text-align: center;
}

.lede {
  max-width: 34rem;
  margin: 18px auto 0;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.12rem;
  text-align: center;
}

/* ── Invitation image ──────────────────────────── */

.couple-photo,
.photo-strip {
  overflow: hidden;
  margin: 0 auto 28px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.couple-photo {
  width: min(100%, 360px);
}

.couple-photo img,
.photo-strip img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.couple-photo img {
  height: auto;
}

.photo-strip img {
  height: 190px;
  object-position: center 34%;
}

/* ── Event details ─────────────────────────────── */

.event-details {
  margin: 0 0 24px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.15s;
}

.event-details dl {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.event-details div {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  background: var(--cream);
  border-left: 3px solid var(--gold);
}

.event-details dt {
  color: var(--dusty-blue);
  font-family: "Montserrat", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

/* ── Agenda section ────────────────────────────── */

.agenda-section {
  padding: 24px 0 10px;
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.25s;
}

/* ── Order of service list ─────────────────────── */

.order-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: service;
}

.order-list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  counter-increment: service;
  animation: fadeInUp 0.4s ease both;
}

.order-list li:nth-child(1)  { animation-delay: 0.08s; }
.order-list li:nth-child(2)  { animation-delay: 0.16s; }
.order-list li:nth-child(3)  { animation-delay: 0.24s; }
.order-list li:nth-child(4)  { animation-delay: 0.32s; }
.order-list li:nth-child(5)  { animation-delay: 0.40s; }
.order-list li:nth-child(6)  { animation-delay: 0.48s; }
.order-list li:nth-child(7)  { animation-delay: 0.56s; }
.order-list li:nth-child(8)  { animation-delay: 0.64s; }
.order-list li:nth-child(9)  { animation-delay: 0.72s; }
.order-list li:nth-child(10) { animation-delay: 0.80s; }
.order-list li:nth-child(11) { animation-delay: 0.88s; }
.order-list li:nth-child(12) { animation-delay: 0.96s; }
.order-list li:nth-child(13) { animation-delay: 1.04s; }
.order-list li:nth-child(14) { animation-delay: 1.12s; }
.order-list li:nth-child(15) { animation-delay: 1.20s; }
.order-list li:nth-child(16) { animation-delay: 1.28s; }
.order-list li:nth-child(17) { animation-delay: 1.36s; }

.order-list li::before {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  content: counter(service);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.order-list span {
  min-width: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ── Closing note ──────────────────────────────── */

.closing-note {
  display: inline-flex;
  margin: 24px auto 0;
  padding: 9px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  color: var(--deep-blue);
  font-weight: 500;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  text-align: center;
  width: 100%;
  justify-content: center;
}

/* ── Empty/placeholder note ────────────────────── */

.empty-note {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--cream);
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
}

/* ── Agenda link cards ─────────────────────────── */

.agenda-links {
  display: grid;
  gap: 14px;
}

.agenda-link {
  display: grid;
  gap: 5px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.agenda-link:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 22px 56px rgba(46, 74, 110, 0.14);
}

.agenda-link span {
  color: var(--dusty-blue);
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.agenda-link strong {
  color: var(--deep-blue);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

/* ── Footer ────────────────────────────────────── */

.page-footer {
  padding: 28px 0 0;
  text-align: center;
}

.page-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(46, 74, 110, 0.24);
  border-radius: 8px;
  color: var(--deep-blue);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.page-footer a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Animations ────────────────────────────────── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.masthead {
  animation: fadeIn 0.6s ease both;
}

.couple-photo,
.photo-strip {
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.1s;
}

.agenda-links {
  animation: fadeInUp 0.5s ease both;
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── Responsive ────────────────────────────────── */

@media (min-width: 680px) {
  .page-shell {
    padding-top: 54px;
  }

  .masthead {
    padding-bottom: 30px;
  }

  h1 {
    font-size: 4.8rem;
  }

  .photo-strip img {
    height: 260px;
  }

  .event-details dl {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-list li {
    grid-template-columns: 4.2rem 1fr;
    min-height: 72px;
  }

  .agenda-links {
    grid-template-columns: repeat(2, 1fr);
  }
}
