:root {
  --paper: #fbf7ee;
  --paper-deep: #f2ead8;
  --ink: #493b2e;
  --gold: #b18b50;
  --gold-light: #d2b170;
  --line: #c9a762;
  --white: #fffdf8;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --script: "Great Vibes", cursive;
  --arabic: "Amiri", serif;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --pad: clamp(24px, 6vw, 88px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

.cover {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  --cover-pad: 18px;
  --page-w: min(630px, calc(100% - var(--cover-pad) * 2));
  --page-h: min(900px, calc(100dvh - var(--cover-pad) * 2));
  padding: var(--cover-pad);
  perspective: 1800px;
  overflow: hidden;
  background: radial-gradient(ellipse at center,
      #f8f2e7 0%,
      #eee4d2 72%,
      #e8dcc7 100%);
  opacity: 1;
  transition:
    opacity 0.55s ease 0.78s,
    visibility 0s linear 1.33s;
}

.cover.is-open {
  pointer-events: none;
}

.cover.is-open .back-button,
.cover.is-open .next-button {
  pointer-events: auto;
}

.cover::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: var(--page-w);
  height: var(--page-h);
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 0 29px 29px 0;
  background: var(--paper);
  box-shadow: 8px 14px 30px #493b2e1a;
  content: "";
  opacity: 0;
  transform: translate(-50%, -50%);
  transform-origin: left center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: opacity 0.45s ease;
}

.back-page-sheet {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: var(--page-w);
  height: var(--page-h);
  border: 1px solid var(--line);
  border-radius: 0 29px 29px 0;
  background: var(--paper);
  box-shadow: 8px 14px 30px #493b2e1a;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(0.42, 0, 0.18, 1);
}

.back-page-sheet::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--paper);
  box-shadow: inset 8px 0 16px #493b2e0d;
  content: "";
  transform: rotateY(180deg) translateZ(1px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}

.cover.is-open::after {
  opacity: 1;
}

.cover.is-open .back-page-sheet {
  opacity: 1;
}

.back-page-note {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(470px, 72%);
  justify-items: center;
  gap: 17px;
  padding: 56px 36px 48px;
  border: 1px solid #d7c39b;
  border-radius: 220px 220px 18px 18px;
  background:
    radial-gradient(ellipse at 50% 0%, #e9ddc6 0, transparent 56%),
    linear-gradient(135deg, #fffdf8 0%, #f8f1e4 48%, #fffdf8 100%);
  box-shadow:
    0 20px 54px #493b2e12,
    inset 0 0 0 7px #fbf7ee,
    inset 0 0 0 8px #d7c39b66;
  color: #75634e;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -54%) scale(0.98);
  transition:
    opacity 0.55s ease 0.45s,
    transform 0.7s var(--ease) 0.45s;
  pointer-events: none;
}

.back-page-note::before,
.back-page-note::after {
  position: absolute;
  left: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid #c9a76299;
  content: "";
  transform: translateX(-50%) rotate(45deg);
  pointer-events: none;
}

.back-page-note::before {
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9a762;
  box-shadow: 0 0 0 6px #fbf7ee, 0 0 0 7px #c9a76288;
}

.back-page-note::after {
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-color: #c9a76277;
  border-radius: 50% 50% 3px 50%;
}

.back-page-flower {
  display: block;
  width: 246px;
  height: 246px;
  margin: -72px 0 4px;
  object-fit: contain;
}

.back-page-divider {
  display: block;
  width: min(210px, 72%);
  height: 58px;
  margin-top: -13px;
  object-fit: contain;
  opacity: 0.8;
}

.back-page-kicker {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.back-page-title {
  margin: 0;
  color: var(--ink);
  font: clamp(27px, 4vw, 39px)/1.2 var(--serif);
}

.back-page-rule {
  width: 52px;
  height: 1px;
  background: var(--line);
}

.back-page-copy {
  max-width: 290px;
  margin: 0;
  font: 16px/1.8 var(--serif);
}

.back-page-couple {
  margin-top: 8px;
  color: var(--ink);
  font: 19px var(--script);
}

.back-page-couple i {
  color: var(--gold);
  font: italic 17px var(--serif);
}

.back-page-date {
  margin-top: 1px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.back-button,
.next-button {
  position: absolute;
  z-index: 4;
  bottom: max(34px, calc((100% - min(900px, 100dvh - 36px)) / 2 + 32px));
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid #a88245;
  border-radius: 999px;
  box-shadow: 0 8px 22px #493b2e18;
  color: #fffdf8;
  font: 600 13px var(--sans);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0.4s,
    background 0.2s,
    transform 0.25s var(--ease);
}

.back-button {
  left: max(34px, calc((100% - 630px) / 2 + 32px));
  min-width: 132px;
  background: #8e795c;
}

.next-button {
  right: max(34px, calc((100% - 630px) / 2 + 32px));
  min-width: 164px;
  background: var(--gold-light);
}

.arrow-button {
  width: 70px;
  min-width: 70px;
  height: 70px;
  min-height: 70px;
  padding: 13px;
  border: 1px solid #b18b50;
  background: #fbf7ee;
  box-shadow: 0 5px 16px #493b2e16;
}

.arrow-button img {
  display: block;
  width: 125%;
  height: 125%;
  object-fit: contain;
}

.back-button.arrow-button img {
  transform: rotate(180deg);
}

.cover.is-open .back-page-note {
  opacity: 1;
  transform: translate(-50%, -50%);
  visibility: visible;
  transition-delay: 0.65s;
}

.cover.is-open .back-button,
.cover.is-open .next-button {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.65s;
}

.cover.is-open .back-button {
  transform: translateY(0);
}

.cover.is-open .next-button {
  transform: translateY(0);
}

.back-button:hover,
.next-button:hover {
  background: transparent;
  transform: translateY(-2px);
}

.arrow-button:hover {
  filter: drop-shadow(0 4px 8px #493b2e24);
}

.back-button:focus-visible,
.next-button:focus-visible {
  outline: 3px solid #765322;
  outline-offset: 4px;
}

.cover.is-closing::after {
  opacity: 0;
  visibility: hidden;
}

.cover.is-closing .back-page-sheet {
  z-index: 4;
  opacity: 1;
  transform: translate(-50%, -50%) rotateY(-112deg);
}

.cover.is-closing .cover-content>* {
  animation: none !important;
  opacity: 0;
}

.cover.is-closing .back-page-sheet .back-page-note {
  opacity: 1;
  visibility: visible;
}

.cover.is-returning::after {
  opacity: 0;
  visibility: hidden;
}

/* FIX: selector harus lebih spesifik daripada `.cover.is-open .cover-inner`
   (rotateY -112deg), kalau tidak sampul tidak pernah menutup kembali. */
.cover.is-open.is-returning .cover-inner {
  visibility: visible;
  transform: rotateY(0deg);
  transition: transform 1.05s cubic-bezier(0.42, 0, 0.18, 1);
}

.cover.is-returning .back-page-sheet {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) !important;
  transition: none !important;
}

.cover.is-returning .back-page-note {
  z-index: 3;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -54%) scale(0.98);
  transition: none;
}

.cover.is-returning .cover-content>* {
  animation: cover-front-appear 1.05s linear forwards !important;
}

@keyframes cover-front-appear {

  0%,
  55% {
    opacity: 0;
  }

  80%,
  100% {
    opacity: 1;
  }
}

.cover.is-closing.is-finished .back-page-sheet,
.cover.is-closing.is-finished .back-page-note {
  visibility: hidden;
}

.cover.is-finished .cover-inner {
  visibility: hidden;
}

.cover.is-opening {
  opacity: 1;
  visibility: visible;
  transition: none;
}

.cover.is-finished .back-button,
.cover.is-finished .next-button {
  opacity: 0;
  visibility: hidden;
}

.cover.is-finished:not(.is-closing) .back-page-sheet,
.cover.is-finished:not(.is-closing) .back-page-note {
  opacity: 0;
  visibility: hidden;
}

.cover.is-finished {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0s linear 0.45s;
}

.cover.is-closing {
  pointer-events: none;
}

.cover.is-closing .back-button,
.cover.is-closing .next-button,
.cover.is-open.is-returning .back-button,
.cover.is-open.is-returning .next-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s;
}

.cover-inner {
  z-index: 2;
  transform-style: preserve-3d;
}

.cover-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: clamp(14px, 3vh, 28px);
  width: min(630px, 100%);
  /* 100% di sini sudah di dalam padding .cover = sama dengan --page-w */
  height: var(--page-h);
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 0 29px 29px 0;
  background: var(--paper);
  padding: clamp(75px, 12vh, 115px) 25px 76px;
  box-shadow:
    12px 20px 40px #493b2e30,
    0 0 0 5px #d9c9a955;
  text-align: center;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 1.5s cubic-bezier(0.42, 0, 0.18, 1);
  will-change: transform;
  isolation: isolate;
}

.cover-inner::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--paper);
  box-shadow: inset -8px 0 16px #493b2e0d;
  content: "";
  transform: rotateY(180deg) translateZ(1px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}

.cover-inner::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(90deg, #bda77f, #f5eddd, #d3c09c);
  content: "";
  transform: translateZ(1px);
  pointer-events: none;
}

.cover-content {
  display: contents;
}

.cover.is-open .cover-inner {
  transform: rotateY(-112deg);
}

.cover-inner>* {
  position: relative;
  z-index: 1;
}

.cover.is-open:not(.is-closing) .cover-content>* {
  animation: cover-front-disappear 1.5s linear forwards;
}

@keyframes cover-front-disappear {

  0%,
  32% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.cover-date {
  margin-top: auto;
}

.cover-top {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.bismillah {
  color: var(--gold);
  font: 700 28px var(--arabic);
}

.cover-rule {
  width: 49px;
  height: 1px;
  background: var(--line);
}

.cover-top p,
.cover-date {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.cover-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 4vw, 32px);
  width: 100%;
  margin: 0;
  font: clamp(48px, 10vw, 79px)/0.95 var(--script);
  color: var(--ink);
}

.cover-names i {
  color: var(--gold-light);
  font: italic 40px var(--serif);
}

.cover-portrait {
  position: relative;
  width: clamp(185px, 44vw, 280px);
  height: clamp(205px, 36vh, 325px);
  overflow: hidden;
  border-radius: 48% 48% 5px 5px;
  border: 5px solid var(--white);
  outline: 1px solid var(--line);
  box-shadow: 0 20px 48px #57442b19;
}

.cover-portrait:after {
  position: absolute;
  content: "";
  inset: auto 0 0;
  height: 45px;
  background: linear-gradient(transparent, #41351e2e);
}

.cover-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.cover-flower {
  position: absolute !important;
  color: #bf9b61;
  font: 67px var(--serif);
  opacity: 0.7;
  pointer-events: none;
}

.cover-flower-left {
  left: 7%;
  top: 44%;
  transform: rotate(-35deg);
}

.cover-flower-right {
  right: 7%;
  top: 44%;
  transform: rotate(145deg);
}

.guest-card {
  display: grid;
  gap: 1px;
  min-width: min(310px, 90%);
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0b8;
}

.guest-card span,
.guest-card em {
  font-size: 12px;
}

.guest-card strong {
  font: 500 19px var(--serif);
}

.guest-card em {
  font-style: italic;
}

.open-button,
.copy-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--gold-light);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.open-button {
  width: min(260px, 80%);
  font-size: 15px;
}

.open-button:hover,
.copy-button:hover {
  background: #ad874a;
  transform: translateY(-2px);
}

.open-button:focus-visible,
.copy-button:focus-visible,
.music-toggle:focus-visible,
a:focus-visible {
  outline: 3px solid #765322;
  outline-offset: 4px;
}

.cover-date {
  font-size: 10px;
}

.invitation {
  max-width: 1500px;
  margin: auto;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.9s ease 0s,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0s;
  will-change: opacity, transform;
}

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

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  border-bottom: 1px solid #b18b5022;
  background: #fbf7eef0;
  backdrop-filter: blur(14px);
}

.brand {
  text-decoration: none;
  font: 500 24px var(--serif);
  letter-spacing: 0.03em;
}

.brand span {
  color: var(--gold);
  font-style: italic;
}

.topbar-date {
  color: #766654;
  font-size: 12px;
}

.music-toggle {
  display: flex;
  min-width: 75px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d8c49b;
  border-radius: 50px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.music-bars {
  display: flex;
  height: 14px;
  align-items: center;
  gap: 2px;
}

.music-bars i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: var(--gold);
}

.music-toggle[aria-pressed="true"] .music-bars i {
  animation: music 0.6s ease-in-out infinite alternate;
}

.music-bars i:nth-child(2) {
  height: 11px;
  animation-delay: 0.2s;
}

.music-bars i:nth-child(3) {
  height: 7px;
  animation-delay: 0.4s;
}

@keyframes music {
  to {
    height: 3px;
  }
}

.section-frame {
  position: relative;
  overflow: hidden;
  padding-right: var(--pad);
  padding-left: var(--pad);
}

.hero {
  display: grid;
  min-height: min(790px, calc(100dvh - 66px));
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 6vw;
  padding-top: 72px;
  padding-bottom: 100px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0;
  font: clamp(52px, 8.5vw, 108px)/1.07 var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: var(--gold);
  font: italic 0.72em var(--script);
}

.hero-intro {
  max-width: 370px;
  margin: 26px 0;
  color: #766654;
  line-height: 1.8;
}

.text-link,
.map-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-weight: 600;
}

