@font-face {
  font-family: "Wedding Serif";
  src: url("/fonts/3d48eef43d4fcf6a5298f81145ea7a31.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: "Wedding Script";
  src: url("/fonts/304da6bb759f7c1e6948d63f119e0b82.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --paper-deep: #efede4;
  --ink: #414733;
  --brown: #624c3d;
  --olive: #6d7b48;
  --olive-dark: #58643b;
  --olive-soft: #bdc187;
  --blush: #b75c63;
  --cream: #fffaf0;
  --line: rgba(109, 123, 72, 0.22);
  --shadow-soft: 0 22px 70px rgba(58, 62, 43, 0.13);
  --shadow-card: 0 22px 38px rgba(56, 58, 41, 0.22), 0 4px 10px rgba(56, 58, 41, 0.13);
  font-family: "Wedding Serif", Georgia, "Times New Roman", serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.85), transparent 35rem),
    linear-gradient(135deg, #f3f1ea, #e9e6de);
}

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

button {
  font: inherit;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--paper);
  background: var(--olive-dark);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.invitation {
  position: relative;
  isolation: isolate;
  width: min(100%, 1120px);
  margin-inline: auto;
  overflow: clip;
  background: #fff;
  box-shadow: 0 0 58px rgba(63, 68, 48, 0.1);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--olive);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

/* Das gemalte Geschenk bleibt im Original; Transparenz und Fade liegen nur im CSS. */
.hero-artwork {
  position: absolute;
  z-index: 0;
  inset: -25px 0 auto;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.38;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.8) 28%, transparent 68%);
}

/* Das kleinere Kuvert verbindet die Dankesseite mit der ursprünglichen Einladung. */
.envelope-hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(1.5rem, 4vw, 3rem);
  mix-blend-mode: multiply;
}

.envelope-hero__crop {
  position: relative;
  width: min(57.8%, 612px);
  margin-inline: auto;
  aspect-ratio: 1440 / 690;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 65%, transparent 98%);
}

.envelope-hero__image {
  display: block;
  width: 100%;
  height: auto;
  transform: translateX(clamp(6px, 1.4vw, 20px));
}

/* Dankeskarten im Papierstil der Einladung. */
.cards {
  position: relative;
  z-index: 2;
  margin-top: clamp(-3.5rem, -4vw, -1.5rem);
  padding: 0 clamp(1.25rem, 7vw, 5.25rem) clamp(6rem, 11vw, 9rem);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 10rem);
}

.cards__intro {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0 auto clamp(3.5rem, 6vw, 4.5rem);
  padding: 0;
  text-align: center;
}

.cards__intro h1 {
  margin: 0;
  color: var(--brown);
  font-family: "Wedding Script", cursive;
  font-size: clamp(3.5rem, 8.2vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
}

.card-stack {
  position: relative;
  width: min(760px, 100%);
  min-height: 590px;
  margin-inline: auto;
}

.couple-card,
.date-card {
  position: absolute;
  box-shadow: var(--shadow-card);
}

.couple-card {
  top: 2.75rem;
  left: 1.5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 59%;
  aspect-ratio: 0.78;
  padding: 3rem 3.5rem 2.5rem 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 17% 23%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.5px)
      0 0 / 24px 24px,
    var(--olive-soft);
  text-align: center;
  transform: rotate(-1.25deg);
}

.couple-card::after {
  position: absolute;
  inset: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  content: "";
  pointer-events: none;
}

.couple-card__names {
  margin: auto 0;
  font-family: "Wedding Script", cursive;
  font-size: clamp(4.2rem, 9vw, 6.4rem);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.76;
}

.couple-card__names small {
  display: block;
  margin: 0.18em 0 0.24em;
  font-family: inherit;
  font-size: 0.42em;
  font-style: normal;
}

