@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --background: #fcf7ed;
  --surface: #fffaf1;
  --surface-accent: #f6edd7;
  --text: #2f241b;
  --muted: #76614d;
  --accent: #8a5a2b;
  --border: rgba(47, 36, 27, 0.16);
  --display: "Instrument Serif", Georgia, serif;
  --body: "Instrument Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--body);
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

.display {
  font-family: var(--display);
}

.site-nav {
  position: fixed;
  z-index: 60;
  top: 18px;
  right: 16px;
  left: 16px;
}

.nav-inner {
  position: relative;
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-size: 18px;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  color: #fff9f1;
  background: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease;
}

.pill-button:hover {
  transform: scale(1.04);
}

.nav-rsvp {
  padding: 7px 16px;
  font-size: 12px;
}

.menu-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  place-content: center;
  gap: 5px;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-menu {
  position: absolute;
  top: 62px;
  right: 0;
  min-width: 210px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: 180ms ease;
}

.nav-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav-menu a {
  display: block;
  padding: 10px 12px;
  text-align: right;
  text-decoration: none;
}

.nav-menu form {
  margin: 0;
}

.nav-logout {
  display: block;
  width: 100%;
  border: 0;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.hero {
  min-height: 100svh;
  padding: 4px;
}

.hero-frame,
.footer-frame {
  position: relative;
  min-height: calc(100svh - 8px);
  overflow: hidden;
  border-radius: 24px;
}

.hero-image,
.footer-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.footer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(21, 16, 11, 0.2);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100svh - 8px);
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 28px 28px;
  color: #fff;
}

.hero-title {
  margin: 0 auto 44px;
  font-family: var(--display);
  font-size: clamp(5rem, 13vw, 12rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.82;
  text-align: center;
}

.scroll-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.scroll-arrow {
  font-size: 22px;
  animation: bounce 1.8s infinite;
}

@keyframes bounce {
  50% { transform: translateY(5px); }
}

.statement {
  display: grid;
  min-height: 65svh;
  place-items: center;
  padding: 96px 24px;
  text-align: center;
}

.statement p {
  max-width: 1200px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: 1.02;
}

.reveal-word {
  opacity: 0.28;
  transition: opacity 220ms ease;
}

.story-section {
  padding: 80px 24px 120px;
  background: var(--surface);
}

.section-title {
  margin: 0 0 64px;
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  line-height: 0.88;
  text-align: center;
}

.story-chapters {
  display: grid;
  max-width: 1400px;
  margin: 0 auto;
  gap: 96px;
}

.story-chapter {
  display: grid;
  gap: 36px;
}

.story-moment {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--background);
  text-align: center;
}

.story-moment h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1;
}