.text-link span {
  color: var(--gold);
  font-size: 20px;
  transition: transform 0.2s;
}

.text-link:hover span {
  transform: translateY(4px);
}

.hero-image-wrap {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  height: min(57vh, 530px);
  min-height: 335px;
}

.hero-image-wrap:before {
  position: absolute;
  z-index: 0;
  content: "";
  top: 22px;
  right: -20px;
  bottom: -20px;
  left: 22px;
  border: 1px solid var(--line);
}

.hero-image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.photo-caption {
  position: absolute;
  right: -1px;
  bottom: 20px;
  padding: 10px 18px;
  background: var(--paper);
  font: italic 14px var(--serif);
}

.scroll-note {
  position: absolute;
  bottom: 29px;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 11px;
  color: #8a7964;
  text-decoration: none;
  font-size: 11px;
}

.scroll-note span {
  width: 35px;
  height: 1px;
  background: var(--gold);
}

.welcome {
  display: grid;
  min-height: 640px;
  grid-template-columns: 1fr;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 110px;
  background: var(--paper-deep);
}

.welcome-content {
  width: min(100%, 690px);
  justify-self: center;
}

.welcome-content h2,
.events h2,
.gift h2 {
  margin: 0 0 19px;
  font: clamp(40px, 6vw, 68px)/1.15 var(--serif);
  font-weight: 400;
}

