:root {
  --berry: #b20f38;
  --raspberry: #da1852;
  --pink: #ec3c7c;
  --orange: #ef7b35;
  --gold: #e89618;
  --olive: #aaa951;
  --ink: #302328;
  --muted: #75676b;
  --paper: #fffdfb;
  --cream: #fff7ef;
  --white: #ffffff;
  --line: rgba(178, 15, 56, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 24px 70px rgba(97, 43, 54, 0.13);
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

a:focus-visible,
button:focus-visible,
iframe:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 90px);
  padding: 70px clamp(24px, 7vw, 110px);
  background-image: url("assets/hero-background.jpg");
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 650px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 38px;
  background: rgba(255, 253, 251, 0.86);
  box-shadow: 0 28px 80px rgba(126, 43, 53, 0.18);
  backdrop-filter: blur(9px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--berry);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.21em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1 {
  margin: 0;
  color: var(--berry);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.78;
}

h1 span {
  display: block;
  font-size: clamp(5rem, 8.2vw, 8.6rem);
  font-style: italic;
  letter-spacing: -0.07em;
}

h1 strong {
  display: block;
  margin: 28px 0 0 0.12em;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.55vw, 1.34rem);
  font-weight: 600;
  letter-spacing: 0.23em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-date {
  margin: 34px 0 0;
  color: var(--orange);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.hero-intro {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--berry);
  box-shadow: 0 12px 28px rgba(178, 15, 56, 0.24);
}

.button-primary:hover {
  background: #95102f;
  box-shadow: 0 16px 34px rgba(178, 15, 56, 0.3);
}

.button-secondary {
  border-color: rgba(178, 15, 56, 0.28);
  color: var(--berry);
  background: rgba(255, 255, 255, 0.72);
}

.button-secondary:hover {
  background: var(--white);
}

.hero-art {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  min-height: 610px;
  justify-self: end;
}

.hero-ring {
  position: absolute;
  top: 4%;
  left: 6%;
  width: 86%;
  aspect-ratio: 1;
  border: 2px solid rgba(178, 15, 56, 0.2);
  border-radius: 44% 56% 49% 51% / 57% 41% 59% 43%;
  background:
    radial-gradient(circle at 64% 26%, rgba(236, 60, 124, 0.16), transparent 31%),
    radial-gradient(circle at 36% 70%, rgba(239, 123, 53, 0.19), transparent 34%),
    rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.9), 0 30px 80px rgba(127, 54, 70, 0.1);
  transform: rotate(7deg);
}

.dogs {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  width: 96%;
  filter: drop-shadow(0 24px 20px rgba(85, 47, 28, 0.15));
}

.flower {
  position: absolute;
  z-index: 2;
  width: 86px;
  height: 86px;
}

.flower-two {
  right: 1%;
  bottom: 18%;
  transform: scale(0.74) rotate(40deg);
}

.flower i {
  position: absolute;
  top: 29px;
  left: 29px;
  width: 30px;
  height: 38px;
  border-radius: 55% 45% 58% 42%;
  background: linear-gradient(145deg, var(--raspberry), var(--pink));
  opacity: 0.88;
  transform-origin: 14px 14px;
}

.flower i:nth-child(2) {
  transform: rotate(72deg);
}

.flower i:nth-child(3) {
  transform: rotate(144deg);
}

.flower i:nth-child(4) {
  transform: rotate(216deg);
}

.flower i:nth-child(5) {
  transform: rotate(288deg);
}

.section {
  padding: clamp(90px, 12vw, 150px) clamp(24px, 7vw, 110px);
}

.events {
  position: relative;
  background: var(--white);
}

.section-heading {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 1200px;
  grid-template-columns: 1fr;
  margin: 0 auto 56px;
}

h2 {
  margin: 0;
  color: var(--berry);
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.event-grid {
  display: grid;
  max-width: 1200px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  margin: 0 auto;
}

.event-card {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 62px);
  padding-bottom: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius);
}

