:root {
  --paper: #fbf7ef;
  --paper-light: #fffdf8;
  --ink: #4d372b;
  --muted: #7b685b;
  --terracotta: #ad6040;
  --terracotta-dark: #88452e;
  --sand: #d8bea0;
  --sage: #7c8973;
  --line: rgba(126, 81, 55, 0.22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Allura", "Segoe Script", cursive;
  --sans: "Montserrat", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #d9c7b2;
  font-family: var(--serif);
  line-height: 1.65;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.36;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

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

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

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

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

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 78px;
  padding: 0 max(1.5rem, calc((100vw - 1240px) / 2));
  color: #684330;
  background: rgba(251, 247, 239, 0.94);
  box-shadow: 0 8px 24px rgba(72, 46, 31, 0.06);
  transform: translateX(-50%);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 10px;
  background: rgba(251, 247, 239, 0.94);
  clip-path: polygon(0 0, 100% 0, 100% 38%, 96% 76%, 91% 42%, 85% 80%, 79% 45%, 72% 78%, 66% 40%, 59% 76%, 52% 44%, 45% 82%, 38% 41%, 31% 76%, 24% 46%, 17% 80%, 10% 42%, 4% 75%, 0 42%);
}

.mini-brand {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.12rem;
  font-size: 2rem;
  line-height: 1;
}

.mini-brand small {
  font-size: 0.65em;
}

.main-nav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, auto) 5.6rem repeat(3, auto);
  justify-content: center;
  gap: clamp(1.15rem, 3vw, 3rem);
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.main-nav a {
  padding: 0.8rem 0;
}

.main-nav a:nth-child(4) {
  grid-column: 5;
}

.menu-button {
  display: none;
}

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

.hero-main {
  position: relative;
  min-height: clamp(590px, 72svh, 760px);
  overflow: hidden;
}

.hero-picture {
  position: absolute;
  inset: 0;
}

.hero-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: clamp(5%, 10vw, 13%);
  display: grid;
  justify-items: center;
  width: min(38vw, 520px);
  color: #6f371f;
  text-align: center;
  transform: translateY(-42%);
}

.hero-kicker,
.overline {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-copy h1 {
  display: grid;
  justify-items: center;
  margin: 0.1rem 0 0;
  font-family: var(--script);
  font-size: clamp(4.5rem, 7vw, 7.4rem);
  font-weight: 400;
  line-height: 0.68;
}

.hero-copy h1 small {
  margin: 0.25rem 0;
  font-family: var(--serif);
  font-size: 0.32em;
  line-height: 1;
}

.heart-rule,
.botanical-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.35rem 0 0.75rem;
  color: var(--terracotta);
}

.heart-rule span,
.botanical-rule span {
  width: 48px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.heart-rule i,
.botanical-rule i {
  font-size: 0.72rem;
}

.hero-date {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.17em;
  text-shadow: 0 1px 10px rgba(255, 251, 245, 0.9);
}

.paper-band,
.paper-section {
  position: relative;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(122, 102, 86, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(122, 102, 86, 0.02) 1px, transparent 1px);
  background-size: 31px 31px;
}

.paper-band::before,
.paper-section::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -12px;
  left: 0;
  right: 0;
  height: 16px;
  background: var(--paper);
  clip-path: polygon(0 45%, 4% 25%, 8% 52%, 13% 22%, 18% 48%, 24% 18%, 31% 52%, 38% 30%, 44% 55%, 52% 20%, 59% 48%, 67% 24%, 74% 55%, 82% 25%, 89% 50%, 95% 28%, 100% 48%, 100% 100%, 0 100%);
}

.desktop-countdown {
  display: grid;
  justify-items: center;
  min-height: 228px;
  padding: 2.35rem 1.25rem 2rem;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 140px));
  justify-content: center;
  margin-top: 1.1rem;
}

.timer article {
  padding: 0 1.35rem;
  border-left: 1px solid var(--line);
  text-align: center;
}

.timer article:first-child {
  border-left: 0;
}