.body-copy,
.welcome-foot {
  max-width: 520px;
  color: #75634e;
  line-height: 1.85;
}

.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(13px, 4vw, 55px);
  margin: 40px 0;
}

.person-role {
  color: var(--gold);
  font-size: 11px;
}

.person h3 {
  margin: 7px 0;
  font: clamp(24px, 3.2vw, 38px) var(--serif);
  font-weight: 400;
}

.person p {
  margin: 0;
  color: #766654;
  font-size: 14px;
  line-height: 1.65;
}

.person:last-child {
  text-align: right;
}

.ampersand {
  color: var(--gold);
  font: italic 48px var(--script);
}

.welcome-foot {
  max-width: 550px;
  margin: 0;
}

.events {
  padding-top: 120px;
  padding-bottom: 115px;
}

.events-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 62px;
}

.events-heading h2 {
  margin: 0;
}

.events-date {
  text-align: right;
  color: #786954;
  font-size: 13px;
  line-height: 1.4;
}

.events-date strong {
  color: var(--gold);
  font: 56px var(--serif);
}

.event-list {
  border-top: 1px solid #d7c7a7;
}

.event {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid #d7c7a7;
}

.event-index {
  align-self: start;
  color: #c1a470;
  font: 20px var(--serif);
  font-style: italic;
}

