:root {
  color-scheme: light;
  --paper: #fbf5ec;
  --white: #fffcf6;
  --ink: #253e52;
  --blue: #4c6a81;
  --muted: #465867;
  --gold: #ac8247;
  --rule: #e1d4bf;
  --mist: #e2eaed;
  --serif: 'Baskerville', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --sans: 'Aptos', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
}

[hidden] { display: none !important; }

h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }

:focus-visible {
  outline: 2px solid #47677e;
  outline-offset: 4px;
}

.shell { width: min(100% - 6rem, 72rem); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  background: var(--white);
  border: 1px solid var(--blue);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.topbar { border-bottom: 1px solid var(--rule); }

.topbar-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.monogram {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--rule);
  border-radius: 50% / 58%;
  padding: .25rem .72rem;
  color: var(--ink);
  font: 1.45rem/1.35 var(--serif);
  text-decoration: none;
}

.monogram span { color: var(--gold); font-size: .65rem; }

nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2rem); }
nav a { color: var(--ink); font-size: .92rem; text-decoration: none; }
nav a:hover { text-decoration: underline; text-underline-offset: .24em; }

.nav-rsvp {
  border: 1px solid #a9b7bd;
  border-radius: 999px;
  padding: .48rem .94rem;
  font-weight: 600;
}

.hero {
  min-height: 35.5rem;
  display: grid;
  grid-template-columns: .92fr 1.13fr;
  align-items: center;
  gap: 1rem;
  padding-block: 2.25rem 2.8rem;
  isolation: isolate;
}

.hero-copy { position: relative; z-index: 1; padding-left: clamp(0rem, 2vw, 1.7rem); }

.eyebrow {
  font-weight: 650;
  font-size: .79rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .25em;
}

