:root {
  --paper: #fbf7f1;
  --paper-warm: #f2e8dc;
  --soft-green: #c9d1c4;
  --soft-blue: #c5d2d4;
  --clay: #9f7562;
  --brown: #4e3b33;
  --ink: #292522;
  --muted: #756c65;
  --white: #fffaf5;
  --line: rgba(78, 59, 51, 0.18);
  --shadow: 0 24px 70px rgba(78, 59, 51, 0.14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  color: var(--white);
  background: var(--clay);
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end start;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(36px, 7vw, 88px);
  color: var(--white);
  isolation: isolate;
  transition:
    opacity 900ms ease,
    visibility 900ms ease;
}

.intro-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-screen__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(31, 26, 22, 0.72), rgba(31, 26, 22, 0.12) 62%),
    linear-gradient(180deg, rgba(31, 26, 22, 0.08), rgba(31, 26, 22, 0.46)),
    url("assets/story-4.jpg") center center / cover;
  transform: scale(1.04);
}

.intro-screen::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 68% 42%, transparent 0 20%, rgba(33, 27, 23, 0.25) 100%);
}

.intro-screen__content {
  width: min(88vw, 520px);
  text-align: left;
  animation: riseIn 900ms ease both 180ms;
}

.intro-screen h1,
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 9.8vw, 8.4rem);
  font-weight: 500;
  line-height: 0.78;
  letter-spacing: 0;
}

.intro-screen__date,
.hero__date {
  margin: 1.4rem 0 2rem;
  font-size: clamp(1rem, 3vw, 1.25rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), 1080px);
  min-height: 58px;
  padding: 10px 16px;
  color: var(--ink);
  background: rgba(255, 250, 245, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(78, 59, 51, 0.08);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate(-50%, -18px);
  transition:
    opacity 450ms ease,
    transform 450ms ease;
}

.site-header.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--brown);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.05rem;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(0.7rem, 2.2vw, 1.6rem);
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--clay);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--light {
  color: var(--white);
  background: rgba(255, 250, 245, 0.08);
}

.button--light:hover,
.button--light:focus-visible {
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}

.button--dark {
  color: var(--white);
  background: var(--brown);
  border-color: var(--brown);
}

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

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 92svh;
  padding: min(16vh, 140px) max(24px, 6vw) min(12vh, 100px);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  z-index: -3;
  background: url("assets/story-4.jpg") center center / cover;
  transform: scale(1.04);
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(37, 29, 24, 0.76), rgba(37, 29, 24, 0.12) 62%),
    linear-gradient(180deg, rgba(37, 29, 24, 0.08), rgba(37, 29, 24, 0.46));
}

.hero__content {
  width: min(560px, 100%);
}

.hero__line {
  position: absolute;
  right: max(18px, 6vw);
  bottom: 36px;
  width: min(34vw, 420px);
  min-width: 220px;
  opacity: 0.86;
}

.hero__line path {
  fill: none;
  stroke: var(--white);
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  stroke-linecap: round;
  stroke-width: 1.4;
  animation: drawLine 4.8s ease-in-out infinite alternate;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section {
  padding: clamp(76px, 11vw, 150px) 24px;
}

.section--paper {
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.55), rgba(251, 247, 241, 1)),
    var(--paper);
}

.section--soft {
  background: linear-gradient(120deg, var(--paper-warm), #edf1ed 72%, #edf4f5);
}

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

.intro-copy {
  max-width: 760px;
  text-align: center;
}

.intro-copy h2,
.section-heading h2,
.date-card h2,
.rsvp-copy h2,
.finale h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0;
}

.intro-copy p:not(.eyebrow),
.dresscode__content p,
.rsvp-copy p {
  margin: 1.6rem auto 0;
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.date-band {
  padding: 0 24px;
  background: var(--paper);
}

.date-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: stretch;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) 0;
  border-block: 1px solid var(--line);
}

.date-card,
.countdown {
  min-height: 210px;
}

.date-card {
  display: grid;
  align-content: center;
}

.date-card p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.countdown div {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  padding: 22px 12px;
  background: rgba(255, 250, 245, 0.84);
}

.countdown strong {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 0.9;
}

.countdown span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(34px, 6vw, 70px);
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
}

.timeline::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: clamp(78px, 12vw, 118px);
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(92px, 14vw, 150px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  padding: clamp(24px, 4vw, 38px);
  background: rgba(255, 250, 245, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(78, 59, 51, 0.08);
}

.timeline-card::before {
  position: absolute;
  top: 42px;
  left: clamp(101px, 16vw, 162px);
  width: 11px;
  height: 11px;
  content: "";
  background: var(--soft-green);
  border: 3px solid var(--paper);
  border-radius: 50%;
}

.timeline-card time {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.9;
}

.timeline-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 500;
  line-height: 1;
}

