*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #253129;
  --ink-soft: #6E746F;
  --green: #455A4C;
  --green-deep: #283A31;
  --rust: #8E5A49;
  --gold: #D5B46D;
  --gold-deep: #A8843D;
  --cream: #FFF9F1;
  --paper: #F4EADF;
  --line: rgba(37,49,41,.12);
  --shadow: 0 26px 70px rgba(37,49,41,.15);
  --shadow-soft: 0 14px 34px rgba(37,49,41,.09);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(213,180,109,.15), transparent 24%),
    radial-gradient(circle at 10% 26%, rgba(69,90,76,.10), transparent 20%),
    linear-gradient(180deg, #FFF9F1 0%, #EEE5DB 100%);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.7;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

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

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

h1,
h2,
h3,
blockquote {
  margin: 0;
  font-family: Fraunces, "Playfair Display", Georgia, serif;
  line-height: 1.05;
}

p {
  margin: 0;
}

.eyebrow {
  color: var(--gold-deep);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--gold {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(213,180,109,.20);
}

.button--green {
  color: #fff;
  background: var(--green);
}

.button--soft {
  color: var(--ink);
  border-color: var(--line);
  background: var(--cream);
}

.button--outline {
  color: #fff;
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.05);
}

.button--wide {
  width: 100%;
}

.text-link {
  margin-top: 24px;
  padding: 0;
  border: 0;
  color: var(--rust);
  background: none;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 34px;
  padding: 18px;
  overflow: auto;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  transition: opacity .4s ease, visibility .4s ease;
}

.opening.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening__book {
  width: min(330px, 72vw);
  padding: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  box-shadow: 0 30px 70px rgba(0,0,0,.28);
  transform: rotate(-3deg);
}

.opening__book img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.opening__copy {
  max-width: 650px;
  text-align: center;
}

.opening .eyebrow {
  color: #E7D29A;
}

.opening__copy h1 {
  margin-top: 12px;
  color: #fff;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
}

.opening__copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: rgba(255,255,255,.74);
  font-family: Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
}

.opening__copy .button {
  margin-top: 30px;
}

.hero {
  position: relative;
  min-height: 920px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 16%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31 0%, #725443 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.topbar {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  font-family: Georgia, serif;
  font-weight: 700;
}

.topbar__actions {
  display: flex;
  gap: 18px;
}

.topbar__button {
  padding: 0;
  border: 0;
  color: rgba(255,255,255,.78);
  background: none;
  cursor: pointer;
}

.topbar__button:hover,
.topbar__button:focus-visible {
  color: var(--gold);
}

.hero__layout {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 148px;
  display: grid;
  gap: 60px;
  align-items: center;
}

.hero__copy {
  max-width: 700px;
}

.hero__copy .eyebrow {
  color: #E7D29A;
}

.hero h1 {
  margin-top: 16px;
  color: #fff;
  font-size: clamp(4rem, 9vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -.055em;
}

.hero h1 span {
  display: block;
  color: var(--gold);
  font-size: .42em;
  font-style: italic;
}

.hero__lead {
  margin-top: 24px;
  color: rgba(255,255,255,.72);
  font-family: Georgia, serif;
  font-size: clamp(1.08rem, 2.2vw, 1.4rem);
  font-style: italic;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero__meta span {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.04);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__visual {
  position: relative;
  min-height: 580px;
}

.hero__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 86%;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  box-shadow: 0 28px 76px rgba(0,0,0,.22);
  transform: rotate(2.5deg);
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  background: rgba(255,255,255,.03);
}

.hero__caption {
  position: absolute;
  left: 0;
  top: 56px;
  z-index: 2;
  width: min(230px, 62%);
  padding: 22px;
  border-left: 10px solid var(--gold);
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 18px 36px rgba(0,0,0,.16);
  transform: rotate(-6deg);
}

.hero__caption span {
  color: var(--rust);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.hero__caption strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
}

.audio-dock {
  position: absolute;
  right: 50%;
  bottom: 26px;
  z-index: 2;
  width: min(720px, calc(100% - 36px));
  transform: translateX(50%);
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 12px 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(40,58,49,.84);
  backdrop-filter: blur(10px);
}

.audio-dock__play {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--gold);
  cursor: pointer;
}