.couple-card__promise {
  margin: 0;
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.date-card {
  z-index: 2;
  top: 0;
  right: 0;
  display: grid;
  place-content: center;
  width: 47%;
  min-height: 92%;
  padding: 3rem clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgba(112, 94, 68, 0.13);
  color: var(--ink);
  background:
    radial-gradient(circle at 11px 13px, rgba(118, 96, 65, 0.12) 0 0.65px, transparent 1.15px)
      0 0 / 29px 31px,
    radial-gradient(circle at 31px 21px, rgba(255, 255, 255, 0.46) 0 0.8px, transparent 1.4px)
      0 0 / 43px 39px,
    linear-gradient(128deg, rgba(255, 255, 255, 0.22), transparent 48%, rgba(129, 103, 66, 0.045)),
    #ebe5d7;
  text-align: center;
  transform: rotate(1.35deg);
}

.date-card p {
  position: relative;
  z-index: 2;
  margin: 0;
}

.pearl {
  position: absolute;
  z-index: 2;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #e9ded7 42%, #9a8c80 88%);
  box-shadow: 0 1px 2px rgba(58, 49, 42, 0.4);
}

.pearl--one {
  top: 9%;
  left: 23%;
}

.pearl--two {
  right: 11%;
  bottom: 29%;
}

.pearl--three {
  bottom: 9%;
  left: 14%;
}

.intro-divider {
  width: 6rem;
  height: 1px;
  margin: 1.4rem auto 1.35rem;
  background: linear-gradient(to right, transparent, rgba(109, 123, 72, 0.55) 30%, rgba(109, 123, 72, 0.55) 70%, transparent);
}

.photo-label {
  margin: 0 0 1rem;
  color: var(--olive-dark);
  font-size: 1.15rem;
  font-style: italic;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem 0.85rem;
  width: min(400px, 100%);
  margin-inline: auto;
}

.photo-action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.photo-action--snapshots {
  grid-column: 1 / -1;
  justify-self: center;
  width: 35%;
  min-width: 124px;
  max-width: 140px;
  gap: 0.45rem;
}

.photo-action .pill-button {
  min-width: 0;
  width: 100%;
}

.photo-action__description {
  color: var(--olive-dark);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 52px;
  padding: 0.85rem 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--cream);
  background: var(--olive);
  box-shadow: 0 8px 20px rgba(74, 82, 51, 0.14);
  font: inherit;
  font-size: 1.2rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.pill-button--blush {
  background: var(--blush);
}

.pill-button--snapshots {
  min-height: 44px;
  padding: 0.5rem 0.45rem;
  border-color: rgba(98, 76, 61, 0.32);
  color: var(--brown);
  background: var(--paper);
  box-shadow: none;
  font-size: 0.95rem;
}

.pill-button:hover {
  background: var(--olive-dark);
  transform: translateY(-2px);
}

.pill-button--blush:hover {
  background: #a34d54;
}

.pill-button--snapshots:hover {
  color: var(--cream);
  background: var(--brown);
}

.pill-button:active {
  transform: translateY(0);
}

.pill-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 5px;
}

.date-card__heading {
  color: var(--olive-dark);
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  line-height: 1.4;
}

.date-card__heading span {
  display: block;
  margin-top: 0.3rem;
  font-family: "Wedding Script", cursive;
  font-size: clamp(3.7rem, 7vw, 5.2rem);
  line-height: 1;
}