.event-card-light {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 8%, rgba(170, 169, 81, 0.19), transparent 27%),
    linear-gradient(140deg, #fffdfb, #fff6ef);
  box-shadow: var(--shadow);
}

.event-card-header,
.event-details {
  position: relative;
  z-index: 1;
}

.event-kicker {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.event-card h3 {
  max-width: 420px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 4.4vw, 4.2rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.event-details {
  display: grid;
  gap: 21px;
  margin: 60px 0 0;
}

.event-details div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(178, 15, 56, 0.12);
}

.event-details div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.event-details dt {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.event-details dd {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}

.event-details dd strong {
  display: block;
}

.event-details address {
  margin-top: 5px;
  color: var(--muted);
  font-size: clamp(0.75rem, 1.05vw, 0.84rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}

.location-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 10px;
  color: var(--berry);
  font-size: 0.9rem;
  font-weight: 700;
}

.celebration {
  position: relative;
  display: grid;
  min-height: 580px;
  overflow: hidden;
  place-items: center;
  align-content: center;
  padding: 100px 24px;
  color: var(--white);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(178, 15, 56, 0.91), rgba(119, 7, 38, 0.94)),
    url("assets/celebration-background.jpg") center / cover;
}

.celebration-logo {
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.celebration-cap {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(28px, 8vw, 150px);
  width: clamp(120px, 15vw, 210px);
  opacity: 0.82;
  filter: drop-shadow(0 18px 16px rgba(38, 48, 52, 0.2));
  pointer-events: none;
  transform: translateY(-50%) rotate(10deg);
}

.celebration-message {
  position: relative;
  z-index: 2;
  max-width: 930px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(65, 0, 20, 0.2);
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(290px, 0.74fr) minmax(520px, 1.26fr);
  gap: clamp(45px, 8vw, 120px);
  align-items: start;
  background:
    radial-gradient(circle at 3% 90%, rgba(170, 169, 81, 0.14), transparent 24%),
    var(--cream);
}

.rsvp-sidebar {
  position: sticky;
  z-index: 2;
  top: 135px;
  max-width: 520px;
  padding-top: 30px;
}

.rsvp-intro>p:not(.eyebrow) {
  margin: 26px 0 0;
  color: var(--muted);
}

.rsvp-help {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.rsvp-help strong {
  font-size: 0.9rem;
}

.rsvp-help span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.rsvp-help-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 6px;
  color: var(--berry);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-shell {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 880px;
  border: 1px solid rgba(178, 15, 56, 0.11);
  border-radius: var(--radius);
  background: #fbfcfe;
  box-shadow: var(--shadow);
}

.form-shell-top {
  display: grid;
  height: 12px;
  grid-template-columns: repeat(5, 1fr);
}

.form-shell-top span:nth-child(1) {
  background: var(--berry);
}

.form-shell-top span:nth-child(2) {
  background: var(--raspberry);
}

.form-shell-top span:nth-child(3) {
  background: var(--pink);
}

.form-shell-top span:nth-child(4) {
  background: var(--orange);
}

.form-shell-top span:nth-child(5) {
  background: var(--olive);
}

.form-shell iframe {
  display: block;
  width: 100%;
  height: 930px;
  border: 0;
  background: #fbfcfe;
}

.form-loading {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 0.9rem;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.js .form-loading {
  display: flex;
}

.form-loading span {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(178, 15, 56, 0.17);
  border-top-color: var(--berry);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.form-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 70px 24px;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  background: var(--ink);
}

footer img {
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

footer p {
  margin: 3px 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal-title {
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 820ms ease,
    transform 880ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 760ms ease;
  transition-delay: 90ms;
}

.js .event-card h3.reveal-title {
  transition-delay: 150ms;
}

.js .reveal-title.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 150px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-art {
    width: min(100%, 670px);
    min-height: 580px;
    justify-self: center;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    min-height: auto;
  }

  .rsvp {
    grid-template-columns: 1fr;
  }

  .rsvp-sidebar {
    display: contents;
  }

  .rsvp-intro {
    order: 1;
    max-width: 680px;
  }

  .form-shell {
    order: 2;
  }

  .rsvp-help {
    order: 3;
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 12px;
  }

  .hero {
    gap: 18px;
    padding: 32px max(20px, env(safe-area-inset-right)) 54px max(20px, env(safe-area-inset-left));
    background-position: 52% center;
  }

  .hero-copy {
    width: 100%;
    padding: 28px 22px 30px;
    border-radius: 26px;
    text-align: center;
    backdrop-filter: blur(6px);
  }

  h1 span {
    font-size: clamp(4.9rem, 25.5vw, 6.8rem);
  }

  h1 strong {
    margin: 22px 0 0;
    font-size: clamp(0.95rem, 3.6vw, 1.15rem);
    letter-spacing: 0.14em;
    line-height: 1.45;
  }

  .hero-date {
    margin-top: 26px;
    font-size: clamp(1.85rem, 7.2vw, 2.35rem);
  }

  .hero-intro {
    max-width: none;
    margin-inline: auto;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
  }

  .button {
    width: 100%;
  }

  .hero-art {
    width: min(100%, 480px);
    min-height: clamp(320px, 100vw, 430px);
  }

  .hero-ring {
    top: 7%;
    left: 4%;
    width: 92%;
  }

  .dogs {
    width: 100%;
  }

  .flower {
    transform: scale(0.7);
  }

  .flower-two {
    transform: scale(0.55) rotate(40deg);
  }

  .section {
    padding-block: 72px;
    padding-inline: 18px;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  h2 {
    font-size: clamp(2.8rem, 15vw, 4.25rem);
  }

  .event-grid {
    gap: 18px;
  }

  .event-card {
    padding: 30px 24px;
    border-radius: 22px;
  }

  .event-card h3 {
    font-size: clamp(2.65rem, 13vw, 3.6rem);
  }

  .event-details {
    gap: 0;
    margin-top: 36px;
  }

  .event-details div {
    grid-template-columns: 1fr;
    gap: 5px;
    padding-block: 18px;
  }

  .event-details div:first-child {
    padding-top: 0;
  }

  .event-details dd {
    font-size: 1rem;
  }

  .event-details address {
    font-size: clamp(0.68rem, 2.75vw, 0.84rem);
  }

  .celebration {
    min-height: 0;
    padding: clamp(76px, 18vw, 100px) 22px clamp(80px, 19vw, 104px);
    background-position: center;
  }

  .celebration-logo {
    width: clamp(86px, 23vw, 112px);
    height: auto;
    margin-bottom: clamp(24px, 6vw, 30px);
  }

  .celebration-message {
    font-size: clamp(2.55rem, 13vw, 3.65rem);
    line-height: 1.02;
  }

  .celebration-cap {
    top: clamp(102px, 24.5vw, 146px);
    right: clamp(12px, 3.8vw, 38px);
    width: clamp(92px, 25vw, 144px);
    transform: rotate(10deg);
  }

  .rsvp {
    gap: 36px;
  }

  .rsvp-intro>p:not(.eyebrow) {
    margin-top: 20px;
  }

  .rsvp-help {
    padding-top: 24px;
  }

  .form-shell {
    width: 100%;
    min-width: 0;
    min-height: 830px;
    margin-inline: 0;
    border-radius: 20px;
  }

  .form-shell iframe {
    height: 830px;
  }

  footer {
    padding: 54px max(20px, env(safe-area-inset-right)) calc(54px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
}

@media (max-width: 400px) {
  .hero {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .hero-copy {
    padding-inline: 18px;
  }

  h1 span {
    font-size: clamp(4.5rem, 24.5vw, 5.5rem);
  }

  h1 strong {
    font-size: clamp(0.92rem, 3.8vw, 1rem);
    letter-spacing: 0.11em;
  }

  .section {
    padding-inline: 14px;
  }

  .event-card {
    padding: 28px 20px;
  }

  .celebration {
    padding-inline: 18px;
  }

  .celebration-message {
    font-size: clamp(2.35rem, 12.5vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal,
  .js .reveal-title {
    opacity: 1;
    transform: none;
    filter: none;
  }
}