.event-type {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
}

.event-info h3 {
  margin: 5px 0 12px;
  font: clamp(26px, 3vw, 36px) var(--serif);
  font-weight: 400;
}

.event-detail,
.event-venue {
  margin: 0;
  color: #75634e;
  font-size: 14px;
  line-height: 1.75;
}

.event-venue {
  margin-top: 6px;
}

.map-link {
  align-self: center;
  color: #775b2f;
  font-size: 13px;
}

.map-link span {
  color: var(--gold);
  font-size: 18px;
}

.countdown-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 65px;
}

.countdown-wrap .eyebrow {
  max-width: 195px;
  margin: 0;
}

.countdown {
  display: flex;
  gap: clamp(8px, 2.5vw, 28px);
}

.countdown div {
  display: grid;
  min-width: 74px;
  gap: 2px;
  text-align: center;
}

.countdown strong {
  font: clamp(29px, 4vw, 44px) var(--serif);
  font-weight: 400;
}

.countdown span {
  color: #806e59;
  font-size: 11px;
}

.verse {
  display: flex;
  min-height: 570px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 90px;
  padding-bottom: 90px;
  background: var(--paper-deep);
  text-align: center;
}

.verse-flower {
  margin-bottom: 8px;
  color: #c1a16d;
  font-size: 30px;
}

