:root {
  --paper: #fffaf6;
  --blush: #f6e5e4;
  --rose: #a36472;
  --rose-dark: #74414f;
  --rose-light: #dbaab4;
  --ink: #684a4e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #eadadd;
  font-family: "DM Sans", sans-serif;
}

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

.story {
  width: min(100%, 540px);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 16px 60px rgb(86 44 53 / 13%);
}

.page { position: relative; overflow: hidden; }

.cover {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.cover-photo {
  position: relative;
  height: min(67svh, 680px);
  min-height: 490px;
  overflow: hidden;
  background: #aaa5ab;
}

.cover-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 15%;
  background: linear-gradient(transparent, rgb(71 49 58 / 22%));
  pointer-events: none;
}

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

.cover-photo img { object-position: center 38%; }

.cover-panel {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 275px;
  place-items: center;
  background: #fffaf6;
  text-align: center;
  padding: 29px 22px 35px;
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid #e8c9c8;
  pointer-events: none;
}

.cover-panel::after {
  content: "✧";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 11px;
  color: #c18a95;
  background: var(--paper);
  font: 26px/1 "Cormorant Garamond", serif;
}

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

.cover h1 {
  margin: 0;
  color: #a86678;
  font: 400 clamp(62px, 16vw, 88px)/.93 "Great Vibes", cursive;
  white-space: nowrap;
}

.cover-age {
  margin: 6px 0 24px;
  color: #946873;
  font: 500 14px/1.2 "Cormorant Garamond", serif;
  letter-spacing: .42em;
  text-transform: uppercase;
}

.open-invite {
  min-width: 180px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #aa697a;
  border-radius: 100px;
  background: #aa697a;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  font: 600 11px/1 "DM Sans", sans-serif;
  transition: background .2s ease, transform .2s ease;
}

