:root {
  color-scheme: light;
  --paper: #fff8ee;
  --paper-soft: #f6ecdf;
  --ink: #2b211d;
  --ink-soft: #67584f;
  --muted: #8a766a;
  --white: #ffffff;
  --vermilion: #bf3a2a;
  --vermilion-deep: #7c241d;
  --rose: #f3c7bd;
  --sage: #76886a;
  --sage-deep: #354a38;
  --gold: #c79a5b;
  --shadow: 0 24px 70px rgba(52, 32, 23, 0.16);
  --shadow-soft: 0 18px 45px rgba(52, 32, 23, 0.10);
  --radius-lg: 2rem;
  --radius-md: 1.25rem;
  --radius-sm: 0.8rem;
  --container: 1120px;
  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(191, 58, 42, 0.10), transparent 32rem),
    linear-gradient(180deg, var(--paper) 0%, #fffdf8 48%, var(--paper) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

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

:focus-visible {
  outline: 3px solid rgba(191, 58, 42, 0.45);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  padding: 0.7rem 1rem;
  font-weight: 700;
  transition: transform 180ms ease;
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, rgba(31, 20, 16, 0.60), rgba(31, 20, 16, 0));
  color: var(--white);
  transition: background 240ms ease, box-shadow 240ms ease, backdrop-filter 240ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 248, 238, 0.88);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(52, 32, 23, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.85rem;
  height: 2.85rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.10);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled .site-nav a {
  border-color: rgba(43, 33, 29, 0.12);
  background: rgba(255, 255, 255, 0.52);
}

.site-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.20);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  padding: 6.5rem 1rem 1.35rem;
  color: var(--white);
  overflow: hidden;
}

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

.hero__media {
  z-index: -3;
}

.hero__media img {
  object-fit: cover;
  object-position: center 58%;
  filter: saturate(1.03) contrast(1.02);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(25, 18, 15, 0.22) 0%, rgba(25, 18, 15, 0.38) 40%, rgba(18, 12, 9, 0.88) 100%),
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.05), transparent 30rem);
}

.hero::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(99, 24, 16, 0.40), transparent 55%);
  mix-blend-mode: multiply;
}

.hero__content {
  width: min(100%, 42rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: clamp(1.35rem, 5vw, 2.25rem);
  background: linear-gradient(145deg, rgba(50, 31, 25, 0.64), rgba(50, 31, 25, 0.34));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  padding: clamp(1.35rem, 5vw, 3rem);
  text-align: center;
  backdrop-filter: blur(18px);
}

.hero__eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero__names {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 8vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
}

.hero h1,
.section-heading h2,
.letter h2,
.details h2,
.rsvp h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero h1 {
  margin-top: 0.25rem;
  font-size: clamp(4rem, 21vw, 9rem);
}

.hero__text {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 3.2vw, 1.15rem);
}

.hero__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero__actions {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero__actions .btn {
  width: fit-content;
  min-width: 12rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.btn--primary {
  background: var(--vermilion);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(191, 58, 42, 0.28);
}

.btn--primary:hover {
  background: var(--vermilion-deep);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn--wide {
  width: 100%;
  margin-top: 0.35rem;
}

.intro {
  padding-block: 2.7rem;
  background: var(--ink);
  color: var(--white);
}

.intro__grid {
  display: grid;
  gap: 1.25rem;
}

.intro__stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
}

.intro__stat span {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
}

.intro__stat strong {
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 8vw, 3rem);
  line-height: 1;
}

.intro__copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.story {
  background:
    radial-gradient(circle at 100% 0%, rgba(118, 136, 106, 0.18), transparent 28rem),
    var(--paper);
}

.story__shell {
  display: grid;
  gap: 1.5rem;
}

.story__intro {
  margin-bottom: 0.25rem;
}

.storyline {
  display: grid;
  gap: 1rem;
}

.story-chapter,
.letter,
.rsvp__card,
.detail-card,
.timeline__item {
  border: 1px solid rgba(43, 33, 29, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.story-chapter {
  position: relative;
  display: grid;
  gap: 1rem;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 0.25rem);
  padding: 1rem;
}

.story-chapter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  background: linear-gradient(180deg, var(--vermilion), var(--gold));
}

.story-chapter__media {
  display: grid;
  overflow: hidden;
  border-radius: calc(var(--radius-md) + 0.1rem);
  background: var(--paper-soft);
}

.story-chapter__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.story-chapter__media figcaption {
  padding: 0.85rem 0.9rem 0.95rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.story-carousel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper-soft);
}

