:root {
  --grey: #d9ddd8;
  --olive: #565a2d;
  --mustard: #d1aa55;
  --terracotta: #b83f2a;
  --rose: #bba6a1;
  --white: #f7f4ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 18px;
  background: #cfd4d0;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--olive);
  background: #cfd4d0;
  font-family: "arpona", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

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

button {
  font: inherit;
}

.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  background: var(--grey);
  box-shadow: none;
}

.paper-grey,
.paper-mustard,
.paper-rose,
.paper-olive,
.paper-terracotta {
  position: relative;
  isolation: isolate;
  background-image: none;
}

.paper-grey { --texture-opacity: 0.1; background-color: var(--grey); }
.paper-mustard { --texture-opacity: 0.075; background-color: var(--mustard); }
.paper-rose { --texture-opacity: 0.07; background-color: var(--rose); }
.paper-olive { --texture-opacity: 0.075; background-color: var(--olive); }
.paper-terracotta { --texture-opacity: 0.07; background-color: var(--terracotta); }

.paper-grey::after,
.paper-mustard::after,
.paper-rose::after,
.paper-olive::after,
.paper-terracotta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  background-image: url("assets/rf-paper.webp");
  background-position: center top;
  background-size: max(1080px, 100vw) auto;
  background-repeat: repeat-y;
  opacity: var(--texture-opacity);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.sr-only {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.topbar {
  min-height: 132px;
  padding: 8px 80px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  position: relative;
  z-index: 20;
  background-color: var(--grey);
}

.topbar-mark {
  width: 400px;
  height: 160px;
  display: block;
  flex: 0 0 auto;
  position: absolute;
  top: 29px;
  left: -33px;
}

.topbar-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 1.8rem;
}

.topbar nav a {
  padding: 9px 0;
  white-space: nowrap;
  transition: opacity 160ms ease;
}

.topbar nav a:hover {
  opacity: 0.62;
}

.topbar nav .is-active {
  font-weight: 700;
}

/* Hero */
.hero {
  min-height: clamp(1020px, 128.9vw, 1392px);
  padding: 60px clamp(34px, 5vw, 54px) clamp(82px, 10vw, 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  isolation: isolate;
}

.hero-venue {
  width: 116%;
  max-width: none;
  margin: 28px -8% 0;
  display: block;
}

.hero-wordmark {
  width: 77%;
  margin: -135px auto 0;
  display: block;
  position: relative;
  z-index: 2;
}

.hero-details {
  width: 82%;
  margin-top: -36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  position: relative;
  z-index: 2;
  font-family: "adobe-handwriting-ernie", cursive;
  font-size: 2.5rem;
  line-height: 1.18;
}

.hero-details p {
  margin: 0;
}

.hero-details p:last-child {
  padding-top: 104px;
  text-align: right;
}

/* Countdown */
.countdown {
  min-height: 228px;
  padding: 28px 72px;
  display: grid;
  place-items: center;
}

.countdown-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}

.countdown-grid > div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-grid strong {
  color: var(--white);
  font-family: "arpona", Georgia, serif;
  font-size: 5.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.82;
}

.countdown-grid span {
  margin: 48px 0 0 -20px;
  color: var(--olive);
  font-family: "adobe-handwriting-ernie", cursive;
  font-size: 2.7rem;
  line-height: 0.8;
}

/* Floral welcome */
.welcome {
  min-height: 575px;
  padding: 70px 46px 60px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 3;
  isolation: isolate;
  overflow: visible;
}

.welcome > img:first-child {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  object-position: center;
}

.welcome-frame {
  width: min(84%, 1120px);
  min-height: 330px;
  padding: 58px 70px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 30;
  background: var(--rose);
  border: 2px solid var(--terracotta);
  border-radius: 42px;
  box-shadow: none;
  text-align: center;
}

.welcome-frame h1 {
  margin: 0;
  color: var(--terracotta);
  font-family: "arpona", Georgia, serif;
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 1.32;
}

.welcome-frame strong {
  font-weight: 700;
}

