:root {
  --paper: #fffdf8;
  --paper-warm: #f8f2e8;
  --ink: #54483f;
  --muted: #786e66;
  --aqua: #5da5a8;
  --aqua-dark: #397f83;
  --aqua-soft: #b9dfe0;
  --gold: #b48745;
  --sand: #ddc8a8;
  --line: rgba(180, 135, 69, 0.28);
  --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: var(--paper-warm);
  font-family: var(--serif);
  line-height: 1.65;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.24;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%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: min(1220px, calc(100% - 2.5rem));
  min-height: 80px;
  color: #5e4a3c;
  transform: translateX(-50%);
}

.brand {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  width: 62px;
  height: 62px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.55rem;
  line-height: 1;
}

.brand small {
  font-size: 0.52em;
}

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

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

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

.menu-button {
  display: none;
}

.hero {
  position: relative;
  min-height: clamp(710px, 100svh, 920px);
  overflow: hidden;
  background: #fdf8ed;
}

.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: 51%;
  left: clamp(5%, 10vw, 14%);
  display: grid;
  justify-items: center;
  width: min(42vw, 590px);
  text-align: center;
  transform: translateY(-47%);
}

.hero-kicker,
.countdown-label {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-copy h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  margin: 0.15rem 0 0.35rem;
  color: var(--aqua-dark);
  font-family: var(--script);
  font-size: clamp(4.8rem, 7.5vw, 7.8rem);
  font-weight: 400;
  line-height: 0.9;
}

.hero-copy h1 small {
  color: var(--aqua-dark);
  font-size: 0.45em;
}

.hero-date {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-heart {
  margin: 1rem 0 1.2rem;
  color: var(--gold);
  font-size: 0.85rem;
}

.countdown-label {
  font-size: 0.7rem;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 130px));
  justify-content: center;
  width: min(100%, 540px);
  margin-top: 0.75rem;
  padding: 0.85rem 0.6rem;
  background: rgba(255, 253, 248, 0.62);
  backdrop-filter: blur(7px);
}

.timer article {
  padding: 0 1rem;
  border-left: 1px solid rgba(180, 135, 69, 0.32);
  text-align: center;
}

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

.timer strong {
  display: block;
  color: var(--aqua-dark);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.timer span {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--sans);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sea-section {
  position: relative;
  padding: clamp(4.8rem, 8vw, 7rem) max(1.25rem, calc((100vw - 1180px) / 2));
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(93, 165, 168, 0.02) 1px, transparent 1px),
    linear-gradient(rgba(180, 135, 69, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
}

.sea-section::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: -18px;
  left: 0;
  width: 100%;
  height: 34px;
  border-top: 8px solid rgba(93, 165, 168, 0.48);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--paper);
  transform: rotate(-0.4deg);
}

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

.section-heading > i {
  margin-bottom: 0.55rem;
  color: var(--gold);
  font-size: 1.2rem;
}