.story-carousel__track {
  position: relative;
  min-height: 15rem;
  aspect-ratio: 4 / 3;
}

.story-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 900ms ease, transform 1800ms ease;
}

.story-carousel__slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.story-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  max-width: calc(100% - 1.6rem);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  padding: 0.35rem 0.45rem;
  background: rgba(31, 20, 16, 0.34);
  backdrop-filter: blur(14px);
}

.story-carousel__dot {
  width: 0.56rem;
  height: 0.56rem;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, width 180ms ease;
}

.story-carousel__dot.is-active {
  width: 1.35rem;
  border-radius: 999px;
  background: var(--white);
}

.story-carousel__dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

.story-carousel__dot:hover {
  transform: scale(1.12);
}

.story-chapter__content {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding-inline: 0.2rem;
}

.story-chapter__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 2.15rem;
  border: 1px solid rgba(191, 58, 42, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: rgba(191, 58, 42, 0.08);
  color: var(--vermilion);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-chapter h3,
.letter h2,
.details h2,
.rsvp h2,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-title);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.story-chapter h3 {
  font-size: clamp(2rem, 8vw, 3.2rem);
}

.letter {
  align-self: center;
  border-radius: var(--radius-lg);
  padding: clamp(1.35rem, 6vw, 3rem);
}

.letter h2,
.details h2,
.rsvp h2,
.section-heading h2 {
  font-size: clamp(2.6rem, 13vw, 5.2rem);
}

.story-chapter p,
.letter p,
.details__content > p,
.section-heading p,
.rsvp p {
  color: var(--ink-soft);
}

.story-chapter p,
.letter p {
  margin: 0;
}

.story__note {
  max-width: 52rem;
}

.story__note-copy {
  max-width: 42rem;
}

.letter p + p {
  margin-top: 1rem;
}

.letter__signature {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--vermilion) !important;
}

.section-heading {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.section-heading p:last-child {
  margin: 1rem auto 0;
  max-width: 38rem;
}

.countdown-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(27, 18, 14, 0.58), rgba(27, 18, 14, 0.78)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 20rem),
    url("../assets/img/gallery-bay.jpg") center 48% / cover no-repeat;
  color: var(--white);
}

.countdown-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(124, 36, 29, 0.34), transparent 55%),
    radial-gradient(circle at 50% 35%, rgba(199, 154, 91, 0.18), transparent 28rem);
  mix-blend-mode: multiply;
}

.countdown-section > .container {
  position: relative;
  z-index: 1;
}