.hero-label { display: flex; align-items: center; gap: .7rem; color: #73552f; }
.hero-label::before { content: ''; width: 1.65rem; height: 1px; background: #bf9d67; }

h1 {
  margin: 1.25rem 0 1.45rem;
  font: 400 clamp(5rem, 9vw, 8rem)/.83 var(--serif);
  letter-spacing: -.065em;
}

h1 em { display: block; margin-top: .12em; color: var(--blue); font-weight: 400; }

.hero-intro { max-width: 21rem; color: var(--muted); font-size: 1.16rem; margin-bottom: 1.65rem; }

.button {
  min-height: 3.15rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .65em;
  padding: .64rem 1.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf7;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}

.button:hover { background: #3c5b72; box-shadow: 0 4px 14px #30475824; }

.hero-art {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: 41rem;
  isolation: isolate;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  /* Fade the edges of the illustration into the paper behind it. */
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent), linear-gradient(to bottom, transparent, #000 .8%, #000 94%, transparent);
  mask-composite: intersect;
  animation: float 6s ease-in-out infinite;
}

.sparkle {
  position: absolute;
  z-index: 1;
  width: var(--size, .95rem);
  aspect-ratio: 1;
  background: #ad803e;
  clip-path: polygon(50% 0, 59% 40%, 100% 50%, 59% 60%, 50% 100%, 41% 60%, 0 50%, 41% 40%);
  animation: twinkle 4.5s ease-in-out infinite alternate both;
  pointer-events: none;
}

.sparkle-one { inset: 10% auto auto 16%; --size: 1.25rem; }
.sparkle-two { inset: 15% 14% auto auto; animation-delay: -1.5s; }
.sparkle-three { inset: 47% auto auto 5%; --size: .62rem; animation-delay: -2.4s; }
.sparkle-four { inset: 52% 4% auto auto; --size: 1.2rem; animation-delay: -3.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-.36rem); }
}

@keyframes twinkle {
  from { opacity: .35; transform: scale(.7); }
  to { opacity: .92; transform: scale(1.13); }
}

.details {
  background: var(--mist);
  border-block: 1px solid #cfdbdd;
  scroll-margin-top: 1rem;
}

.details-inner {
  display: grid;
  grid-template-columns: .85fr 1.65fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding-block: 2.05rem 2.3rem;
}

.section-heading .ornament { display: inline-block; margin-bottom: .27rem; color: #886333; font-size: 1.12rem; }

.section-heading h2 {
  font: 400 clamp(2.25rem, 3.8vw, 3.55rem)/1.03 var(--serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}

.section-heading p { margin-top: .8rem; color: var(--muted); }
.details-heading h2 { font-size: clamp(2.1rem, 3.4vw, 3.1rem); }

.event-facts { display: grid; grid-template-columns: 1fr .8fr 1.3fr; }
.event-fact { border-left: 1px solid #aebfc6; padding: .26rem clamp(.65rem, 2.2vw, 1.7rem); }
.event-fact dt { display: flex; align-items: center; gap: .62rem; font-weight: 650; }
.event-fact dd { padding-left: 1.65rem; margin-top: .32rem; color: var(--muted); overflow-wrap: anywhere; }
.event-fact dd:has(a[hidden]) { display: none; }
.event-secondary { font-size: .92rem; }
.event-map { color: var(--ink); text-underline-offset: .18em; }

.line-icon {
  display: inline-block;
  position: relative;
  width: 1.06rem;
  height: 1.06rem;
  flex: 0 0 auto;
  border: 1.35px solid currentColor;
  color: #49647a;
}

.calendar { border-radius: .16rem; }
.calendar::before { content: ''; position: absolute; inset: .24rem 0 auto; border-top: 1.35px solid; }
.calendar::after { content: ''; position: absolute; inset: -.17rem .2rem auto; height: .28rem; border-inline: 1.35px solid; }
.clock { border-radius: 50%; }
.clock::before { content: ''; position: absolute; left: 43%; top: 20%; width: 27%; height: 32%; border: solid; border-width: 0 0 1.35px 1.35px; }
.pin { border-radius: 50% 50% 50% .18rem; transform: rotate(-45deg) scale(.88); }
.pin::before { content: ''; position: absolute; inset: 27%; border: 1.35px solid; border-radius: 50%; }

.reception {
  display: grid;
  grid-template-columns: 1.23fr 1fr;
  gap: clamp(2.5rem, 7vw, 6.75rem);
  padding-block: clamp(3.5rem, 8vw, 6.25rem);
}

.confirmation, .registries { scroll-margin-top: 2rem; }

.rsvp-form { display: grid; gap: .95rem; margin-top: 1.5rem; }

.form-item label { display: block; width: fit-content; margin-bottom: .38rem; font-weight: 650; }

.form-item input, .counter {
  width: 100%;
  min-height: 3rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid #bbc3c4;
  border-radius: .46rem;
}

.form-item input { padding: .5rem .8rem; }
.form-item input::placeholder { color: #626d76; }

.counter { display: grid; grid-template-columns: 3rem 4rem 3rem; width: fit-content; }
.counter input { appearance: textfield; -moz-appearance: textfield; min-height: 2.85rem; padding: .35rem .25rem; border: 0; border-radius: 0; text-align: center; }
.counter input::-webkit-inner-spin-button, .counter input::-webkit-outer-spin-button { appearance: none; }
.counter button { background: transparent; border: 0; border-radius: .38rem; color: var(--ink); font-size: 1.35rem; cursor: pointer; }
.counter button:hover:enabled { background: #e7edf0; }
.counter button:disabled { opacity: .45; cursor: default; }

.whatsapp { justify-self: start; margin-top: .26rem; }

.chat-icon { position: relative; display: inline-block; width: 1.05em; aspect-ratio: 1; border: 1.55px solid; border-radius: 50%; }
.chat-icon::after { content: ''; position: absolute; bottom: -.1em; left: -.08em; width: .3em; height: .3em; border: solid; border-width: 0 0 1.55px 1.55px; background: var(--ink); transform: skew(-14deg, -14deg); }
.whatsapp:hover .chat-icon::after { background: #3c5b72; }

.form-help { color: var(--muted); font-size: .9rem; }
.feedback { font-size: .92rem; font-weight: 600; }
.message-preview { padding: .95rem 1.15rem; background: var(--mist); border-radius: .5rem; }
.message-preview h3 { font-size: 1rem; margin-bottom: .3rem; }
.message-preview p { overflow-wrap: anywhere; white-space: pre-line; }

.registries { border-left: 1px solid var(--rule); padding-left: clamp(1.5rem, 4vw, 4rem); }
.registry-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .65rem; }

.registry-list a {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 4.4rem;
  padding: .7rem .85rem;
  border: 1px solid var(--rule);
  border-radius: .5rem;
  background: var(--white);
  text-decoration: none;
}

.registry-list a[href]:hover { border-color: var(--blue); }
.registry-list small { display: block; margin-top: .12rem; color: var(--muted); font-size: .85rem; }
.registry-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.55rem; aspect-ratio: 1; border-radius: 50%; background: var(--mist); }
.gift-icon { display: block; position: relative; width: 1.05rem; height: .68rem; border: 1.3px solid; margin-top: .26rem; color: #49647a; }
.gift-icon::before { content: ''; position: absolute; inset: -.25rem -.15rem auto; height: .24rem; border: 1.3px solid; border-radius: .09rem; }
.gift-icon::after { content: ''; position: absolute; left: 45%; top: -.25rem; height: .85rem; border-left: 1.3px solid; }

.footer {
  padding: 1.6rem 1rem 2rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--blue);
}

.footer span { color: var(--gold); }
.footer p { font: italic 1.65rem/1.3 var(--serif); }

@media (max-width: 54rem) {
  .shell { width: min(100% - 3rem, 72rem); }
  .hero { min-height: 30rem; }
  h1 { font-size: clamp(4.3rem, 10vw, 6rem); }
  .details-inner { grid-template-columns: 1fr; gap: 1.15rem; }
  .details-heading .ornament { display: none; }
  .event-fact:first-child { border-left: 0; padding-left: 0; }
}

@media (max-width: 40rem) {
  .shell { width: min(100% - 2.25rem, 33rem); }
  .topbar-inner { min-height: 3.85rem; }
  .monogram { font-size: 1.25rem; }
  nav a { font-size: .85rem; }
  .nav-rsvp { padding: .4rem .65rem; }
  .nav-long { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 1.9rem; padding-block: 2.8rem 1.35rem; }
  .hero-copy { text-align: center; padding-left: 0; }
  .hero-label { justify-content: center; }
  .hero-label::after { content: ''; width: 1.65rem; height: 1px; background: #bf9d67; }
  h1 { font-size: clamp(4.25rem, 15.3vw, 6.1rem); margin-block: 1.05rem 1.15rem; }
  .hero-intro { margin-inline: auto; margin-bottom: 1.4rem; font-size: 1.05rem; }
  .hero-art { margin-inline: auto; max-width: 29rem; }
  .details-inner { padding-block: 1.6rem 1.7rem; }
  .event-facts { grid-template-columns: 1fr 1fr; gap: 1rem .25rem; }
  .event-fact:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  .reception { grid-template-columns: 1fr; }
  .registries { border-left: 0; border-top: 1px solid var(--rule); padding: 2rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