.date-card .date-card__message {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.date-card .date-card__keepsake {
  margin-top: 2rem;
  color: var(--olive-dark);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.polaroids {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: min(810px, 100%);
  margin: 1.25rem auto 0;
}

.polaroid {
  width: 49%;
  min-width: 0;
  margin: 0;
  padding: clamp(0.55rem, 1.4vw, 0.9rem);
  border: 1px solid rgba(112, 94, 68, 0.11);
  background: #fffefa;
  box-shadow: 0 13px 27px rgba(56, 58, 41, 0.18), 0 2px 6px rgba(56, 58, 41, 0.1);
}

.polaroid--wedding {
  width: 40%;
  transform: rotate(-5deg);
}

.polaroid--party {
  margin-top: 2.5rem;
  transform: rotate(5deg);
}

.polaroid__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 1067;
  object-fit: cover;
}

.polaroid--wedding .polaroid__photo {
  aspect-ratio: 1067 / 1600;
  margin-bottom: -75px;
}

.polaroid__photo-crop {
  overflow: hidden;
}

.polaroid figcaption {
  padding: 1.1rem 0 0.65rem;
  color: var(--brown);
  font-family: "Wedding Script", cursive;
  font-size: clamp(1.6rem, 3.7vw, 2.5rem);
  line-height: 1;
  text-align: center;
}

.closing-note {
  margin: 5rem 0 0;
  color: var(--olive-dark);
  font-size: 1.15rem;
  font-style: italic;
  text-align: center;
}

.photo-credits {
  max-width: 32rem;
  margin: 1.2rem auto 0;
  color: var(--brown);
  font-size: 0.82rem;
  line-height: 1.65;
  text-align: center;
  text-wrap: balance;
}

.photo-credits a {
  color: var(--olive-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.photo-credits a:hover {
  color: var(--brown);
}

.photo-dialog {
  width: min(480px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.photo-dialog::backdrop {
  background: rgba(45, 50, 36, 0.54);
  backdrop-filter: blur(6px);
}

.photo-dialog__surface {
  position: relative;
  padding: 3.5rem 2rem 2rem;
}

.photo-dialog__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 0.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--olive-dark);
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

.photo-dialog__close:hover {
  background: var(--paper-deep);
}

.photo-dialog h2 {
  margin: 0;
  color: var(--brown);
  font-size: 2rem;
  font-weight: 400;
}

.photo-dialog p {
  line-height: 1.5;
}

.photo-dialog label {
  display: block;
  margin: 1.5rem 0 0.65rem;
  font-weight: 600;
  line-height: 1.4;
}

.photo-dialog input {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--olive);
  border-radius: 0.4rem;
  color: var(--ink);
  background: #fffefa;
  font: inherit;
  font-size: 1.1rem;
}

.photo-dialog input[aria-invalid="true"] {
  border-color: #963e45;
}

.photo-status {
  min-height: 1.5em;
  margin: 0.65rem 0 1rem;
  color: #963e45;
  font-size: 0.95rem;
}

.photo-submit {
  width: 100%;
}

body:has(.photo-dialog[open]) {
  overflow: hidden;
}

@media (max-width: 780px) {
  .envelope-hero__crop { width: 61.2%; aspect-ratio: 1440 / 730; }
  .cards { margin-top: -1.75rem; }
  .card-stack { min-height: 530px; }
  .couple-card { top: 3.5rem; left: 0; width: 62%; padding-inline: 1.25rem 3rem; }
  .date-card { width: 50%; }
  .polaroids { gap: 1rem; }
}

@media (max-width: 520px) {
  .hero-artwork { width: 145%; max-width: none; left: -5%; }
  .envelope-hero__crop { width: 66.3%; aspect-ratio: 1 / 0.55; }
  .envelope-hero__image { width: 112%; max-width: none; margin-left: -6%; }
  .cards { margin-top: -1rem; padding-inline: 1.25rem; padding-bottom: 3.5rem; }
  .cards__intro { margin-bottom: 2.5rem; }
  .cards__intro h1 { font-size: clamp(2.8rem, 10.3vw, 3.8rem); }
  .intro-divider { margin-block: 1.2rem; }
  .photo-actions { gap: 1.1rem 0.65rem; }
  .photo-actions .pill-button:not(.pill-button--snapshots) { padding-inline: 1rem; }
  .card-stack { display: flex; flex-direction: column; min-height: 0; padding: 0 0.35rem; }
  .couple-card, .date-card { position: relative; inset: auto; width: 91%; }
  .couple-card { min-height: 350px; padding: 2.25rem 1.4rem 3.5rem; transform: rotate(-2deg); }
  .date-card { min-height: 420px; margin: -2rem 0 0 auto; padding: 2.75rem 1.6rem; transform: rotate(2deg); }
  .date-card__heading span { font-size: 4rem; }
  .date-card .date-card__message { font-size: 1.12rem; }
  .polaroids { flex-direction: column; align-items: flex-start; gap: 1.5rem; width: 92%; margin-top: 2.5rem; }
  .polaroid { width: 93%; }
  .polaroid--party { align-self: flex-end; margin-top: 0; }
  .polaroid figcaption { font-size: clamp(1.8rem, 7.5vw, 2.5rem); }
  .closing-note { margin-top: 3.5rem; font-size: 1rem; }
  .photo-dialog__surface { padding-inline: 1.5rem; }
}

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