:root {
  color-scheme: light;
  --paper: #f6f3ee;
  --paper-deep: #ece6dc;
  --ink: #302d29;
  --muted: #777168;
  --accent: #9a765e;
  --line: #d9d0c5;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 100svh;
  padding: clamp(20px, 4vw, 64px);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  overflow: hidden;
}

.cover-photo {
  height: min(88svh, 900px);
  min-height: 520px;
  background: var(--paper-deep);
}

.photo-frame {
  position: relative;
  overflow: hidden;
}

.wedding-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-deep);
}

.cover-image {
  object-fit: contain;
  padding: 10px;
}

.cover-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 30px 5vw 30px 0;
  animation: arrive 900ms ease both;
}

.eyebrow {
  margin: 0 0 19px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1,
h2,
.footer-names {
  font-family: var(--serif);
  font-weight: 400;
}

.cover h1 {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.8vw, 12px);
  margin: 0;
  font-size: clamp(28px, 4vw, 58px);
  letter-spacing: -0.055em;
  line-height: 1.04;
  text-transform: uppercase;
  white-space: nowrap;
}

.cover h1 .ampersand,
.couple-names span,
.footer-names span {
  color: var(--accent);
  font-style: italic;
}

.cover h1 .ampersand {
  flex: 0 0 auto;
}

.small-rule {
  display: block;
  width: 46px;
  height: 1px;
  margin: 32px 0 24px;
  background: var(--accent);
}

.cover-note {
  margin: 0 0 32px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 25px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--paper);
}

.button span {
  font-size: 16px;
}

.scroll-cue {
  position: absolute;
  right: 50%;
  bottom: 22px;
  display: flex;
  width: 24px;
  height: 38px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.scroll-cue span {
  width: 2px;
  height: 7px;
  margin-top: 7px;
  background: var(--accent);
  animation: scroll 1.6s ease-in-out infinite;
}

.section-shell {
  padding: clamp(86px, 12vw, 160px) 24px;
}

.invitation,
.album,
.event {
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 66px);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.invitation {
  background: #eee9e1;
}

.invitation-text,
.story-copy > p:not(.eyebrow),
.section-lead {
  max-width: 520px;
  margin: 24px auto 0;
  color: var(--muted);
}

.couple-names {
  margin-top: 43px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 23px);
}

.story {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(48px, 9vw, 140px);
  max-width: 1200px;
  margin: 0 auto;
}

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

.story-copy > p:not(.eyebrow) {
  margin-left: 0;
}

.portrait-frame {
  height: min(72vw, 650px);
  min-height: 400px;
  background: var(--paper-deep);
}

.portrait-frame .wedding-photo {
  object-fit: contain;
}

figcaption,
.album-caption {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.portrait-frame figcaption {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  color: white;
  text-align: center;
  text-shadow: 0 1px 8px #0008;
  pointer-events: none;
}

.album {
  background: #eee9e1;
}

.album-grid {
  display: grid;
  width: min(100%, 980px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 45px auto 0;
}

.album-frame {
  height: min(68vw, 610px);
  min-height: 330px;
  margin: 0;
  background: var(--paper-deep);
}

.album-frame .wedding-photo {
  object-fit: contain;
}

.album-video-frame {
  grid-column: 1 / -1;
  width: min(100%, 360px);
  height: auto;
  min-height: 0;
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.album-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #211f1d;
  object-fit: contain;
}

.zoom-photo {
  cursor: zoom-in;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.zoom-photo:hover {
  transform: scale(1.025);
}

.album-caption {
  margin: 18px 0 0;
}

.event-card {
  width: min(100%, 540px);
  margin: 44px auto 0;
  padding: 35px 24px;
  border: 1px solid var(--line);
}

.event-label {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.event-placeholder {
  margin: 8px 0 0;
  color: var(--muted);
}

.directions-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.directions-link:hover {
  color: var(--ink);
}

.event-divider {
  display: block;
  width: 35px;
  height: 1px;
  margin: 25px auto;
  background: var(--line);
}

.event-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  padding: 68px 24px 60px;
  background: #302d29;
  color: var(--paper);
  text-align: center;
}

.footer .eyebrow {
  color: #c3a58d;
}

.footer-names {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.footer-names span {
  color: #c3a58d;
}

.footer-small {
  margin: 12px 0 0;
  color: #c7c0b8;
  font-size: 12px;
}

.lightbox {
  position: fixed;
  width: min(96vw, 1200px);
  max-width: none;
  height: min(94svh, 1000px);
  max-height: none;
  padding: 42px 18px 18px;
  border: 0;
  background: #171614;
}

.lightbox::backdrop {
  background: rgb(20 19 17 / 92%);
}

.lightbox-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 5px;
  right: 13px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font: 32px/1 var(--sans);
}

.image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  background: #e9e2d8;
  color: #62594f;
  text-align: center;
}

.image-fallback strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.image-fallback span {
  font-size: 12px;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@keyframes scroll {
  0%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(8px);
  }
}

@media (max-width: 760px) {
  .cover {
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 14px 14px 54px;
  }

  .cover-photo {
    width: 100%;
    height: 56svh;
    min-height: 340px;
    max-height: 620px;
  }

  .cover-image {
    padding: 4px;
  }

  .cover-copy {
    width: 100%;
    max-width: 520px;
    padding: 28px 10px 0;
    text-align: center;
  }

  .cover .eyebrow {
    margin-bottom: 10px;
  }

  .cover h1 {
    justify-content: center;
    gap: clamp(4px, 1vw, 9px);
    font-size: clamp(24px, 7.2vw, 48px);
  }

  .small-rule {
    margin: 16px auto 12px;
  }

  .cover-note {
    margin-bottom: 19px;
    font-size: 17px;
  }

  .button {
    min-height: 47px;
  }

  .scroll-cue {
    right: calc(50% - 12px);
    bottom: 9px;
  }

  .story {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .story-copy {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
  }

  .story-copy > p:not(.eyebrow) {
    margin-right: auto;
    margin-left: auto;
  }

  .portrait-frame {
    width: min(100%, 550px);
    height: min(120vw, 640px);
    min-height: 360px;
    margin: 0 auto;
  }

  .album-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .album-frame {
    height: min(95vw, 520px);
    min-height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
