:root {
  --navy: #1d4e59;
  --navy-dark: #123b46;
  --blue: #2d6795;
  --sky: #a9d6eb;
  --aqua: #77c5ca;
  --sand: #eadbc8;
  --cream: #f8f2e9;
  --paper: #fffdf9;
  --coral: #e8755d;
  --coral-dark: #c95e49;
  --gold: #c8a969;
  --lemon: #f1c94d;
  --olive: #63734a;
  --ink: #243f42;
  --muted: #647476;
  --line: rgba(29, 78, 89, 0.14);
  --header-height: 72px;
  --display: "Playfair Display SC", "Playfair Display", Georgia, serif;
  --display-italic: "Playfair Display", Georgia, serif;
  --script: "Explora", cursive;
  --body: "Lato", system-ui, sans-serif;
  --shadow-sm: 0 5px 18px rgba(21, 67, 75, 0.1);
  --shadow-md: 0 18px 44px rgba(21, 67, 75, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 20%, rgba(241, 201, 77, 0.05), transparent 32%),
    var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  color: white;
  background: var(--navy);
  border-radius: 4px;
  transform: translateY(-150%);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 25px;
  border: 0;
  border-radius: 5px;
  color: white;
  font: 700 0.9rem/1 var(--body);
  letter-spacing: 0.025em;
  box-shadow: 0 5px 14px rgba(29, 78, 89, 0.12);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(29, 78, 89, 0.2);
}

.button--navy {
  background: var(--navy);
}

.button--navy:hover,
.button--navy:focus-visible {
  background: var(--navy-dark);
}

.button--blue {
  background: var(--blue);
}

.button--blue:hover,
.button--blue:focus-visible {
  background: var(--navy);
}

.button--coral {
  background: var(--coral);
}

.button--coral:hover,
.button--coral:focus-visible {
  background: var(--coral-dark);
}

.button--pending,
.button--pending:hover,
.button--pending:focus-visible {
  color: rgba(255, 255, 255, 0.9);
  background: #89999a;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  background: var(--paper);
  border-bottom: 1px solid rgba(29, 78, 89, 0.09);
  transition: box-shadow 180ms ease;
}

.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: grid;
  place-items: center;
  width: 76px;
  height: 58px;
}

.nav__brand img {
  width: 66px;
  height: auto;
  object-fit: contain;
}

.nav__toggle {
  position: relative;
  z-index: 120;
  display: grid;
  align-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
}

.nav__toggle span {
  width: 25px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 4px;
  transition: transform 220ms ease, opacity 160ms ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu-panel {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 110;
  width: 100%;
  max-width: 100%;
  height: calc(100dvh - var(--header-height));
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 253, 249, 0.97), rgba(248, 242, 233, 0.99)),
    var(--paper);
  box-shadow: inset 0 1px 0 white;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 220ms ease, visibility 220ms;
}

.nav__menu-panel--open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__menu-decor {
  position: absolute;
  right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 0;
  width: min(38vw, 168px);
  height: auto;
  max-height: 42%;
  object-fit: contain;
  object-position: bottom right;
  transform: scale(-1, -1);
  pointer-events: none;
  opacity: 0.88;
}