.countdown-section .section-kicker,
.countdown-section .section-heading p {
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.countdown-section .section-heading h2 {
  color: var(--white);
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.46);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.countdown__item {
  display: grid;
  place-items: center;
  min-height: 8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(23, 16, 13, 0.42);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.countdown__item span {
  font-family: var(--font-title);
  font-size: clamp(3rem, 15vw, 6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.countdown__item small {
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.details {
  background:
    radial-gradient(circle at 0% 100%, rgba(199, 154, 91, 0.14), transparent 24rem),
    linear-gradient(180deg, #fffdf8, var(--paper-soft));
}

.details__grid {
  display: grid;
  gap: 1.4rem;
}

.details__content {
  display: grid;
  gap: 1rem;
}

.details h2 {
  max-width: 12ch;
}

.details__content > p {
  margin: 0;
}

.details__events {
  display: grid;
  gap: 1rem;
}

.detail-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 1rem;
}

.detail-card--soft {
  background: rgba(255, 255, 255, 0.62);
}

.detail-card__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(191, 58, 42, 0.10);
  color: var(--vermilion);
  font-size: 1.25rem;
}

.detail-card h3,
.event-card h3,
.timeline__item h3,
.map-card h3 {
  margin: 0;
  font-family: var(--font-title);
  line-height: 1.1;
}

.detail-card h3,
.timeline__item h3,
.map-card h3 {
  font-size: 1.55rem;
}

.detail-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

.event-card {
  --event-accent: var(--vermilion);
  --event-tint: rgba(191, 58, 42, 0.10);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(43, 33, 29, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.90), rgba(246, 236, 223, 0.80));
  box-shadow: var(--shadow-soft);
  padding: clamp(1.15rem, 5vw, 1.55rem);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  background: linear-gradient(180deg, var(--event-accent), var(--gold));
}

.event-card::after {
  content: "";
  position: absolute;
  right: -3.5rem;
  top: -3.5rem;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: var(--event-tint);
  pointer-events: none;
}

.event-card--ceremony {
  --event-accent: var(--vermilion);
  --event-tint: rgba(191, 58, 42, 0.12);
}

.event-card--reception {
  --event-accent: var(--sage-deep);
  --event-tint: rgba(118, 136, 106, 0.18);
}

.event-card__topline,
.event-card h3,
.event-card__details,
.event-card .btn {
  position: relative;
  z-index: 1;
}

.event-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.event-card__eyebrow {
  color: var(--event-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.event-card__badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--event-tint);
  color: var(--event-accent);
  font-size: 1rem;
}

.event-card h3 {
  max-width: 11ch;
  color: var(--ink);
  font-size: clamp(2.2rem, 10vw, 3.35rem);
  letter-spacing: -0.04em;
}

.event-card__details {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0 1.35rem;
}

.event-card__details div {
  display: grid;
  gap: 0.15rem;
  border-top: 1px solid rgba(43, 33, 29, 0.10);
  padding-top: 0.75rem;
}

.event-card__details dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.event-card__details dd {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.45;
}

.event-card .btn {
  margin-top: auto;
  font-size: 0.78rem;
}

.event-card--reception .btn--primary {
  background: var(--sage-deep);
  box-shadow: 0 14px 30px rgba(53, 74, 56, 0.24);
}

.event-card--reception .btn--primary:hover {
  background: #25372a;
}

.map-card {
  position: relative;
  overflow: hidden;
  min-height: 28rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(53, 74, 56, 0.92), rgba(29, 43, 32, 0.88)),
    url("../assets/img/gallery-bay.jpg") center / cover;
  color: var(--white);
  box-shadow: var(--shadow);
}

.map-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% -20%;
  height: 16rem;
  background: radial-gradient(ellipse at center, rgba(199, 154, 91, 0.34), transparent 70%);
}

.map-card__visual {
  position: absolute;
  inset: 0;
  opacity: 0.88;
}

.map-card__pin {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 2.2rem;
  height: 2.2rem;
  border: 0.55rem solid var(--vermilion);
  border-radius: 50% 50% 50% 0;
  background: var(--white);
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

.map-card__line {
  position: absolute;
  width: 70%;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(-12deg);
}

.map-card__line--one {
  top: 26%;
  left: -8%;
}

.map-card__line--two {
  top: 52%;
  right: -12%;
  transform: rotate(18deg);
}

.map-card__line--three {
  top: 70%;
  left: 8%;
  transform: rotate(-22deg);
}

.map-card__body {
  position: absolute;
  inset: auto 1.1rem 1.1rem 1.1rem;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(23, 26, 21, 0.54);
  padding: 1.1rem;
  backdrop-filter: blur(18px);
}

.map-card__body p {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.map-card__body span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.74);
}

.timeline {
  background: var(--paper);
}

.timeline__list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.timeline__item {
  position: relative;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow: hidden;
}

.timeline__item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  background: var(--vermilion);
}

.timeline__item time {
  color: var(--vermilion);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.timeline__item p {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

.gallery {
  background:
    radial-gradient(circle at 0% 0%, rgba(199, 154, 91, 0.16), transparent 24rem),
    #fffdf8;
}

.gallery__grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  min-height: 16rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  background: var(--paper-soft);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 700ms ease, filter 700ms ease;
}

.gallery__item:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.03);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(19, 13, 10, 0.68));
  opacity: 0.9;
}

.gallery__item figcaption {
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 1;
  color: var(--white);
  font-family: var(--font-title);
  font-size: 1.55rem;
  font-weight: 700;
}