.story-moment p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.photo-card {
  position: relative;
  border: 0;
  padding: 12px 12px 44px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(40, 28, 19, 0.14);
  cursor: zoom-in;
  transform: rotate(var(--tilt, -1deg));
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.photo-card:nth-child(2n) {
  --tilt: 1.5deg;
}

.photo-card:nth-child(3n) {
  --tilt: -2deg;
}

.photo-card:hover {
  z-index: 2;
  box-shadow: 0 22px 50px rgba(40, 28, 19, 0.2);
  transform: rotate(0) translateY(-6px);
}

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

.photo-card span {
  position: absolute;
  right: 8px;
  bottom: 12px;
  left: 8px;
  overflow: hidden;
  color: #5d5148;
  font-family: var(--display);
  font-size: 17px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics {
  padding: 120px 24px;
  text-align: center;
  background: var(--surface-accent);
}

.logistics-kicker,
.written-date,
.venue-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
}

.logistics-kicker {
  font-size: clamp(3rem, 7vw, 5rem);
}

.written-date {
  margin-top: 18px;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.9;
}

.countdown {
  display: flex;
  max-width: 760px;
  margin: 64px auto 96px;
  justify-content: center;
  gap: clamp(10px, 3vw, 30px);
}

.countdown-item {
  min-width: 80px;
}

.countdown-number {
  display: block;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
}

.countdown-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.venue-image {
  width: min(100%, 1120px);
  max-height: 580px;
  margin: 0 auto 58px;
  border-radius: 24px;
  object-fit: cover;
}

.venue-name {
  font-size: clamp(3rem, 7vw, 5rem);
}

.venue-address {
  display: inline-block;
  margin: 18px 0 64px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deadline {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.details-section {
  padding: 110px 32px 130px;
}

.details-heading {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.details-intro {
  max-width: 780px;
  margin: 22px auto 50px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.details-grid {
  display: grid;
  max-width: 1100px;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.detail-card {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  padding: 30px;
  color: #fff;
  background: #33281e;
  text-align: left;
  cursor: pointer;
}

.detail-card img,
.detail-card::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-card img {
  object-fit: cover;
  transition: transform 600ms ease;
}

.detail-card::after {
  content: "";
  background: linear-gradient(transparent 25%, rgba(0, 0, 0, 0.72));
}

.detail-card:hover img {
  transform: scale(1.05);
}

.detail-copy {
  position: absolute;
  z-index: 1;
  right: 30px;
  bottom: 30px;
  left: 30px;
}

.detail-copy strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 400;
  line-height: 0.95;
}

.detail-copy span {
  display: block;
  margin-top: 10px;
  font-size: 17px;
}

.faq-section {
  padding: 120px 24px;
}

.faq-layout {
  display: grid;
  max-width: 1120px;
  margin: 0 auto;
  grid-template-columns: 1fr 2fr;
  gap: 90px;
}

.faq-heading {
  position: sticky;
  top: 120px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: 0.9;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  padding: 24px 0;
  color: var(--text);
  background: none;
  font-size: 19px;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  flex: 0 0 auto;
  transition: transform 220ms ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  color: var(--muted);
  transition: grid-template-rows 250ms ease, padding 250ms ease;
}

.faq-answer > div {
  overflow: hidden;
  white-space: pre-line;
}

.faq-answer.open {
  grid-template-rows: 1fr;
  padding-bottom: 26px;
}

.footer {
  height: 100svh;
  padding: 12px;
}

.footer-frame {
  display: grid;
  place-items: center;
}

.footer-overlay {
  background: rgba(17, 12, 9, 0.52);
}

.footer-quote {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0;
  padding: 30px;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 0.92;
  text-align: center;
}

.footer-credit {
  position: absolute;
  z-index: 1;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 16, 12, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

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

.modal-panel {
  position: relative;
  width: min(100%, 740px);
  max-height: 90svh;
  overflow: auto;
  border-radius: 28px;
  padding: 42px;
  background: var(--surface);
  transform: translateY(15px);
  transition: transform 220ms ease;
}

.modal.open .modal-panel {
  transform: none;
}

.modal-panel.photo-panel {
  width: min(100%, 1050px);
  padding: 12px 12px 22px;
  background: #fff;
}

.modal-panel.photo-panel img {
  width: 100%;
  max-height: 78svh;
  object-fit: contain;
}

.modal-panel h2 {
  margin: 0 38px 16px 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
}

.modal-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  white-space: pre-line;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  font-size: 25px;
  cursor: pointer;
}

.rsvp-page {
  min-height: 100svh;
  background: var(--background);
}

.rsvp-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 70px 24px;
}

.rsvp-card {
  width: min(100%, 670px);
}

.rsvp-exit {
  position: fixed;
  top: 28px;
  right: 30px;
  font-size: 30px;
  text-decoration: none;
}

.rsvp-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 400;
  text-align: center;
}

.rsvp-subtitle {
  margin: 8px 0 58px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

.rsvp-form {
  display: grid;
  gap: 28px;
}

.rsvp-form input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  color: var(--text);
  background: transparent;
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  outline: none;
}

.rsvp-form input:focus {
  border-color: var(--accent);
}

.rsvp-submit {
  width: 58px;
  height: 58px;
  margin: 20px 0 0 auto;
  border: 1px solid var(--text);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.rsvp-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  text-align: right;
}

.rsvp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
}

.rsvp-back {
  border: 0;
  padding: 12px 0;
  color: var(--muted);
  background: none;
  text-decoration: underline;
  cursor: pointer;
}

.rsvp-party-card,
.attendance-row,
.rsvp-review {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  background: var(--surface);
}

.rsvp-party-card {
  display: grid;
  gap: 8px;
  font-family: var(--display);
  font-size: 30px;
}

.attendance-list {
  display: grid;
  gap: 18px;
}

.attendance-row {
  display: grid;
  gap: 12px;
}

.attendance-row legend {
  padding: 0 8px;
  font-family: var(--display);
  font-size: 28px;
}

.attendance-row label {
  cursor: pointer;
}

.rsvp-details-form {
  display: grid;
  gap: 30px;
}

.rsvp-details-form label {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.rsvp-details-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.rsvp-review {
  display: grid;
  gap: 20px;
}

.rsvp-review p {
  display: grid;
  margin: 0;
  gap: 4px;
}

.rsvp-review span {
  color: var(--muted);
  white-space: pre-line;
}

.rsvp-confirmation {
  max-width: 560px;
  margin: 20px auto 36px;
  color: var(--muted);
  font-size: 19px;
  text-align: center;
}

.rsvp-home-button {
  display: flex;
  width: max-content;
  margin: 0 auto;
}

.click-heart {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  color: #b52d3a;
  font-size: 22px;
  animation: heart-pop 900ms ease-out forwards;
}

@keyframes heart-pop {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 0; transform: translate(calc(-50% + var(--heart-x)), calc(-50% - 90px)) scale(1.5) rotate(var(--heart-r)); }
}

@media (max-width: 900px) {
  .photo-grid,
  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .faq-heading {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-nav {
    top: 12px;
    right: 10px;
    left: 10px;
  }

  .nav-rsvp {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-title {
    margin-bottom: 30px;
    font-size: clamp(4.25rem, 20vw, 7rem);
  }

  .hero-content {
    padding: 0 20px 22px;
  }

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

  .story-section,
  .logistics,
  .details-section,
  .faq-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .story-moment {
    padding: 24px;
  }

  .countdown {
    gap: 2px;
  }

  .countdown-item {
    min-width: 67px;
  }

  .details-section {
    padding-top: 90px;
  }

  .detail-card {
    min-height: 330px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    padding: 32px 24px;
  }

}

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