.section-heading h2 {
  margin: 0;
  color: #8b6437;
  font-size: clamp(1.55rem, 2.7vw, 2.1rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.title-rule {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.7rem;
  color: var(--gold);
}

.title-rule span {
  width: 50px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.title-rule i {
  font-size: 0.7rem;
}

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

.schedule-grid article {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0 1rem;
  text-align: center;
}

.schedule-grid article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  right: -0.65rem;
  width: 1.3rem;
  height: 1px;
  background: var(--line);
}

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

.schedule-grid strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.schedule-grid time {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

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

.story-photo {
  position: relative;
  justify-self: center;
  width: min(430px, 100%);
  padding: 0.75rem 0.75rem 2rem;
  background: #fff;
  box-shadow: 0 18px 45px rgba(74, 82, 78, 0.13);
  transform: rotate(1.5deg);
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-shell {
  position: absolute;
  right: -20px;
  bottom: -16px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: var(--gold);
  background: var(--paper-warm);
  box-shadow: 0 8px 20px rgba(74, 82, 78, 0.13);
  font-size: 2.2rem;
  transform: rotate(20deg);
}

.story-copy {
  max-width: 520px;
  text-align: center;
}

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

.story-copy .section-heading {
  justify-items: center;
  margin-bottom: 1.8rem;
  text-align: center;
}

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

.story-copy .script-copy,
.venue {
  margin-top: 1.5rem;
  color: var(--aqua-dark);
  font-family: var(--script);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.12;
}

.gallery {
  text-align: center;
}

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

.gallery-grid a {
  display: block;
  height: clamp(220px, 21vw, 310px);
  overflow: hidden;
  background: #dceeee;
  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);
}

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

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

.button.primary {
  color: #fff;
  background: var(--aqua);
  box-shadow: 0 10px 24px rgba(57, 127, 131, 0.16);
}

.button.outline {
  color: var(--aqua-dark);
  background: transparent;
}

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

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

.location-copy {
  text-align: center;
}

.location-copy .section-heading {
  justify-items: center;
  margin-bottom: 1.3rem;
  text-align: center;
}

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

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

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

.map-frame {
  min-height: 320px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(74, 82, 78, 0.12);
}

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

.rsvp {
  text-align: center;
  background-color: var(--paper-warm);
}

.rsvp-note {
  margin: -1.6rem 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 rgba(84, 72, 63, 0.2);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  outline: 0;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(93, 165, 168, 0.1);
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder,
.rsvp-form select {
  color: #84786f;
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  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(--aqua-dark);
}

.site-footer {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 4.5rem 1.25rem 3rem;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(180deg, #f7efe2 0%, #d8eef0 65%, #b6dfe1 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  width: 100%;
  height: 44px;
  border-top: 8px solid rgba(93, 165, 168, 0.55);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: #f7efe2;
  transform: rotate(0.4deg);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 94px;
  height: 94px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 2rem;
}

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

.site-footer p {
  margin: 0.6rem 0 0;
  color: var(--aqua-dark);
  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: 0.75rem 0;
}

.socials a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(57, 127, 131, 0.4);
  border-radius: 50%;
  color: var(--aqua-dark);
}

.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 {
    width: calc(100% - 1.25rem);
  }

  .main-nav {
    gap: 1.2rem;
  }

  .hero-copy {
    left: 4%;
    width: 47vw;
  }
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
    min-height: 64px;
    padding: 0 0.75rem;
  }

  .brand {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
  }

  .menu-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    color: var(--ink);
    background: transparent;
  }

  .main-nav {
    position: absolute;
    top: 61px;
    left: 0.75rem;
    right: 0.75rem;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.5rem 1rem;
    background: rgba(255, 253, 248, 0.97);
    box-shadow: 0 16px 36px rgba(74, 82, 78, 0.13);
  }

  .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 {
    min-height: max(740px, 100svh);
  }

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

  .hero-copy {
    top: 20%;
    left: 50%;
    width: min(90%, 420px);
    transform: translateX(-50%);
  }

  .hero-kicker {
    font-size: 0.64rem;
  }

  .hero-copy h1 {
    gap: 0.06em;
    margin-top: 0.25rem;
    font-size: clamp(3.7rem, 18vw, 5.3rem);
  }

  .hero-date {
    font-size: 0.72rem;
  }

  .hero-heart {
    margin: 0.7rem 0 0.85rem;
  }

  .countdown-label {
    font-size: 0.56rem;
  }

  .timer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0.55rem;
    padding: 0.7rem 0.2rem;
    background: rgba(255, 253, 248, 0.54);
  }

  .timer article {
    padding: 0 0.35rem;
  }

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

  .timer span {
    font-size: 0.43rem;
    letter-spacing: 0.09em;
  }

  .schedule-grid {
    grid-template-columns: repeat(4, minmax(116px, 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;
  }

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

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

  .gallery-grid a:first-child {
    grid-column: 1 / -1;
  }

  .location {
    gap: 2.5rem;
  }

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

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

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

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

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

  .hero-copy h1 {
    flex-wrap: wrap;
    font-size: clamp(3.4rem, 18vw, 4.7rem);
  }

  .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: 300px;
  }
}
@media (max-width: 600px) {
  html { scrollbar-width: none; }
  body::-webkit-scrollbar { display: none; }
}