.rsvp {
  background:
    linear-gradient(rgba(43, 33, 29, 0.46), rgba(43, 33, 29, 0.72)),
    url("../assets/img/gallery-garden.jpg") center / cover;
  color: var(--white);
}

.rsvp__card {
  max-width: 43rem;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(43, 33, 29, 0.70);
  padding: clamp(1.35rem, 6vw, 3rem);
  text-align: center;
  backdrop-filter: blur(18px);
}

.rsvp .section-kicker,
.rsvp p {
  color: rgba(255, 255, 255, 0.74);
}

.rsvp .btn {
  margin-top: 0.8rem;
}

.site-footer {
  display: grid;
  gap: 0.25rem;
  padding: 2rem 1rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.site-footer p,
.site-footer small {
  margin: 0;
}

.site-footer p {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--white);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 680ms ease, transform 680ms ease;
}

.reveal.in-view {
  opacity: 0.75;
  transform: translateY(0);
}


@media (min-width: 520px) {
  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .story-chapter {
    padding: 1.1rem;
  }

  .story-carousel__track {
    min-height: 17rem;
  }
}

@media (min-width: 760px) {
  .story-chapter__content p,
  .story__note-copy {
    text-align: justify;
    text-wrap: pretty;
  }
  .hero__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }

  .hero__actions .btn {
    width: auto;
    min-width: 0;
  }
  
  .site-header {
    padding: 1rem clamp(1.25rem, 3vw, 2rem);
  }

  .site-nav {
    gap: 0.45rem;
  }

  .site-nav a {
    padding-inline: 1rem;
  }

  .hero {
    place-items: center start;
    padding: 7rem clamp(1.25rem, 6vw, 5rem) 4rem;
  }

  .hero__media img {
    object-position: center 50%;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(18, 12, 9, 0.88) 0%, rgba(18, 12, 9, 0.56) 38%, rgba(18, 12, 9, 0.24) 100%),
      linear-gradient(180deg, rgba(18, 12, 9, 0.20), rgba(18, 12, 9, 0.40));
  }

  .hero__content {
    text-align: left;
  }

  .hero__text {
    margin-left: 0;
  }

  .intro__grid,
  .details__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }

  .intro__grid {
    grid-template-columns: 0.85fr 1.15fr;
  }

  .storyline {
    gap: 1.35rem;
  }

  .story-chapter {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: 1.35rem;
    padding: 1.2rem;
  }

  .story-chapter:nth-child(even) .story-chapter__media {
    order: 2;
  }

  .story-chapter:nth-child(even) .story-chapter__content {
    order: 1;
  }

  .story-chapter__media {
    grid-template-rows: minmax(18rem, 1fr) auto;
    height: 100%;
  }

  .story-carousel,
  .story-carousel__track {
    height: 100%;
  }

  .story-carousel__track {
    min-height: 18rem;
    aspect-ratio: auto;
  }

  .story-chapter__media img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 100%;
  }

  .details__grid {
    grid-template-columns: minmax(0, 0.78fr) minmax(22rem, 1.22fr);
    gap: clamp(2rem, 6vw, 4rem);
  }

  .timeline__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 15rem;
  }

  .gallery__item {
    min-height: auto;
    grid-column: span 3;
  }

  .gallery__item--wide {
    grid-column: span 6;
  }

  .gallery__item--tall {
    grid-row: span 2;
  }
}

@media (min-width: 1020px) {
  .story__shell {
    gap: 2rem;
  }

  .story-chapter {
    gap: 1.6rem;
    padding: 1.35rem;
  }

  .story-chapter__content {
    padding-inline: 0.4rem 0.6rem;
  }

  .story-carousel__track {
    min-height: 21rem;
  }

  .details__events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-card h3 {
    font-size: clamp(2.35rem, 3.4vw, 3.35rem);
  }

  .gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 14rem;
  }

  .gallery__item {
    grid-column: span 4;
  }

  .gallery__item--wide {
    grid-column: span 8;
  }

  .gallery__item--tall {
    grid-column: span 4;
    grid-row: span 2;
  }
}


@media (min-width: 760px) {
  .rsvp {
    background-attachment: scroll, fixed;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