.nav__menu {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 32px 24px max(40px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  background: transparent;
}

.nav__link {
  position: relative;
  z-index: 1;
  display: block;
  min-width: min(320px, 80vw);
  padding: 12px 20px;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(1.25rem, 5vw, 1.55rem);
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.nav__link--rsvp {
  margin-top: 12px;
  color: white;
  background: var(--navy);
  border: 0;
  border-radius: 5px;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  min-height: min(820px, 88svh);
  margin-top: var(--header-height);
  overflow: hidden;
  place-items: center;
}

.hero__picture,
.hero__picture img,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__picture img {
  object-fit: cover;
  object-position: center;
}

.hero__veil {
  background:
    radial-gradient(ellipse at center, rgba(255, 253, 249, 0.84) 0%, rgba(255, 253, 249, 0.48) 28%, rgba(29, 78, 89, 0.06) 64%),
    linear-gradient(to bottom, rgba(255, 253, 249, 0.08), rgba(29, 78, 89, 0.22));
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 72px 16px 52px;
  text-align: center;
}

.hero__eyebrow {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  color: var(--navy);
  font-family: var(--script);
  font-size: clamp(3.5rem, 9.5vw, 7rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(255, 253, 249, 0.8);
}

.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(270px, 72vw);
  margin: 9px auto 5px;
}

.hero__rule::before,
.hero__rule::after {
  flex: 1;
  height: 1px;
  background: var(--navy);
  content: "";
  opacity: 0.42;
}

.hero__rule span {
  width: 6px;
  height: 6px;
  margin-inline: 11px;
  background: var(--gold);
  border-radius: 50%;
}

.hero__date {
  margin: 0 0 22px;
  color: var(--navy);
  font-family: var(--display-italic);
  font-size: 1rem;
  font-style: italic;
}

/* Main cards */
.quick-links {
  position: relative;
  z-index: 3;
  padding: 0 0 48px;
}

.quick-links__grid {
  display: grid;
  gap: 18px;
  margin-top: -28px;
}

.feature-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid rgba(29, 78, 89, 0.08);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.feature-card__header {
  display: grid;
  min-height: 56px;
  padding: 10px 16px;
  place-items: center;
}

.feature-card__header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.feature-card--story .feature-card__header {
  color: white;
  background: var(--aqua);
}

.feature-card--gifts .feature-card__header {
  color: var(--navy);
  background: linear-gradient(135deg, #f9db83, #f5c75e);
}

.feature-card--dresscode .feature-card__header {
  color: white;
  background: var(--coral);
}

.feature-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.feature-card__body--centered {
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.feature-card__body p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.93rem;
}

.feature-card__body strong {
  color: var(--ink);
}

.feature-card__icon {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 1px auto 16px;
  place-items: center;
  transform-origin: center;
}

.couple-icon__image {
  display: block;
  width: 84px;
  height: auto;
}

.gift-icon svg {
  width: 84px;
}

.dresscode-icon svg {
  width: 76px;
}

.location-icon svg {
  width: 68px;
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card__icon,
  .event-info__icon {
    transform: scale(0.92);
    transition: transform 400ms ease-out;
  }

  .feature-card__icon.is-visible,
  .event-info__icon.is-visible {
    transform: scale(1);
  }

  @media (hover: hover) {
    .feature-card:hover .feature-card__icon.is-visible {
      transform: scale(1.06);
      transition-duration: 200ms;
    }

    .event-info__panel:hover .event-info__icon.is-visible {
      transform: scale(1.06);
      transition-duration: 200ms;
    }
  }
}

/* Event info */
.event-info {
  padding: 0 0 48px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.event-info__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 36px;
  text-align: center;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid rgba(29, 78, 89, 0.08);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

.event-info__title {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.event-info__icon {
  display: grid;
  width: 88px;
  height: 88px;
  margin: 4px auto 12px;
  place-items: center;
  transform-origin: center;
}

.event-info__details {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.93rem;
}

.event-info__details strong {
  color: var(--ink);
}

/* RSVP */
.rsvp {
  padding: 0 0 56px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.rsvp__panel {
  position: relative;
  display: grid;
  min-height: 235px;
  overflow: hidden;
  border: 1px solid rgba(200, 169, 105, 0.24);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  place-items: center;
}

.rsvp__texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rsvp__content {
  position: relative;
  z-index: 1;
  padding: 28px 18px;
  text-align: center;
}

.rsvp__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.rsvp__heading span {
  width: clamp(42px, 10vw, 120px);
  height: 1px;
  background: var(--gold);
}

.rsvp h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(1.65rem, 6vw, 2.2rem);
  letter-spacing: 0.07em;
}

.rsvp p {
  margin: 0 0 18px;
  color: var(--navy);
  font-family: var(--display-italic);
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 500;
}

/* Footer */
.footer {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 50px 0 35px;
  color: var(--cream);
  background: var(--navy);
  text-align: center;
}

.footer::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(29, 78, 89, 0.94), rgba(18, 59, 70, 0.98)),
    url("/public/images/sections/rsvp-watercolor.webp") center/cover;
  content: "";
}

.footer__content {
  position: relative;
  z-index: 2;
}

.footer__monogram {
  width: 100px;
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer p {
  margin: 4px 0;
}

.footer__hashtag {
  color: var(--lemon);
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.footer small {
  display: block;
  margin-top: 13px;
  opacity: 0.55;
}

@media (min-width: 680px) {
  .quick-links__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card--dresscode {
    grid-column: 1 / -1;
    width: calc(50% - 9px);
    justify-self: center;
  }
}

@media (min-width: 800px) {
  .site-header {
    background: rgba(255, 253, 249, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .nav__brand {
    width: 84px;
  }

  .nav__toggle {
    display: none;
  }

  .nav__menu-panel {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav__menu-decor {
    display: none;
  }

  .nav__menu {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 28px;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
  }

  .nav__link {
    min-width: 0;
    padding: 9px 0;
    font-family: var(--body);
    font-size: 0.88rem;
    font-weight: 700;
    border: 0;
    transition: color 180ms ease;
  }

  .nav__link:hover,
  .nav__link:focus-visible {
    color: var(--coral);
  }

  .nav__link--rsvp {
    margin: 0;
    padding: 9px 18px;
    color: white;
    border-radius: 4px;
  }

  .nav__link--rsvp:hover,
  .nav__link--rsvp:focus-visible {
    color: white;
    background: var(--coral);
  }

  .hero {
    min-height: clamp(560px, 63vw, 760px);
  }

  .hero__content {
    padding-top: 54px;
  }

  .quick-links__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: -52px;
  }

  .feature-card--dresscode {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }

  .rsvp__panel {
    min-height: 215px;
  }
}

@media (min-width: 1100px) {
  .hero__veil {
    background:
      radial-gradient(ellipse at center, rgba(255, 253, 249, 0.9) 0%, rgba(255, 253, 249, 0.42) 27%, rgba(29, 78, 89, 0.02) 58%),
      linear-gradient(to bottom, rgba(255, 253, 249, 0.04), rgba(29, 78, 89, 0.16));
  }

  .feature-card__body {
    padding: 24px 26px;
  }
}

.gate-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.gate {
  width: min(420px, 100%);
}

.gate__panel {
  padding: 36px 28px 32px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.gate__monogram {
  width: min(120px, 42vw);
  margin: 0 auto 18px;
}

.gate__eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gate__title {
  margin: 0 0 10px;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
}

.gate__lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.98rem;
}

.gate__error {
  margin: 0 0 16px;
  padding: 10px 12px;
  color: #8f2f2f;
  background: rgba(232, 117, 93, 0.12);
  border: 1px solid rgba(201, 94, 73, 0.35);
  border-radius: 8px;
  font-size: 0.92rem;
}

.gate__form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.gate__label {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.gate__input {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.gate__input:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.gate__submit {
  width: 100%;
  margin-top: 4px;
}

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

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