.timeline-card p,
.timeline-card address {
  margin: 0.35rem 0;
  color: var(--muted);
  font-style: normal;
}

.text-link {
  display: inline-flex;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-underline-offset: 0.28em;
}

.photo-ribbon {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1fr;
  gap: clamp(10px, 1.6vw, 18px);
  padding: clamp(10px, 1.6vw, 18px);
  background: var(--white);
}

.photo-ribbon img {
  width: 100%;
  height: clamp(260px, 44vw, 560px);
  object-fit: cover;
  border-radius: 8px;
}

.photo-ribbon img:nth-child(2) {
  margin-top: clamp(34px, 7vw, 86px);
}

.dresscode {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
}

.dresscode .section-heading {
  margin-bottom: 0;
}

.dresscode__content {
  padding-top: 8px;
}

.dresscode__content p {
  margin: 0;
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.palette span {
  width: clamp(54px, 8vw, 76px);
  aspect-ratio: 1;
  background: var(--swatch);
  border: 1px solid rgba(78, 59, 51, 0.16);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(78, 59, 51, 0.08);
}

.rsvp-section {
  background:
    linear-gradient(180deg, rgba(251, 247, 241, 0.94), rgba(251, 247, 241, 0.98)),
    url("assets/story-4.jpg") center / cover;
}

.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.95fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: start;
}

.rsvp-copy {
  position: sticky;
  top: 120px;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255, 250, 245, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--brown);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(78, 59, 51, 0.18);
  border-radius: 8px;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  background: var(--white);
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(159, 117, 98, 0.12);
}

.form-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--clay);
  font-size: 0.95rem;
}

.finale {
  position: relative;
  display: grid;
  min-height: 78svh;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  isolation: isolate;
}

.finale img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finale::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: rgba(35, 27, 23, 0.46);
}

.finale__content {
  width: min(760px, calc(100% - 48px));
}

.finale p:last-child {
  margin: 1rem 0 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 820px) {
  .site-header {
    top: 12px;
    width: min(calc(100% - 20px), 560px);
    min-height: 54px;
    padding: 8px 10px;
  }

  .brand {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .nav {
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 4px 2px 0;
    scrollbar-width: none;
    white-space: nowrap;
  }

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

  .hero {
    display: block;
    min-height: auto;
    padding: calc(58svh + 34px) 20px 68px;
    color: var(--ink);
    background: var(--paper);
  }

  .intro-screen {
    display: block;
    padding: calc(58svh + 28px) 20px 34px;
    background: #211b17;
  }

  .intro-screen__photo,
  .hero__image {
    inset: 0 0 auto;
    height: 58svh;
    min-height: 340px;
    transform: none;
  }

  .intro-screen__content {
    position: relative;
    width: min(100%, 430px);
    margin: 0 auto;
    text-align: center;
  }

  .intro-screen__photo {
    background:
      linear-gradient(180deg, rgba(31, 26, 22, 0.02), rgba(31, 26, 22, 0.28)),
      url("assets/hero.jpg") center 18% / cover;
  }

  .hero__image {
    background: url("assets/hero.jpg") center 18% / cover;
  }

  .intro-screen::after,
  .hero__shade {
    inset: 0 0 auto;
    height: 58svh;
    min-height: 340px;
  }

  .intro-screen h1,
  .hero h1 {
    font-size: clamp(3.3rem, 12vw, 5rem);
    line-height: 0.88;
  }

  .hero__shade {
    background: linear-gradient(180deg, rgba(37, 29, 24, 0.02), rgba(37, 29, 24, 0.22));
  }

  .hero__line {
    display: none;
  }

  .hero .button--light {
    color: var(--brown);
    background: transparent;
    border-color: rgba(78, 59, 51, 0.42);
  }

  .hero .button--light:hover,
  .hero .button--light:focus-visible {
    color: var(--white);
    background: var(--brown);
  }

  .date-band__inner,
  .dresscode,
  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .date-card,
  .countdown {
    min-height: 170px;
  }

  .timeline::before,
  .timeline-card::before {
    display: none;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .photo-ribbon {
    grid-template-columns: 1fr;
  }

  .photo-ribbon img,
  .photo-ribbon img:nth-child(2) {
    height: min(78vh, 520px);
    margin-top: 0;
  }

  .rsvp-copy {
    position: static;
  }
}

@media (max-width: 520px) {
  .intro-screen h1,
  .hero h1 {
    font-size: clamp(3.2rem, 15vw, 4.5rem);
  }

  .intro-screen__date,
  .hero__date {
    letter-spacing: 0.18em;
  }

  .button {
    width: 100%;
    min-width: 0;
  }

  .section {
    padding: 68px 18px;
  }

  .countdown {
    grid-template-columns: 1fr;
  }

  .countdown div {
    min-height: 118px;
  }

  .rsvp-form {
    padding: 20px;
  }
}

@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;
  }
}