.audio-dock__meta strong {
  display: block;
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 500;
}

.audio-dock__meta span {
  color: rgba(255,255,255,.60);
  font-size: .82rem;
}

.audio-dock__progress {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--gold);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 46px;
}

.section-heading--split {
  display: grid;
  gap: 20px;
  max-width: none;
  align-items: end;
}

.section-heading h2,
.book-layout h2,
.rsvp-layout h2,
.closing-panel h2,
.modal__panel h2 {
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.section-heading > p:not(.eyebrow),
.section-heading--split > p,
.book-layout__copy > p:not(.eyebrow),
.rsvp-layout__intro > p:not(.eyebrow),
.closing-panel__copy > p:not(.eyebrow),
.modal__copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--ink-soft);
}

.countdown {
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(213,180,109,.18), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.countdown .eyebrow {
  color: #E7D29A;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 26px;
  border-top: 1px solid rgba(255,255,255,.22);
  border-bottom: 1px solid rgba(255,255,255,.22);
}

.countdown__grid > div {
  padding: 24px 14px;
  text-align: center;
}

.countdown__grid > div + div {
  border-left: 1px solid rgba(255,255,255,.22);
}

.countdown__grid strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 500;
}

.countdown__grid span {
  display: block;
  margin-top: 6px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.countdown__caption {
  margin-top: 20px;
  color: rgba(255,255,255,.66);
}

.book-layout,
.author-layout,
.rsvp-layout {
  display: grid;
  gap: 30px;
  align-items: center;
}

.book-layout {
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.book-layout__cover {
  margin: 0;
  padding: 14px;
  background: var(--paper);
}

.book-layout__cover img {
  width: 100%;
  max-height: 720px;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.author-layout__photo {
  margin: 0;
  padding: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.author-layout__photo img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
}

.author-layout__copy {
  padding: clamp(10px, 4vw, 28px);
}

.author-layout__copy > p {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.08rem;
}

.author-layout__copy > p + p {
  margin-top: 22px;
}

.author-layout blockquote {
  margin: 34px 0 0;
  padding-left: 24px;
  border-left: 7px solid var(--gold);
  color: var(--rust);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-style: italic;
  line-height: 1.45;
}

.gallery-grid {
  display: grid;
  gap: 18px;
}

.gallery-card {
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: left;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: contain;
  background: var(--paper);
}

.gallery-card span {
  display: block;
  margin-top: 16px;
  color: var(--gold-deep);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.gallery-card strong {
  display: block;
  margin: 8px 6px 8px;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}

.detail-grid {
  display: grid;
  gap: 16px;
}

.detail-card {
  min-height: 300px;
  padding: 30px;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.detail-card > span {
  display: block;
  font-family: Georgia, serif;
  font-size: 3.8rem;
  line-height: 1;
  opacity: .22;
}

.detail-card h3 {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 500;
}

.detail-card p:not(.eyebrow) {
  margin-top: 12px;
}

.detail-card a {
  display: inline-block;
  margin-top: 22px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.detail-card--green {
  color: #fff;
  background: var(--green);
}

.detail-card--green .eyebrow {
  color: var(--gold);
}

.detail-card--green p:not(.eyebrow) {
  color: rgba(255,255,255,.68);
}

.detail-card--paper {
  background: var(--cream);
}

.detail-card--gold {
  background: var(--gold);
}

.detail-card--gold .eyebrow {
  color: var(--ink);
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.rsvp-layout {
  padding: clamp(30px, 6vw, 58px);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(213,180,109,.16), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.rsvp-layout .eyebrow {
  color: #E7D29A;
}

.rsvp-layout h2 {
  color: #fff;
}

.rsvp-layout__intro > p:not(.eyebrow) {
  color: rgba(255,255,255,.68);
}

.rsvp-ticket {
  margin-top: 30px;
  padding: 20px;
  border-left: 10px solid var(--gold);
  color: var(--ink);
  background: var(--gold);
}

.rsvp-ticket span,
.rsvp-ticket small {
  display: block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.rsvp-ticket strong {
  display: block;
  margin: 8px 0;
  font-family: Georgia, serif;
  font-size: 1.8rem;
}

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

.rsvp-form label,
.rsvp-form legend {
  color: rgba(255,255,255,.84);
  font-size: .9rem;
  font-weight: 900;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form textarea {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.06);
  outline: none;
}

.rsvp-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.04);
  text-align: center;
  cursor: pointer;
}

.choice input:checked + span {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold);
}

.closing-panel {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(42px, 7vw, 76px);
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(213,180,109,.16), transparent 24%),
    linear-gradient(135deg, #283A31, #725443);
  box-shadow: var(--shadow);
}

.closing-panel__word {
  position: absolute;
  right: -20px;
  bottom: -40px;
  color: rgba(255,255,255,.06);
  font-family: Georgia, serif;
  font-size: clamp(9rem, 24vw, 18rem);
  line-height: 1;
}

.closing-panel__copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.closing-panel .eyebrow {
  color: #E7D29A;
}

.closing-panel h2 {
  color: #fff;
}

.closing-panel__copy > p:not(.eyebrow) {
  color: rgba(255,255,255,.72);
}

.closing-panel__signature {
  margin-top: 28px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 2.2rem;
  font-style: italic;
}

.footer {
  padding: 0 18px 34px;
  color: var(--ink-soft);
  font-size: .9rem;
  text-align: center;
}

.footer a {
  color: var(--ink);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37,49,41,.82);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 30px;
  background: var(--cream);
  box-shadow: 0 34px 90px rgba(37,49,41,.30);
}

.modal__close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--rust);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal__panel--reading {
  width: min(760px, 100%);
  padding: clamp(38px, 7vw, 68px);
}

.reading {
  margin-top: 30px;
}

.reading p {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.95;
}

.reading p + p {
  margin-top: 20px;
}

.modal__panel--gallery {
  display: grid;
  gap: 22px;
  padding: 18px;
}

.modal__panel--gallery img {
  width: 100%;
  min-height: 360px;
  border-radius: 20px;
  object-fit: contain;
  background: var(--paper);
}

.modal__copy {
  padding: 16px 12px 24px;
}

.modal__panel--ticket {
  width: min(1100px, 100%);
  padding: 18px;
}

.modal__panel--ticket iframe {
  width: 100%;
  height: min(82vh, 880px);
  border: 0;
  border-radius: 20px;
  background: #fff;
}

.modal__panel--success {
  width: min(640px, 100%);
  padding: clamp(38px, 7vw, 60px);
}

.modal__panel--success > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  z-index: 90;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 18px;
  border-radius: 14px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-weight: 900;
}

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

@media (min-width: 820px) {
  .opening {
    grid-template-columns: minmax(280px,.75fr) minmax(0,1.25fr);
  }
}

@media (min-width: 900px) {
  .hero__layout {
    grid-template-columns: minmax(0,1fr) minmax(420px,.92fr);
  }

  .section-heading--split {
    grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr);
  }

  .book-layout,
  .author-layout,
  .rsvp-layout {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

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

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

  .modal__panel--gallery {
    grid-template-columns: minmax(0,1.08fr) minmax(300px,.92fr);
    align-items: center;
  }
}

@media (max-width: 899px) {
  .hero {
    min-height: auto;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__meta,
  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    min-height: 520px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar__actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 17vw, 5.2rem);
  }

  .hero__actions,
  .details-actions {
    flex-direction: column;
  }

  .hero__actions .button,
  .details-actions .button {
    width: 100%;
  }

  .hero__visual {
    min-height: 430px;
  }

  .hero__photo {
    width: 92%;
  }

  .section {
    padding: 70px 0;
  }

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

  .countdown__grid > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.22);
  }

  .countdown__grid > div:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,.22);
  }
}

@media (max-height: 760px) and (min-width: 641px) {
  .opening {
    gap: 22px;
  }

  .opening__book {
    width: min(240px, 36vh);
  }

  .opening__copy h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
  }

  .opening__copy > p:not(.eyebrow) {
    margin-top: 12px;
  }

  .opening__copy .button {
    margin-top: 22px;
  }
}