.verse h2 {
  max-width: 830px;
  margin: 8px 0 33px;
  font: clamp(25px, 4vw, 39px)/1.9 var(--arabic);
  font-weight: 400;
}

.verse blockquote {
  max-width: 690px;
  margin: 0;
  color: #66533f;
  font: italic 17px/1.9 var(--serif);
}

.verse cite {
  margin-top: 26px;
  color: var(--gold);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.gift {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: 7vw;
  padding-top: 115px;
  padding-bottom: 110px;
}

.gift-intro h2 {
  font-size: clamp(37px, 5vw, 57px);
}

.gift-intro>p:last-child {
  max-width: 330px;
  color: #75634e;
  line-height: 1.8;
}

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

.account {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 25px 20px 20px;
  border: 1px solid #c9a762;
  border-radius: 12px;
  background: #f7f2e7;
}

.account-bank {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.account strong {
  font: clamp(27px, 4vw, 37px) var(--serif);
  letter-spacing: 0.05em;
}

.account-owner {
  color: #75634e;
  font-size: 13px;
}

.copy-button {
  min-width: 155px;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 20px;
  font-size: 12px;
}

.copy-status {
  grid-column: 2;
  margin: 0;
  color: #5b6c3e;
  font-size: 13px;
  text-align: center;
}

.closing {
  display: flex;
  min-height: 590px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 85px;
  padding-bottom: 100px;
  background: var(--paper-deep);
  text-align: center;
}

.closing-flourish {
  margin-bottom: 10px;
  color: #b9945a;
  font: 75px var(--serif);
  transform: rotate(180deg);
}

.closing-copy {
  max-width: 540px;
  color: #6d5b46;
  line-height: 1.8;
}

.closing h2 {
  margin: 27px 0;
  font: clamp(33px, 6vw, 60px)/1.3 var(--serif);
  font-weight: 500;
}

.closing h2 span {
  color: var(--gold);
  font-style: italic;
}

.farewell {
  color: var(--gold);
  font: 700 25px var(--arabic);
}

.closing-date {
  margin-top: 25px;
  color: #90754b;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.bottom-nav {
  display: none;
}

@media (min-width: 1200px) {
  .hero {
    padding-right: 10%;
    padding-left: 10%;
  }

  .welcome,
  .events,
  .verse,
  .gift,
  .closing {
    padding-right: 10%;
    padding-left: 10%;
  }
}

@media (max-width: 700px) {
  .cover.is-opening {
    transition-delay: 0s;
  }

  .cover {
    --cover-pad: 10px;
    --page-h: min(830px, calc(100dvh - var(--cover-pad) * 2));
    padding: var(--cover-pad);
    perspective: 1400px;
  }

  .cover::after {
    left: 50%;
    border-radius: 0 24px 24px 0;
  }

  .back-page-sheet {
    border-radius: 0 24px 24px 0;
  }

  .cover-inner {
    padding: clamp(25px, 5vh, 42px) 16px 64px;
  }

  .cover-inner .cover-date {
    position: relative;
    bottom: auto;
  }

  .cover-content {
    display: contents;
  }

  .back-page-note {
    width: min(310px, 78%);
    gap: 10px;
    padding: 42px 22px 34px;
    border-radius: 170px 170px 16px 16px;
  }

  .back-page-flower {
    width: 198px;
    height: 198px;
    margin-top: -58px;
    margin-bottom: 3px;
  }

  .back-page-divider {
    width: min(180px, 76%);
    height: 48px;
  }

  .back-page-title {
    font-size: 27px;
  }

  .back-page-copy {
    font-size: 14px;
  }

  .back-page-couple {
    font-size: 17px;
  }

  .back-button,
  .next-button {
    bottom: max(30px, calc((100% - min(830px, 100dvh - 20px)) / 2 + 28px));
    min-height: 48px;
    padding: 0 15px;
    font-size: 12px;
  }

  .back-button {
    left: 18px;
    min-width: 70px;
  }

  .next-button {
    right: 18px;
    min-width: 70px;
  }

  .cover.is-open .back-button,
  .cover.is-open .next-button {
    transform: translateY(0);
  }

  .back-button:hover,
  .next-button:hover {
    transform: translateY(-2px);
  }

  .cover.is-open .cover-inner {
    transform: rotateY(-112deg);
  }

  .cover.is-closing .back-page-sheet {
    transform: translate(-50%, -50%) rotateY(-112deg);
  }

  .cover-names {
    font-size: clamp(46px, 13vw, 68px);
  }

  .cover-flower {
    font-size: 43px;
  }

  .cover-portrait {
    width: clamp(170px, 48vw, 240px);
    height: clamp(185px, 31vh, 250px);
  }

  .guest-card {
    min-width: min(285px, 95%);
  }

  .topbar {
    height: 58px;
  }

  .topbar-date {
    font-size: 10px;
  }

  .hero {
    min-height: unset;
    grid-template-columns: 1fr;
    gap: 35px;
    padding-top: 72px;
    padding-bottom: 79px;
  }

  .hero-copy {
    max-width: 520px;
  }

  .hero h1 {
    font-size: clamp(57px, 13vw, 88px);
  }

  .hero-intro {
    margin: 17px 0;
  }

  .hero-image-wrap {
    width: 78%;
    height: 400px;
    min-height: 0;
    margin-right: 20px;
  }

  .scroll-note {
    bottom: 24px;
  }

  .welcome {
    min-height: unset;
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .welcome-content h2 {
    font-size: clamp(38px, 9vw, 54px);
  }

  .couple-grid {
    gap: 12px;
    margin: 32px 0;
  }

  .person h3 {
    font-size: clamp(22px, 6vw, 32px);
  }

  .person p {
    font-size: 12px;
  }

  .ampersand {
    font-size: 39px;
  }

  .events {
    padding-top: 82px;
    padding-bottom: 80px;
  }

  .events-heading {
    margin-bottom: 36px;
  }

  .events-heading h2 {
    font-size: 43px;
  }

  .events-date strong {
    font-size: 44px;
  }

  .event {
    grid-template-columns: 28px 1fr;
    gap: 14px;
    padding: 27px 0;
  }

  .event-index {
    font-size: 15px;
  }

  .map-link {
    grid-column: 2;
    min-height: 40px;
    justify-self: start;
  }

  .event-info h3 {
    font-size: 27px;
  }

  .countdown-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    margin-top: 42px;
  }

  .countdown-wrap .eyebrow {
    max-width: none;
  }

  .countdown {
    width: 100%;
    justify-content: space-between;
  }

  .countdown div {
    min-width: 0;
  }

  .verse {
    min-height: 500px;
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .verse h2 {
    font-size: clamp(22px, 6vw, 31px);
    line-height: 2;
  }

  .verse blockquote {
    font-size: 15px;
  }

  .gift {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-top: 82px;
    padding-bottom: 74px;
  }

  .gift-intro h2 {
    font-size: 46px;
  }

  .gift-intro>p:last-child {
    margin-bottom: 0;
  }

  .copy-status {
    grid-column: 1;
  }

  .closing {
    min-height: 520px;
    padding-top: 65px;
    padding-bottom: calc(100px + 58px + env(safe-area-inset-bottom));
  }

  .closing-copy {
    font-size: 14px;
  }

  .farewell {
    font-size: 21px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 9;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: calc(58px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: space-around;
    padding: 0 15px env(safe-area-inset-bottom);
    border-top: 1px solid #b18b5033;
    background: #fbf7eef2;
    backdrop-filter: blur(15px);
  }

  .bottom-nav a {
    display: grid;
    min-width: 65px;
    min-height: 44px;
    place-items: center;
    color: #69583f;
    text-decoration: none;
    font-size: 12px;
  }

  .section-frame {
    scroll-margin-top: 60px;
  }
}

@media (max-width: 390px) {
  .cover-inner {
    padding-right: 12px;
    padding-left: 12px;
  }

  .cover-names {
    font-size: 46px;
  }

  .cover-portrait {
    height: 190px;
  }

  .couple-grid {
    gap: 7px;
  }

  .person h3 {
    font-size: 22px;
  }

  .events-heading h2 {
    font-size: 38px;
  }

  .events-date strong {
    font-size: 38px;
  }

  .hero-image-wrap {
    height: 340px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .cover,
  .invitation,
  .cover-inner {
    transition-duration: 0s;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .cover.is-open .cover-inner {
    transform: none;
  }
}