.welcome-seal {
  width: 250px;
  position: absolute;
  right: 52px;
  bottom: -135px;
  z-index: 40;
  filter: none;
}

/* Photo story */
.photo-story {
  min-height: 880px;
  padding: 110px 48px 90px;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.photo-stack {
  width: 100%;
  min-height: 680px;
  position: relative;
  z-index: 30;
}

.photo {
  width: 60%;
  aspect-ratio: 1.28 / 1;
  margin: 0;
  position: absolute;
  overflow: hidden;
  background: var(--white);
  border: 6px solid var(--white);
  box-shadow: none;
}

.photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 58%;
}

.photo-left {
  top: 0;
  left: 58px;
}

.photo-right {
  right: 38px;
  bottom: 0;
}

.photo-badge {
  width: 205px;
  position: absolute;
  left: 60px;
  bottom: -98px;
  z-index: 40;
  filter: none;
}

/* RSVP */
.rsvp-block {
  min-height: 680px;
  padding: 125px 42px 95px;
  z-index: 1;
  text-align: center;
}

.rsvp-card {
  width: min(78%, 920px);
  min-height: 460px;
  margin: 0 auto;
  padding: 68px 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 30;
  color: var(--olive);
  background: transparent;
  border-top: 1px solid rgba(86, 90, 45, 0.55);
  border-bottom: 1px solid rgba(86, 90, 45, 0.55);
  border-radius: 0;
  box-shadow: none;
}