.timer strong {
  display: block;
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.timer span,
.schedule-grid span {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mobile-countdown,
.countdown-cta {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.78rem 2.4rem;
  border: 1px solid var(--terracotta);
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

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

.button.primary {
  color: var(--paper-light);
  background: var(--terracotta);
  box-shadow: 0 10px 24px rgba(116, 60, 39, 0.15);
}

.button.secondary {
  color: var(--terracotta-dark);
  background: transparent;
}

.paper-section {
  padding: clamp(4.2rem, 7vw, 6.5rem) max(1.25rem, calc((100vw - 1180px) / 2));
  border-top: 1px solid rgba(126, 81, 55, 0.13);
}

.section-heading {
  display: grid;
  justify-items: center;
  margin-bottom: 2.8rem;
  text-align: center;
}

.section-heading p {
  margin: 0 0 0.35rem;
  color: var(--sage);
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: #70432e;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading .botanical-rule {
  margin: 0.7rem 0 0;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
}

.schedule-grid article {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
}

.schedule-grid article > i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--terracotta-dark);
  font-size: 2rem;
}

.schedule-grid time {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.polaroid {
  position: relative;
  justify-self: center;
  width: min(520px, 100%);
  padding: 0.8rem 0.8rem 2.1rem;
  background: #fffdf8;
  box-shadow: 0 18px 45px rgba(72, 46, 31, 0.13);
  transform: rotate(-2deg);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.tape {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 86px;
  height: 31px;
  background: rgba(215, 181, 115, 0.65);
  transform: translateX(-50%) rotate(-6deg);
}

.story-copy {
  max-width: 500px;
}

.align-left {
  justify-items: start;
  text-align: left;
}

.story-copy > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.story-copy .handwritten,
.venue {
  margin-top: 1.55rem;
  color: var(--terracotta);
  font-family: var(--script);
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  line-height: 1.1;
}

.gallery {
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.gallery-grid a {
  display: block;
  height: clamp(230px, 24vw, 330px);
  overflow: hidden;
  background: #eadcca;
  cursor: zoom-in;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.gallery-grid a:hover img,
.gallery-grid a:focus-visible img {
  transform: scale(1.04);
}

.gallery .button {
  margin-top: 1.5rem;
}

.location {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.location-copy .section-heading {
  margin-bottom: 1.4rem;
}

.location-copy > p {
  margin: 0.3rem 0;
  color: var(--muted);
}

.location-copy .venue {
  color: var(--terracotta);
}

.location-copy .button {
  margin-top: 1.3rem;
}

.map-frame {
  min-height: 320px;
  padding: 8px;
  background: #fffdf8;
  box-shadow: 0 16px 45px rgba(72, 46, 31, 0.12);
}

.map-frame iframe {
  display: block;
  width: 100%;
  min-height: 304px;
  border: 0;
  filter: saturate(0.75) sepia(0.08) brightness(1.03);
}

.rsvp {
  text-align: center;
}

.rsvp-note {
  margin: -1.7rem 0 2rem;
  color: var(--muted);
}

.rsvp-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.1rem;
  width: min(780px, 100%);
  margin: 0 auto;
}

.rsvp-form label,
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  outline: 0;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(173, 96, 64, 0.1);
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder,
.rsvp-form select {
  color: #8b786b;
  font-family: var(--sans);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rsvp-form .wide,
.rsvp-form button,
.form-status {
  grid-column: 1 / -1;
}

.rsvp-form button {
  justify-self: center;
  margin-top: 0.25rem;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--terracotta-dark);
}

.site-footer {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 4rem 1.25rem 2.8rem;
  color: #fff7ed;
  text-align: center;
  background: var(--terracotta);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--terracotta);
  clip-path: polygon(0 48%, 5% 25%, 11% 55%, 17% 20%, 24% 52%, 31% 28%, 39% 57%, 47% 18%, 55% 50%, 63% 24%, 71% 54%, 79% 22%, 87% 51%, 94% 28%, 100% 48%, 100% 100%, 0 100%);
}

.footer-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 247, 237, 0.68);
  border-radius: 50%;
  font-size: 2rem;
}

.footer-monogram small {
  font-size: 0.55em;
}

.site-footer p {
  margin: 0.55rem 0 0;
  font-size: 1.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer time,
.site-footer > small {
  letter-spacing: 0.14em;
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 0.8rem;
}

.socials a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 247, 237, 0.55);
  border-radius: 50%;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

@media (max-width: 1000px) {
  .site-header {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .main-nav {
    gap: 1.25rem;
  }

  .hero-copy {
    right: 4%;
    width: 43vw;
  }
}

@media (max-width: 800px) {
  .site-header {
    position: absolute;
    grid-template-columns: 1fr auto;
    width: 100%;
    min-height: 62px;
    padding: 0 0.75rem;
    color: #6f371f;
    background: transparent;
    box-shadow: none;
  }

  .site-header::after {
    display: none;
  }

  .mini-brand {
    display: none;
  }

  .menu-button {
    grid-column: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    color: currentColor;
    background: transparent;
    font-size: 1rem;
  }

  .main-nav {
    position: absolute;
    top: 58px;
    left: 0.75rem;
    right: 0.75rem;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.5rem 1rem;
    background: rgba(251, 247, 239, 0.97);
    box-shadow: 0 16px 36px rgba(72, 46, 31, 0.14);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a,
  .main-nav a:nth-child(4) {
    grid-column: auto;
    padding: 0.75rem 0.3rem;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .hero-main {
    min-height: max(760px, 100svh);
  }

  .hero-picture img {
    object-position: center top;
  }

  .hero-copy {
    top: 44%;
    right: auto;
    left: 50%;
    width: min(88%, 420px);
    transform: translateX(-50%);
  }

  .hero-kicker {
    order: 2;
    margin-top: 0.15rem;
    font-size: 0.62rem;
  }

  .hero-copy h1 {
    order: 1;
    font-size: clamp(3.75rem, 18vw, 5.6rem);
    line-height: 0.64;
  }

  .heart-rule {
    order: 3;
    margin: 0.9rem 0 0.45rem;
  }

  .hero-date {
    order: 4;
    font-size: 1.08rem;
  }

  .mobile-countdown {
    order: 5;
    display: grid;
    justify-items: center;
    width: 100%;
  }

  .mobile-countdown > p {
    margin: 1rem 0 0;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
  }

  .mobile-countdown .timer {
    width: 100%;
    margin-top: 0.7rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-countdown .timer article {
    padding: 0 0.35rem;
  }

  .mobile-countdown .timer strong {
    font-size: 1.6rem;
  }

  .mobile-countdown .timer span {
    font-size: 0.44rem;
    letter-spacing: 0.1em;
  }

  .mobile-countdown .button {
    width: min(100%, 340px);
    min-height: 40px;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-size: 0.62rem;
  }

  .desktop-countdown {
    display: none;
  }

  .schedule-grid {
    grid-template-columns: repeat(5, minmax(112px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.8rem;
    scroll-snap-type: x mandatory;
  }

  .schedule-grid article {
    scroll-snap-align: center;
  }

  .story,
  .location {
    grid-template-columns: 1fr;
  }

  .story-copy,
  .location-copy {
    justify-self: center;
    text-align: center;
  }

  .story-copy .align-left,
  .location-copy .align-left {
    justify-items: center;
    text-align: center;
  }

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

  .gallery-grid a {
    height: clamp(190px, 62vw, 300px);
  }

  .location {
    gap: 2.5rem;
  }

  .map-frame,
  .map-frame iframe {
    min-height: 250px;
  }
}

@media (max-width: 540px) {
  .paper-section {
    padding: 4rem 1rem;
  }

  .section-heading {
    margin-bottom: 2.2rem;
  }

  .hero-main {
    min-height: max(700px, 100svh);
  }

  .hero-copy {
    top: 43.5%;
    width: calc(100% - 2rem);
  }

  .hero-copy h1 {
    font-size: clamp(3.45rem, 18vw, 4.8rem);
  }

  .heart-rule span {
    width: 36px;
  }

  .gallery-grid {
    gap: 0.55rem;
  }

  .rsvp-form {
    grid-template-columns: 1fr;
  }

  .rsvp-form label,
  .rsvp-form .wide,
  .rsvp-form button,
  .form-status {
    grid-column: 1;
  }

  .site-footer > small {
    max-width: 310px;
  }
}
@media (max-width: 600px) {
  html { scrollbar-width: none; }
  body::-webkit-scrollbar { display: none; }
}
