:root {
  --cream: #f6f0e6;
  --cream-deep: #efe4d4;
  --paper: #fffaf4;
  --ink: #3a2e28;
  --muted: #6f625b;
  --terra: #c45c2e;
  --terra-deep: #a34722;
  --green: #1f3d34;
  --green-deep: #173028;
  --line: #eadccb;
  --ok: #2d6a4f;
  --no: #9d3b32;
  --shadow: 0 18px 50px rgba(80, 48, 30, 0.08);
  --header: 4.5rem;
  --serif: "Great Vibes", cursive;
  --script: "Dancing Script", cursive;
  --sans: "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(196, 92, 46, 0.05), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(31, 61, 52, 0.05), transparent 26%),
    var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  font-family: var(--script);
  font-size: clamp(2.5rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--terra);
}

.lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 300;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header);
  padding: calc(0.7rem + env(safe-area-inset-top)) 6.6rem 0.7rem 1.1rem;
  color: white;
  background: linear-gradient(180deg, rgba(24, 14, 10, 0.5), transparent);
}

.topbar.is-solid,
body.menu-open .topbar {
  color: var(--ink);
  background: rgba(246, 240, 230, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(80, 50, 30, 0.08);
}

.monogram {
  font-family: var(--serif);
  font-size: 2.15rem;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.monogram span {
  font-size: 0.72em;
}

.topbar__tools {
  position: fixed;
  z-index: 30;
  top: 12px;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn[aria-pressed="true"] {
  background: rgba(255, 250, 244, 0.18);
}

.topbar.is-solid .icon-btn,
body.menu-open .icon-btn {
  background: transparent;
}

.topbar.is-solid .icon-btn[aria-pressed="true"],
body.menu-open .icon-btn[aria-pressed="true"] {
  background: rgba(196, 92, 46, 0.12);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.menu {
  position: absolute;
  top: calc(100% - 0.3rem);
  left: 0.8rem;
  right: 0.8rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem;
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  font-weight: 500;
}

.menu a:hover {
  background: rgba(196, 92, 46, 0.08);
}

.hero,
.closing {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: white;
  overflow: hidden;
  background: #241814;
}

.hero__photo,
.closing__photo,
.hero__fill,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__photo,
.closing__photo {
  object-fit: cover;
}

.hero__fill {
  display: none;
}

.hero__shade {
  background:
    linear-gradient(180deg, rgba(24, 14, 10, 0.42), transparent 22%),
    linear-gradient(180deg, transparent 36%, rgba(22, 12, 10, 0.55) 62%, rgba(22, 12, 10, 0.9) 100%);
}

.hero__leaf {
  position: absolute;
  z-index: 1;
  width: min(34vw, 180px);
  pointer-events: none;
}

.hero__leaf--left {
  left: -42px;
  bottom: -36px;
}

.hero__leaf--right {
  right: 0;
  bottom: -18px;
  transform: scaleX(-1) rotate(12deg);
}

.hero__content,
.closing__content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-width: 100%;
  margin: 0 auto 1.6rem;
  padding: 0 1.35rem 0.4rem;
  text-align: center;
  box-sizing: border-box;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.closing blockquote p {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
}

.hero h1 {
  margin-top: 0.15rem;
  max-width: 100%;
  font-size: clamp(3rem, 14vw, 6.6rem);
  padding-inline: 0.2rem;
  overflow-wrap: anywhere;
}

.hero h1 span {
  font-size: 0.62em;
}

.hero__invite,
.hero__meta {
  font-weight: 300;
}

.hero__invite {
  margin: 0.85rem auto 0;
  max-width: 16.5rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.hero__date {
  margin-top: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.hero__meta {
  margin-top: 0.25rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0.9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.15rem;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.btn--terra {
  margin-top: 1.25rem;
  background: var(--terra);
  color: white;
  box-shadow: 0 10px 24px rgba(164, 71, 34, 0.28);
}

.btn--terra:hover {
  background: var(--terra-deep);
}

.btn--green {
  background: var(--green);
  color: white;
}

.btn--green:hover {
  background: var(--green-deep);
}

.btn--light {
  background: white;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--terra);
  border: 1px solid rgba(196, 92, 46, 0.35);
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 1.4rem;
  color: white;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.section {
  position: relative;
  padding: 4.5rem 1.25rem 4.8rem;
  scroll-margin-top: 4.5rem;
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.wrap--narrow,
.split,
.timeline,
.rsvp {
  width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.section-kicker {
  color: var(--muted);
}

.botanical > * {
  position: relative;
  z-index: 1;
}

.botanical::before,
.botanical::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 150px;
  background: url("/assets/leaf.svg") center / contain no-repeat;
  pointer-events: none;
  opacity: 0.9;
}

.botanical::before {
  left: -36px;
  bottom: -24px;
}

.botanical::after {
  right: -78px;
  top: -8px;
  width: 120px;
  height: 120px;
  transform: rotate(150deg);
}

@media (max-width: 899px) {
  .section h2 {
    padding-right: 1.5rem;
  }
}

.timeline {
  list-style: none;
  margin: 2.2rem auto 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.moment {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 1rem;
  align-items: center;
  position: relative;
  padding-left: 1.4rem;
}

.moment::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: -1.35rem;
  width: 2px;
  background: linear-gradient(var(--terra), #e7c7b2);
}

.moment:last-child::before {
  bottom: 50%;
}

.moment::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--terra);
  box-shadow: 0 0 0 4px rgba(196, 92, 46, 0.15);
}

.moment__year {
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--terra);
}

.moment__label {
  color: var(--muted);
}

.moment img,
.frame img,
.banner img {
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.moment img {
  height: 132px;
}

.carousel {
  width: min(920px, 100%);
  margin: 2.8rem auto 0;
}

.carousel__kicker {
  text-align: center;
  margin-bottom: 1rem;
}

.carousel__frame {
  position: relative;
}

.carousel__viewport {
  overflow: hidden;
  border-radius: 28px;
}

.carousel__track {
  display: flex;
  transition: transform 0.55s ease;
}

.carousel__slide {
  flex: 0 0 100%;
  margin: 0;
}

.carousel__slide img {
  width: 100%;
  height: min(78vw, 520px);
  object-fit: cover;
  border-radius: 28px;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 250, 244, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(40, 24, 16, 0.18);
  cursor: pointer;
}

.carousel__nav svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel__nav--prev { left: 0.7rem; }
.carousel__nav--next { right: 0.7rem; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e4d3c4;
  cursor: pointer;
}

.carousel__dot[aria-current="true"] {
  background: var(--terra);
}

@media (prefers-reduced-motion: reduce) {
  .carousel__track { transition: none; }
}

.facts,
.experience {
  display: grid;
  gap: 0;
  margin-top: 1.6rem;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.facts {
  padding: 0.4rem 1rem;
  list-style: none;
}

.facts li,
.experience article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 0.2rem;
  border-top: 1px solid var(--line);
}

.facts li:first-child,
.experience article:first-child {
  border-top: 0;
}

.facts strong,
.experience h3 {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

.facts__icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f8ebe3;
  color: var(--terra);
}

.facts__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experience {
  padding: 0.35rem 1rem;
}

.experience p,
.facts li span {
  color: var(--muted);
  font-weight: 300;
}

.frame {
  position: relative;
  margin: 1.6rem 0 0;
}

.frame img,
.banner img {
  height: min(68vw, 420px);
}

.frame figcaption,
.banner figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: white;
  font-family: var(--script);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.banner {
  position: relative;
  margin-top: 1.2rem;
}

.section__action {
  margin: 1.5rem 0 0;
  text-align: center;
}

.rsvp {
  text-align: left;
}

.rsvp .section-kicker,
.rsvp h2,
.rsvp .lead {
  text-align: center;
}

.rsvp h2 {
  margin-top: 0.2rem;
}

.note,
.form-error {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: #fff4e8;
  color: var(--terra-deep);
}

.form-error {
  background: #fdeceb;
  color: var(--no);
}

.rsvp-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.rsvp-form label,
.rsvp-form legend {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
}

.rsvp-form fieldset {
  border: 0;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.rsvp-submit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.rsvp-submit .btn--terra {
  flex: 1;
  margin-top: 0;
}

.rsvp-gif {
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 4.5rem;
  object-fit: contain;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #eadfD2;
  background: white;
  border-radius: 16px;
  padding: 0.95rem 1rem;
}

textarea {
  resize: vertical;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.choice {
  min-height: 3.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  text-align: center;
}

.choice svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.choice--yes[aria-pressed="true"] {
  color: white;
  background: var(--ok);
  border-color: var(--ok);
}

.choice--no[aria-pressed="true"] {
  color: white;
  background: var(--no);
  border-color: var(--no);
}

.thanks {
  margin-top: 1.4rem;
  padding: 1.4rem 1rem 0.4rem;
  text-align: center;
}

.thanks h3 {
  font-family: var(--script);
  font-size: 2.4rem;
  color: var(--terra);
}

.thanks p {
  margin: 0.4rem 0 1rem;
  color: var(--muted);
}

.closing {
  align-items: center;
}

.closing blockquote {
  margin: 0;
}

.closing blockquote p {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
}

.closing blockquote p::before {
  content: "“";
}

.closing blockquote p::after {
  content: "”";
}

.monogram--closing {
  display: block;
  margin: 0.8rem 0 1.1rem;
  font-size: 2.6rem;
}

@media (max-width: 420px) {
  .choices {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .topbar {
    justify-content: flex-start;
    padding: 0.7rem 2rem;
  }

  .menu {
    order: 1;
  }

  .topbar__tools {
    order: 2;
    position: static;
    z-index: auto;
    margin-left: 0.4rem;
  }

  .nav-toggle {
    display: none;
  }

  .menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: auto;
    margin-left: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .menu a {
    color: white;
    padding: 0.55rem 0.75rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  }

  .topbar.is-solid .menu a {
    color: var(--ink);
    text-shadow: none;
  }

  .hero__fill {
    display: block;
    object-fit: cover;
    filter: blur(28px);
    transform: scale(1.08);
  }

  .hero__photo,
  .closing__photo {
    object-fit: contain;
    z-index: 0;
  }

  .hero__content,
  .closing__content {
    margin-bottom: 4rem;
  }

  .section {
    padding: 6.5rem 2rem;
  }

  .split {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
  }

  .frame {
    margin: 0;
  }

  .frame img,
  .banner img {
    height: 460px;
    border-radius: 28px;
  }

  .timeline {
    position: relative;
    width: min(920px, 100%);
    gap: 2.5rem;
    margin-top: 3rem;
  }

  .timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(#c45c2e, #e7c7b2);
  }

  .moment {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding-left: 0;
  }

  .moment::before {
    display: none;
  }

  .moment::after {
    left: 50%;
    margin-left: -5px;
  }

  .moment img {
    height: 280px;
    border-radius: 26px;
  }

  .moment:nth-child(even) .moment__copy {
    order: 2;
  }

  .experience {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .experience article {
    background: var(--paper);
    border: 0;
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
  }

  .rsvp {
    width: min(640px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .menu,
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    transition: none;
  }
}