.section-kicker {
  margin-bottom: 26px;
  display: block;
  color: var(--terracotta);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.rsvp-block h2,
.dresscode h2,
.gift-block h2 {
  margin: 0;
  font-family: "arpona", Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.08;
}

.rsvp-block p {
  margin: 42px 0 48px;
  font-size: 2.15rem;
  line-height: 1.3;
}

.rsvp-block a,
.gift-block button {
  min-width: 380px;
  min-height: 68px;
  padding: 18px 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.rsvp-block a:hover,
.gift-block button:hover {
  filter: brightness(1.05);
  transform: translateY(-3px);
}

/* Dress code */
.dresscode {
  min-height: 720px;
  padding: 88px 42px 100px;
  text-align: center;
}

.dresscode-card {
  width: min(84%, 1120px);
  min-height: 530px;
  margin: 0 auto;
  padding: 58px 30px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 30;
  color: var(--olive);
  background: transparent;
  border-top: 1px solid rgba(86, 90, 45, 0.55);
  border-bottom: 1px solid rgba(86, 90, 45, 0.55);
  border-radius: 0;
  box-shadow: none;
}

.dresscode-copy {
  text-align: left;
}

.dresscode-copy .section-kicker {
  color: var(--terracotta);
}

.dresscode h2 {
  color: var(--terracotta);
}

.dresscode p {
  margin: 42px 0 0;
  font-family: "arpona", Georgia, serif;
  font-size: 1.95rem;
  line-height: 1.4;
}

.dresscode p strong {
  color: var(--terracotta);
  font-weight: 700;
}

.dress-palette {
  width: 100%;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.dress-palette span {
  aspect-ratio: 1;
  display: block;
  background: var(--swatch);
  border: 1px solid rgba(86, 90, 45, 0.22);
  border-radius: 50%;
  box-shadow: none;
}

/* Gifts */
.gift-block {
  min-height: 700px;
  padding: 95px 42px 110px;
  text-align: center;
}

.gift-card {
  width: min(76%, 820px);
  min-height: 500px;
  margin: 0 auto;
  padding: 80px 54px 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 30;
  color: var(--olive);
  background: transparent;
  border-top: 1px solid rgba(86, 90, 45, 0.55);
  border-bottom: 1px solid rgba(86, 90, 45, 0.55);
  border-radius: 0;
  box-shadow: none;
}

.gift-block p {
  margin: 40px 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(86, 90, 45, 0.75);
  font-size: 2.7rem;
  line-height: 1.1;
}

.gift-block p span {
  font-family: "arpona", Georgia, serif;
}

.gift-block button {
  margin-top: 46px;
  color: var(--white);
  background: var(--olive);
  border-color: var(--olive);
}

.gift-block small {
  min-height: 1.5em;
  margin-top: 28px;
  font-size: 1rem;
}

.topbar a:focus-visible,
.rsvp-block a:focus-visible,
.gift-block button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 5px;
}

.topbar a:focus-visible {
  outline-color: var(--terracotta);
}

/* Footer */
.site-footer {
  min-height: 130px;
  padding: 28px clamp(24px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 30;
  color: var(--white);
  background: var(--olive);
  text-align: center;
}

.site-footer strong {
  font-family: "adobe-handwriting-ernie", cursive;
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 0.8;
}

.site-footer span {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer span:first-child {
  text-align: left;
}

.site-footer span:last-child {
  text-align: right;
}

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

@media (min-width: 961px) {
  .hero-venue {
    width: min(116%, 1440px);
    margin-right: auto;
    margin-left: auto;
  }

  .hero-wordmark {
    width: min(77%, 900px);
  }

  .hero-details {
    width: min(82%, 1000px);
  }

  .countdown-grid {
    width: min(92%, 1200px);
    max-width: none;
    margin-right: auto;
    margin-left: auto;
  }

  .welcome > img:first-child {
    width: 100%;
    height: 100%;
    inset: 0;
  }

  .welcome-frame {
    width: min(84%, 1120px);
  }

  .welcome-seal {
    right: calc((100vw - min(84vw, 1120px)) / 2 + 18px);
  }

  .photo-stack {
    width: min(92%, 1100px);
    max-width: none;
    margin-right: auto;
    margin-left: auto;
  }

  .photo-badge {
    left: calc((100vw - min(92vw, 1100px)) / 2 + 12px);
  }

  .dress-palette {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .hero-wordmark {
    margin-top: -240px;
  }

  .countdown-grid strong {
    font-size: 6.1rem;
  }

  .countdown-grid span {
    font-size: 3.05rem;
  }

  .welcome-frame h1 {
    font-size: 3.1rem;
  }

  .rsvp-block h2,
  .dresscode h2,
  .gift-block h2 {
    font-size: 4.5rem;
  }

  .rsvp-block p {
    font-size: 2.35rem;
  }

  .rsvp-block a,
  .gift-block button {
    font-size: 2rem;
  }

  .dresscode p {
    font-size: 2.25rem;
  }

  .gift-block p {
    font-size: 2.9rem;
  }
}

@media (min-width: 761px) and (max-width: 960px) {
  .topbar {
    min-height: 96px;
    padding: 6px 28px;
    justify-content: space-between;
    gap: 24px;
  }

  .topbar-mark {
    width: 122px;
    height: 78px;
    position: static;
  }

  .topbar nav {
    gap: 15px;
    font-size: 1rem;
  }

  .hero {
    min-height: 1040px;
    padding-right: 34px;
    padding-left: 34px;
  }

  .hero-wordmark {
    width: 82%;
    margin-top: -96px;
  }

  .hero-details {
    width: 86%;
    margin-top: -18px;
    gap: 42px;
    font-size: clamp(2rem, 4.2vw, 2.55rem);
  }

  .hero-details p:last-child {
    padding-top: 74px;
  }

  .countdown {
    padding-right: 42px;
    padding-left: 42px;
  }

  .countdown-grid {
    gap: 22px;
  }

  .countdown-grid strong {
    font-size: clamp(4rem, 8.4vw, 5.4rem);
  }

  .countdown-grid span {
    margin-top: 36px;
    font-size: clamp(2rem, 4.2vw, 2.8rem);
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 124px;
    padding: 4px 12px 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topbar-mark {
    width: 82px;
    height: 58px;
    margin: 14px 0 -14px;
    justify-self: center;
    position: static;
  }

  .topbar nav {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    overflow: visible;
    font-size: 0.72rem;
  }

  .topbar nav a {
    min-height: 44px;
    padding: 10px 2px;
    display: grid;
    place-items: center;
    text-align: center;
  }

  .hero {
    min-height: 690px;
    padding: 34px 12px 54px;
  }

  .hero-venue {
    width: 138%;
    margin: 40px -19% 0;
  }

  .hero-wordmark {
    width: 96%;
    margin-top: -52px;
  }

  .hero-details {
    width: 92%;
    margin-top: -10px;
    gap: 18px;
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }

  .hero-details p:last-child {
    padding-top: 54px;
  }

  .countdown {
    min-height: 168px;
    padding: 28px 14px;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .countdown-grid > div {
    flex-direction: column;
    gap: 0;
  }

  .countdown-grid strong {
    font-size: clamp(2.2rem, 11.5vw, 3.25rem);
    line-height: 0.9;
  }

  .countdown-grid span {
    margin: -5px 0 0;
    font-size: clamp(1.05rem, 5.1vw, 1.45rem);
    line-height: 1;
  }

  .welcome {
    min-height: 530px;
    padding: 58px 18px;
  }

  .welcome-frame {
    width: 100%;
    min-height: 330px;
    padding: 44px 24px;
    border-width: 2px;
    border-radius: 24px;
  }

  .welcome-frame h1 {
    font-size: clamp(1.45rem, 7vw, 2.1rem);
  }

  .welcome-seal {
    width: 150px;
    right: 20px;
    bottom: -82px;
  }

  .photo-story {
    min-height: 750px;
    padding: 125px 14px 95px;
  }

  .photo-stack {
    min-height: 545px;
  }

  .photo {
    width: 72%;
    aspect-ratio: 1.14 / 1;
    border-width: 7px;
  }

  .photo-left { left: 12px; }
  .photo-right { right: 8px; }

  .photo-badge {
    width: 145px;
    left: 18px;
    bottom: -74px;
  }

  .rsvp-block {
    min-height: auto;
    padding: 105px 14px 74px;
  }

  .rsvp-card {
    width: 100%;
    min-height: 500px;
    padding: 72px 22px 64px;
    border-radius: 0;
  }

  .rsvp-block h2,
  .dresscode h2,
  .gift-block h2 {
    font-size: clamp(2.5rem, 11vw, 3.6rem);
  }

  .rsvp-block p {
    margin: 36px 0 42px;
    font-size: clamp(1.65rem, 7.5vw, 2.4rem);
  }

  .rsvp-block a,
  .gift-block button {
    min-width: min(100%, 340px);
    min-height: 64px;
    padding: 22px 28px;
    font-size: 1.25rem;
  }

  .dresscode {
    min-height: auto;
    padding: 30px 14px 70px;
  }

  .dresscode-card {
    width: 100%;
    min-height: 650px;
    padding: 68px 20px 58px;
    grid-template-columns: 1fr;
    gap: 44px;
    border-radius: 0;
  }

  .dresscode-copy {
    text-align: center;
  }

  .dresscode p {
    margin: 32px 0 0;
    font-size: clamp(1.35rem, 6.6vw, 2rem);
  }

  .dress-palette {
    width: 100%;
    padding: 16px;
    gap: 8px;
    border-radius: 0;
  }

  .gift-block {
    min-height: auto;
    padding: 30px 14px 74px;
  }

  .gift-card {
    width: 100%;
    min-height: 540px;
    padding: 90px 22px 56px;
    border-radius: 0;
  }

  .gift-block p {
    margin-top: 38px;
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .gift-block button {
    margin-top: 44px;
  }

  .site-footer {
    min-height: 190px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-footer span:first-child,
  .site-footer span:last-child {
    text-align: center;
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-right: 8px;
    padding-left: 8px;
  }

  .topbar nav {
    gap: 1px;
    font-size: 0.66rem;
  }

  .hero-details {
    width: 94%;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 10px;
    font-size: clamp(1.15rem, 5.7vw, 1.45rem);
  }

  .hero-details p:last-child {
    padding-top: 48px;
  }

  .welcome-frame {
    padding-right: 18px;
    padding-left: 18px;
    border-radius: 20px;
  }

}
