:root {
  --wine-900: #1f050b;
  --wine-800: #2a0810;
  --wine-600: #4b0f1e;
  --gold: #d2a54a;
  --gold-soft: #e9d5a0;
  --ivory: #f7eedd;
  --ivory-dim: rgba(247, 238, 221, 0.72);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --frame-gap: clamp(10px, 2.2vw, 26px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  color: var(--ivory);
  font-family: var(--serif);
  background-color: var(--wine-800);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(120, 30, 48, 0.55), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, var(--wine-900) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d2a54a' stroke-opacity='.075'%3E%3Ccircle cx='28' cy='0' r='28'/%3E%3Ccircle cx='28' cy='56' r='28'/%3E%3Ccircle cx='0' cy='28' r='28'/%3E%3Ccircle cx='56' cy='28' r='28'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Invitation-card border: two hairlines with a diamond on each corner */
.frame {
  position: fixed;
  inset: var(--frame-gap);
  border: 1px solid rgba(210, 165, 74, 0.55);
  pointer-events: none;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(210, 165, 74, 0.22);
}

.frame i {
  position: absolute;
  width: 11px;
  height: 11px;
  background: var(--gold);
  transform: rotate(45deg);
}

.frame i:nth-child(1) { top: -6px; left: -6px; }
.frame i:nth-child(2) { top: -6px; right: -6px; }
.frame i:nth-child(3) { bottom: -6px; left: -6px; }
.frame i:nth-child(4) { bottom: -6px; right: -6px; }

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: calc(var(--frame-gap) + clamp(28px, 6vh, 64px)) calc(var(--frame-gap) + 24px)
    calc(var(--frame-gap) + 24px);
  text-align: center;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 44rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1.1em;
  margin: 0 0 clamp(24px, 5vh, 44px);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: clamp(24px, 8vw, 56px);
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, var(--gold));
}

.eyebrow::after {
  --dir: left;
}

.monogram {
  display: block;
  width: clamp(150px, 34vw, 232px);
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
}

.name {
  margin: clamp(20px, 4vh, 34px) 0 0;
  font-size: clamp(2.3rem, 8.4vw, 4.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ivory);
}

.name span {
  display: block;
  margin-top: 0.7em;
  font-family: var(--sans);
  font-size: clamp(0.72rem, 2.2vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  text-transform: uppercase;
  color: var(--gold);
}

.rings {
  display: block;
  width: 148px;
  height: 24px;
  margin: clamp(22px, 4.5vh, 38px) 0;
  color: var(--gold);
}

.tagline {
  margin: 0;
  font-size: clamp(1.4rem, 4.6vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  color: var(--gold-soft);
}

.note {
  max-width: 31em;
  margin: 1.1em 0 0;
  font-size: clamp(1.05rem, 3.2vw, 1.22rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ivory-dim);
}

.footer {
  margin-top: clamp(32px, 6vh, 56px);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 238, 221, 0.5);
}

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero > *,
  .footer {
    opacity: 0;
    animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }

  .hero > :nth-child(1) { animation-delay: 0.15s; }
  .hero > :nth-child(2) { animation-delay: 0.35s; }
  .hero > :nth-child(3) { animation-delay: 0.6s; }
  .hero > :nth-child(4) { animation-delay: 0.8s; }
  .hero > :nth-child(5) { animation-delay: 0.95s; }
  .hero > :nth-child(6) { animation-delay: 1.1s; }
  .footer { animation-delay: 1.4s; }

  .frame {
    animation: fade 1.6s ease-out both;
  }
}

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

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

@media (max-width: 380px) {
  .eyebrow { letter-spacing: 0.32em; text-indent: 0.32em; }
  .name span { letter-spacing: 0.48em; text-indent: 0.48em; }
}