.open-invite:hover { background: #8f4c5f; transform: translateY(-2px); }
.open-invite svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.invitation {
  min-height: max(850px, 100svh);
  background: #fff8f4 url("assets/floral-frame.webp") center center / 100% 100% no-repeat;
}

.invitation-inner {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  padding: clamp(136px, 34vw, 180px) 26px clamp(103px, 26vw, 139px);
  text-align: center;
}

.invitation-heading, .event-details { position: relative; z-index: 1; }

.invitation h2 {
  margin: 0;
  color: #985a6b;
  font: 400 clamp(66px, 17vw, 92px)/.91 "Great Vibes", cursive;
  white-space: nowrap;
}

.fifteen {
  margin: 14px 0 12px;
  color: #8f5766;
  font: 500 clamp(26px, 7vw, 37px)/1 "Cormorant Garamond", serif;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.ornament {
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  color: #c78e9c;
}

.ornament i { flex: 1; height: 1px; background: #cda0a7; }
.ornament b { font: 400 20px/1 "Cormorant Garamond", serif; }
.ornament-small { width: 100px; margin: 12px auto 8px; }
.ornament-small b { font-size: 15px; }

.invitation-quote {
  max-width: 340px;
  margin: 10px auto 0;
  color: #875563;
  font: italic 500 clamp(23px, 5.9vw, 30px)/1.1 "Cormorant Garamond", serif;
}

.event-details { color: #854d5d; }
.date-block { display: flex; flex-direction: column; align-items: center; }
.date-day { font: 400 clamp(70px, 19vw, 100px)/.78 "Cormorant Garamond", serif; }
.date-rest { margin-top: 10px; font: 500 clamp(25px, 6.3vw, 33px)/1 "Cormorant Garamond", serif; letter-spacing: .07em; text-transform: uppercase; }
.date-rest small { font-size: .65em; letter-spacing: .03em; }
.date-time { margin-top: 8px; font: 500 14px/1.2 "DM Sans", sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.date-time span { padding: 0 2px; }
.venue { margin: 0; font: 500 clamp(30px, 8vw, 40px)/1 "Cormorant Garamond", serif; }
.city { margin: 4px 0 0; font: 500 12px/1.4 "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; }

.actions {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 5px;
  padding: 14px 5px 7px;
  border: 1px solid rgb(224 187 189 / 70%);
  border-radius: 9px;
  background: rgb(255 250 246 / 91%);
  box-shadow: 0 7px 23px rgb(149 81 100 / 8%);
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 100px;
  padding: 0 1px;
  border: 0;
  background: none;
  color: #854f5f;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .045em;
  font: 600 10px/1.2 "DM Sans", sans-serif;
}

.action-icon {
  width: clamp(54px, 15vw, 66px);
  height: clamp(54px, 15vw, 66px);
  display: grid;
  place-items: center;
  border: 1px solid #d79aa8;
  border-radius: 50%;
  background: rgb(247 226 228 / 88%);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.action:hover .action-icon, .action:focus-visible .action-icon {
  background: #f0cbd1;
  transform: translateY(-3px);
  box-shadow: 0 5px 14px rgb(149 81 100 / 14%);
}

.action svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.closing { background: var(--paper); }
.closing-photo { height: min(74svh, 760px); min-height: 500px; background: #aaa5ab; }
.closing-photo img { object-position: center 32%; }
.closing-panel {
  position: relative;
  min-height: 265px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 35px 42px;
  background: #fffaf6;
  text-align: center;
}
.closing-panel::before { content: ""; position: absolute; inset: 11px; border: 1px solid #e8c9c8; pointer-events: none; }
.closing-flower { color: #bb8690; font: 30px/1 "Cormorant Garamond", serif; }
.closing-panel p { position: relative; margin: 8px 0 7px; color: #8b5262; font: italic 500 clamp(29px, 7vw, 40px)/1.05 "Cormorant Garamond", serif; }
.closing-signature { color: #aa6a79; font: 400 38px/1 "Great Vibes", cursive; }

:focus-visible { outline: 3px solid #8b5262; outline-offset: 4px; }

.info-dialog {
  width: min(calc(100% - 24px), 470px);
  max-height: min(90dvh, 820px);
  padding: 0;
  border: 1px solid #e0b8bd;
  border-radius: 16px;
  background: #fffaf6;
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(71 30 44 / 25%);
  overflow: auto;
}

.info-dialog::backdrop { background: rgb(65 34 45 / 63%); backdrop-filter: blur(4px); }
.dialog-content { position: relative; padding: 26px 28px 32px; border: 8px solid #fffaf6; outline: 1px solid #efdddc; outline-offset: -17px; }
.dialog-close { position: absolute; top: 8px; right: 9px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f7e8e7; color: #935766; cursor: pointer; font: 400 29px/1 "Cormorant Garamond", serif; }
.dialog-flourish { display: block; color: #bd8792; text-align: center; font: 26px/1 "Cormorant Garamond", serif; }
.info-dialog h2 { margin: 4px 0 19px; color: #a06070; text-align: center; font: 400 clamp(44px, 12vw, 56px)/1 "Great Vibes", cursive; }
.manual-list { display: grid; gap: 0; }
.manual-item { display: grid; grid-template-columns: 31px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid #eed9d8; }
.manual-item:first-child { border-top: 0; }
.manual-number { padding-top: 1px; color: #c48b96; font: 500 17px/1 "Cormorant Garamond", serif; }
.manual-item h3 { margin: 0 0 3px; color: #8a5261; font: 600 22px/1 "Cormorant Garamond", serif; }
.manual-item p { margin: 0; color: #6c5a5c; font: 400 13px/1.5 "DM Sans", sans-serif; }
.gifts-intro { max-width: 315px; margin: -4px auto 16px; text-align: center; color: #756164; font: 400 13px/1.45 "DM Sans", sans-serif; }
.gift-list { display: grid; gap: 10px; }
.gift { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; padding: 7px; border: 1px solid #f0d9d9; border-radius: 9px; background: #fffefd; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.gift:hover { border-color: #c9929e; transform: translateY(-2px); }
.gift img { width: 86px; height: 86px; border-radius: 5px; object-fit: cover; background: #f5e5e2; }
.gift > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.gift strong { color: #854e5c; font: 600 20px/1.05 "Cormorant Garamond", serif; }
.gift small { color: #6f6061; font: 400 11px/1.3 "DM Sans", sans-serif; }
.gift em { margin-top: 3px; color: #a46170; font: normal 600 10px/1 "DM Sans", sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.gift-note { margin: 14px 4px 0; color: #806f71; font: 400 10px/1.4 "DM Sans", sans-serif; text-align: center; }

@media (min-width: 700px) {
  body { padding: 40px 0; background: #f2e5e7; }
  .story { display: grid; gap: 36px; background: none; box-shadow: none; }
  .page { border-radius: 8px; box-shadow: 0 16px 50px rgb(86 44 53 / 15%); }
  .cover { min-height: 950px; }
  .cover-photo { height: 670px; }
  .invitation { min-height: 970px; }
  .invitation-inner { padding-top: 175px; padding-bottom: 125px; }
  .closing-photo { height: 720px; }
}

@media (max-width: 370px) {
  .invitation-inner { padding-left: 19px; padding-right: 19px; }
  .invitation h2 { font-size: 61px; }
  .action { font-size: 9px; }
  .action-icon { width: 51px; height: 51px; }
  .optional-break { display: none; }
}

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