/* Print-inspired invitation. The paper, burgundy, and botanical details
   preserve the supplied two-page invitation rather than a UI theme. */
:root {
  color-scheme: light;
  --paper: #fbf8f1;
  --backdrop: #eae4d8;
  --burgundy: #793f49;
  --burgundy-hover: #65313b;
  --gold: #b99b60;
  --text: #5c524f;
  --muted: #746852;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--backdrop);
  color: var(--text);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, dl, dd { margin: 0; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }

.invitation {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 14px;
}
.invitation-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100svh - 28px);
  padding: 70px 38px 44px;
  margin-bottom: 14px;
  background: var(--paper);
  text-align: center;
  isolation: isolate;
}
.invitation-page:last-child { margin-bottom: 0; }
.invitation-page::before,
.invitation-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border: 1px solid var(--gold);
}
.invitation-page::before { inset: 15px; }
.invitation-page::after { inset: 20px; opacity: .66; }
.botanical {
  position: absolute;
  width: 64px;
  height: 90px;
  color: var(--gold);
  pointer-events: none;
  z-index: -1;
}
.botanical.top { top: 30px; left: 26px; }
.botanical.bottom { bottom: 29px; right: 26px; transform: rotate(180deg); }

.eyebrow {
  margin-bottom: 10px;
  color: var(--burgundy);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
}
h1 {
  color: var(--burgundy);
  font-size: clamp(38px, 10vw, 60px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
}
.translation {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.8;
  letter-spacing: .015em;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 128px;
  margin: 27px auto;
  color: var(--gold);
}
.ornament::before, .ornament::after {
  content: "";
  width: 52px;
  height: 1px;
  background: currentColor;
}
.ornament span { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  color: var(--burgundy);
  line-height: 1.12;
}
.name { display: block; font-size: clamp(29px, 7.8vw, 64px); white-space: nowrap; }
.roselin { font-style: italic; font-size: clamp(44px, 11vw, 74px); line-height: 1.15; padding-bottom: 3px; }
.ampersand { color: var(--gold); font-size: 34px; line-height: 1.15; }
.cover-message { margin-top: 31px; }
.indonesian { font-size: 18px; line-height: 1.55; }
.desktop-break { display: none; }
.event-date > p:first-child {
  color: var(--burgundy);
  font-size: clamp(18px, 4.5vw, 26px);
  font-weight: 700;
  line-height: 1.4;
}
.page-actions { display: flex; justify-content: center; width: 100%; margin-top: 27px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 164px;
  padding: 12px 23px;
  border: 1px solid var(--burgundy);
  border-radius: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .035em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.primary { background: var(--burgundy); color: var(--paper); }
.secondary { color: var(--burgundy); background: transparent; min-width: 132px; }
.primary:hover { background: var(--burgundy-hover); }
.secondary:hover { background: var(--burgundy); color: var(--paper); }
.button:active { transform: translateY(1px); }
a:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 5px; }
h1:focus, h2:focus { outline: none; }

.details { padding-top: 80px; }
.details-heading h2 {
  color: var(--burgundy);
  font-size: clamp(26px, 6.7vw, 36px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  padding-bottom: 2px;
}
.details-heading > .indonesian { max-width: 430px; margin: 15px auto 0; }
.details-heading > .translation { margin-top: 14px; }
.details-couple {
  width: 100%;
  margin-top: 27px;
  color: var(--burgundy);
  font-size: clamp(24px, 6vw, 40px);
  font-style: italic;
  line-height: 1.25;
  padding-bottom: 2px;
  text-wrap: balance;
}
.details > .ornament { margin: 24px auto; }
.event-details { width: 100%; max-width: 395px; margin-top: 25px; }
.detail-item + .detail-item { margin-top: 25px; }
dt { color: var(--burgundy); font-size: 25px; line-height: 1.2; }
dt .translation { margin-top: 7px; }
.detail-value {
  min-height: 23px;
  padding: 6px 0;
  border-bottom: 1px solid var(--gold);
  font-size: 20px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.detail-value.location { min-height: 59px; }
.closing-message { margin-top: 34px; }
.closing-message .indonesian { font-style: italic; line-height: 1.5; }
.closing-message .translation { margin-top: 12px; }
.detail-actions { gap: 20px; align-items: center; flex-wrap: wrap; }
.download-link {
  padding: 12px 4px;
  color: var(--burgundy);
  font-family: var(--sans);
  font-size: 13px;
  text-underline-offset: 4px;
}
.download-link:hover { text-decoration-thickness: 2px; }
.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .invitation { padding: 28px; }
  .invitation-page { min-height: 970px; padding: 91px 70px 54px; margin-bottom: 28px; }
  .invitation-page::before { inset: 24px; }
  .invitation-page::after { inset: 31px; }
  .botanical { width: 91px; height: 128px; }
  .botanical.top { top: 43px; left: 39px; }
  .botanical.bottom { bottom: 42px; right: 39px; }
  .eyebrow { font-size: 14px; margin-bottom: 14px; }
  .translation { font-size: 13px; }
  .ornament { margin-top: 34px; margin-bottom: 34px; width: 152px; }
  .ornament::before, .ornament::after { width: 62px; }
  .couple-names { gap: 7px; }
  .ampersand { font-size: 42px; }
  .cover-message { margin-top: 39px; }
  .indonesian { font-size: 22px; }
  .desktop-break { display: initial; }
  .page-actions { margin-top: 33px; }
  .details { padding-top: 102px; }
  .details-couple { margin-top: 33px; }
  .details > .ornament { margin-top: 30px; margin-bottom: 30px; }
  .event-details { margin-top: 31px; }
  .detail-item + .detail-item { margin-top: 29px; }
  .closing-message { margin-top: 38px; }
}

@media (max-width: 359px) {
  .invitation { padding: 8px; }
  .invitation-page { min-height: calc(100svh - 16px); padding: 69px 28px 40px; }
  .invitation-page::before { inset: 11px; }
  .invitation-page::after { inset: 16px; }
  .botanical { width: 54px; height: 77px; }
  .botanical.top { left: 19px; top: 23px; }
  .botanical.bottom { right: 19px; bottom: 23px; }
  .indonesian { font-size: 17px; }
  .details { padding-top: 73px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:active { transform: none; }
}

@media print {
  @page { size: A5 portrait; margin: 0; }
  body { background: var(--paper); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .invitation { width: 148mm; padding: 0; margin: 0; }
  .invitation-page, .invitation-page[hidden] {
    display: flex !important;
    width: 148mm;
    min-height: 210mm;
    height: 210mm;
    margin: 0;
    padding: 18mm 16mm 14mm;
    break-inside: avoid;
    break-after: page;
  }
  .invitation-page:last-child { break-after: auto; }
  .invitation-page::before { inset: 8mm; }
  .invitation-page::after { inset: 10mm; }
  .page-actions { display: none; }
  .botanical { width: 20mm; height: 28mm; }
  .botanical.top { top: 13mm; left: 12mm; }
  .botanical.bottom { bottom: 13mm; right: 12mm; }
  h1 { font-size: 36px; }
  .name { font-size: 38px; }
  .roselin { font-size: 48px; }
  .ampersand { font-size: 28px; }
  .ornament { margin: 18px auto; }
  .cover-message { margin-top: 22px; }
  .indonesian { font-size: 17px; }
  .event-date > p:first-child { font-size: 20px; }
  .translation { font-size: 10px; }
  .details { padding-top: 25mm; }
  .details-heading h2 { font-size: 27px; }
  .details-couple { font-size: 25px; margin-top: 22px; }
  .details > .ornament { margin: 18px auto; }
  .event-details { margin-top: 20px; }
  dt { font-size: 20px; }
  .detail-item + .detail-item { margin-top: 20px; }
  .closing-message { margin-top: 26px; }
}
