* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --paper: #fbf7f0;
  --paper-dark: #f0e7da;
  --ink: #332b27;
  --muted: #786d66;
  --accent: #9a6a52;
  --accent-dark: #704838;
  --white: #fffdf9;
  --line: rgba(51, 43, 39, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

button, a {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(rgba(30, 22, 18, 0.22), rgba(30, 22, 18, 0.5)),
    url("images/hero.svg") center/cover no-repeat,
    #5e4a3f;
  color: white;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 30px 20px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(58px, 13vw, 110px);
  line-height: .85;
  font-weight: 500;
}

.heart {
  color: #d9a18b;
  font-size: .55em;
  vertical-align: middle;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: 26px;
  margin: 28px 0 34px;
  font-style: italic;
}

.primary-btn,
.secondary-btn {
  border: 1px solid rgba(255,255,255,.65);
  background: transparent;
  color: inherit;
  padding: 15px 22px;
  border-radius: 999px;
  letter-spacing: .08em;
  font-size: 11px;
  text-transform: uppercase;
  transition: .3s ease;
}

.primary-btn:hover {
  background: white;
  color: var(--ink);
  transform: translateY(-2px);
}

.secondary-btn {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.secondary-btn:hover {
  background: var(--ink);
  color: white;
}

.scroll-hint {
  margin-top: 45px;
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .75;
  animation: breathe 2.5s infinite;
}

.section {
  padding: 110px 22px;
}

.section-inner {
  width: min(680px, 100%);
  margin: auto;
  text-align: center;
}

.intro h2,
.event-section h2,
.story-section h2,
.modal-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 10vw, 78px);
  line-height: .9;
}

.intro h2 em,
.event-section h2 em,
.story-section h2 em,
.modal-card h2 em {
  color: var(--accent);
}

.ornament {
  margin: 30px 0;
  color: var(--accent);
  font-size: 20px;
}

.body-copy {
  max-width: 520px;
  margin: auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.photo-section {
  padding: 35px 18px 110px;
}

.photo-frame {
  position: relative;
  width: min(850px, 100%);
  height: min(115vw, 720px);
  margin: auto;
  overflow: hidden;
  background: var(--paper-dark);
}

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

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 65px 25px 25px;
  text-align: center;
  color: white;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  font-family: var(--serif);
  font-size: 30px;
}

.photo-caption small {
  display: block;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-top: 7px;
  opacity: .85;
}

.date-section {
  background: var(--paper-dark);
}

.date-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 25px 0 45px;
}

.date-day {
  font-family: var(--serif);
  font-size: clamp(110px, 28vw, 190px);
  line-height: .65;
  font-weight: 400;
}

.date-month {
  font-size: 12px;
  letter-spacing: .4em;
  margin-top: 35px;
}

.date-year {
  font-family: var(--serif);
  font-size: 30px;
  margin-top: 8px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 500px;
  margin: 0 auto 35px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.countdown div {
  border-right: 1px solid var(--line);
}

.countdown div:last-child {
  border: 0;
}

.countdown strong {
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.countdown span {
  font-size: 8px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-section {
  background: var(--paper);
}

.event-card {
  margin: 30px auto;
  padding: 38px 25px;
  border: 1px solid var(--line);
  max-width: 500px;
  background: rgba(255,255,255,.25);
}

.event-icon {
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 18px;
}

.card-label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .25em;
  margin-bottom: 12px;
}

.event-card h3 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
}

.event-card p:not(.card-label) {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.inline-btn {
  display: inline-block;
  text-decoration: none;
  margin-top: 22px;
}

.story-section {
  background: var(--paper-dark);
}

.story-list {
  max-width: 650px;
  margin: 45px auto 0;
  text-align: left;
}

.story-item {
  width: 100%;
  display: grid;
  grid-template-columns: 55px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.story-item:last-of-type {
  border-bottom: 1px solid var(--line);
}

.story-number {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--accent);
}

.story-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.story-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.plus {
  font-size: 22px;
  transition: .3s;
}

.story-item.open .plus {
  transform: rotate(45deg);
}

.story-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s ease;
}

.story-content p {
  padding: 0 45px 25px 65px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.message-section {
  min-height: 75svh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  background:
    linear-gradient(rgba(40,30,25,.25), rgba(40,30,25,.5)),
    url("images/message-bg.svg") center/cover no-repeat,
    #5e4a3f;
}

.message-card {
  width: min(500px, 100%);
  text-align: center;
  padding: 65px 25px;
  color: white;
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(5px);
  background: rgba(30,20,15,.18);
}

.message-card h2 {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 500;
  margin-bottom: 30px;
}

.envelope {
  font-size: 42px;
  margin-bottom: 22px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30,20,15,.72);
  backdrop-filter: blur(7px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(550px, 100%);
  padding: 55px 28px;
  text-align: center;
  background: var(--paper);
}

.modal-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin-top: 25px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 30px;
  color: var(--muted);
}

.footer-section {
  padding-bottom: 60px;
}

.footer-section h2 {
  font-family: var(--serif);
  font-size: clamp(50px, 12vw, 80px);
  font-weight: 500;
}

.footer-section #footerDate {
  margin-top: 15px;
  color: var(--muted);
}

.small-copy {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .1em;
}

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity .9s ease, transform .9s ease;
}

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

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  background: var(--paper);
  transition: opacity .8s, visibility .8s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
}

.loader-ring {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  50% { opacity: .35; transform: translateY(5px); }
}

@media (min-width: 700px) {
  .photo-frame {
    height: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
