:root {
  --ink: #161411;
  --ink-soft: #2a2622;
  --stone: #f3efe8;
  --stone-2: #e8e2d8;
  --champagne: #c4a574;
  --sage: #6f7f6a;
  --mist: rgba(243, 239, 232, 0.78);
  --text: #2c2824;
  --text-dim: #6b645c;
  --font-display: "Cormorant Garamond", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--stone);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  color: var(--stone);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__img {
  transform: scale(1.08);
  animation: heroZoom 18s var(--ease) forwards;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 20, 17, 0.25) 0%, rgba(22, 20, 17, 0.15) 35%, rgba(22, 20, 17, 0.72) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 2.5rem));
  padding: 0 0 5.5rem;
  text-align: center;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--mist);
}

.hero__names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 11vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.hero__names em {
  display: inline-block;
  margin: 0 0.35em;
  font-style: italic;
  font-weight: 400;
  color: var(--champagne);
  font-size: 0.72em;
  vertical-align: 0.08em;
}

.hero__lead {
  margin: 1.35rem auto 0;
  max-width: 22em;
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
  color: var(--mist);
  font-weight: 300;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 2rem;
}

.hero__date {
  margin: 2.2rem 0 0;
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  font-size: 0.95rem;
  color: rgba(243, 239, 232, 0.7);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 2;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(243, 239, 232, 0.45);
  border-radius: 999px;
  transform: translateX(-50%);
}

.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: var(--stone);
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease-in-out infinite;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  color: var(--stone);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), backdrop-filter 0.35s;
}

.nav.is-solid {
  background: rgba(243, 239, 232, 0.9);
  color: var(--ink);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(22, 20, 17, 0.06);
}

.nav__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
}

.nav__links {
  display: flex;
  gap: 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.nav__links a {
  opacity: 0.78;
}

.nav__links a:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
}

.section__inner {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section__inner--narrow {
  width: min(560px, calc(100% - 2.5rem));
}

.section__label {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--sage);
  font-size: 1rem;
}

.section__label--light {
  color: var(--champagne);
}

.section__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: 0.08em;
  color: var(--ink);
}

.section__title--light {
  color: var(--stone);
}

/* Story */
.story__text {
  margin: 0 0 2.8rem;
  max-width: 34em;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.story__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.85rem, 2vw, 1.4rem);
}

.story__pair figure {
  margin: 0;
  overflow: hidden;
}

.story__pair img {
  aspect-ratio: 4 / 5;
  transition: transform 1.2s var(--ease);
}

.story__pair figure:hover img {
  transform: scale(1.04);
}

.story__pair figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-align: center;
  font-size: 1.05rem;
}

/* Gallery */
.gallery {
  background: linear-gradient(180deg, var(--stone) 0%, var(--stone-2) 100%);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  margin: 0;
  grid-column: span 4;
  overflow: hidden;
  min-height: 220px;
}

.gallery__item img {
  transition: transform 1.1s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__item--tall {
  grid-column: span 5;
  grid-row: span 2;
  min-height: 460px;
}

.gallery__item--wide {
  grid-column: span 8;
  min-height: 280px;
}

@media (max-width: 800px) {
  .gallery__item,
  .gallery__item--tall,
  .gallery__item--wide {
    grid-column: span 12;
    min-height: 240px;
  }
}

/* Details */
.details {
  position: relative;
  color: var(--stone);
  background: var(--ink);
  overflow: hidden;
}

.details__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(196, 165, 116, 0.16), transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(111, 127, 106, 0.18), transparent 45%);
}

.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.timeline__item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.2rem;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(243, 239, 232, 0.14);
}

.timeline__item time {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--champagne);
  letter-spacing: 0.06em;
}

.timeline__item h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.timeline__item p {
  margin: 0;
  color: rgba(243, 239, 232, 0.62);
  font-size: 0.92rem;
}

.venue {
  position: relative;
  z-index: 1;
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(243, 239, 232, 0.14);
}

.venue__name {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.1em;
}

.venue__addr {
  margin: 0 0 1.4rem;
  color: rgba(243, 239, 232, 0.6);
  font-size: 0.92rem;
}

/* RSVP */
.rsvp__hint {
  margin: -0.5rem 0 2rem;
  color: var(--text-dim);
}

.rsvp__form {
  display: grid;
  gap: 1.15rem;
}

.rsvp__form label,
.rsvp__form fieldset {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.rsvp__form span,
.rsvp__form legend {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.rsvp__form input[type="text"],
.rsvp__form input[type="tel"],
.rsvp__form select,
.rsvp__form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(42, 38, 34, 0.22);
  background: transparent;
  padding: 0.65rem 0;
  font: inherit;
  color: var(--ink);
  outline: none;
  border-radius: 0;
}

.rsvp__form input:focus,
.rsvp__form select:focus,
.rsvp__form textarea:focus {
  border-bottom-color: var(--champagne);
}

.choice {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.rsvp__note {
  margin: 0.4rem 0 0;
  color: var(--sage);
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.45rem;
  border: 1px solid transparent;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}

.btn--light {
  background: var(--stone);
  color: var(--ink);
}

.btn--light:hover {
  background: #fff;
}

.btn--ghost {
  border-color: rgba(243, 239, 232, 0.45);
  color: var(--stone);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--stone);
}

.btn--outline {
  border-color: rgba(243, 239, 232, 0.35);
  color: var(--stone);
}

.btn--outline:hover {
  background: rgba(243, 239, 232, 0.08);
}

.btn--dark {
  background: var(--ink);
  color: var(--stone);
  width: 100%;
  margin-top: 0.5rem;
}

.btn--dark:hover {
  background: var(--ink-soft);
}

/* Footer */
.footer {
  padding: 3.5rem 1.25rem 4rem;
  text-align: center;
  background: var(--ink);
  color: var(--stone);
}

.footer__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.16em;
}

.footer__date {
  margin: 0.5rem 0 1.2rem;
  color: var(--champagne);
  letter-spacing: 0.22em;
  font-size: 0.85rem;
}

.footer__copy {
  margin: 0;
  color: rgba(243, 239, 232, 0.45);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
}

/* Motion */
.animate-in {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-in,
  .reveal,
  .hero__img,
  .hero__scroll span {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
