:root {
  --rose-1: #9d5a63;
  --rose-2: #7c4650;
  --rose-3: #6b3b45;
  --cream: #f7f3ee;
  --cream-2: #efe7dd;
  --gold: #b58a5a;
  --gold-soft: #cfa878;
  --ink: #6f6a66;
  --ink-soft: #8c8681;
  --white: #ffffff;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Dancing Script", cursive;
  --sans: "Jost", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--rose-3);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.card-root { display: block; }

/* ---------------- Language switcher ---------------- */
.lang-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(40,24,28,0.55), rgba(40,24,28,0));
  pointer-events: none;
}
.lang-switch {
  pointer-events: auto;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
}
.lang-btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.82);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { background: var(--white); color: var(--rose-2); font-weight: 400; }
.lang-btn .l-short { display: none; }

/* ---------------- Card shells ---------------- */
.card-main { display: block; }
.card {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 56px;
  position: relative;
}

/* ---------------- Front ---------------- */
.card--front {
  background: linear-gradient(160deg, var(--rose-1), var(--rose-2) 70%, var(--rose-3));
  color: var(--white);
  text-align: center;
  overflow: hidden;
  padding: 0;
}
.front-media {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 72px 24px 96px;
}
/* legacy: the real printed card, shown whole */
.front-card-img {
  width: min(88vw, 84vh);
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
/* legacy: text-free artwork image, centred, with the name/date overlay below */
.card--front.front--legacy .front-media { padding: 40px 24px 8px; }
.front-art { color: var(--white); display: flex; justify-content: center; }
/* <picture> wrappers (WebP + fallback) must not affect layout — the img rules
   below keep applying as if the picture element weren't there */
.front-art picture, .front-symbol picture { display: contents; }
.front-art-img {
  width: auto;
  height: min(48vh, 66vw);
  max-width: 84vw;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(30,14,18,0.22));
}
.card--front.front--legacy .front-overlay { margin-top: 1.5vh; }

/* symbol: white line-art, centred */
.card--front.front--symbol .front-media { padding: 36px 24px 8px; }
.front-symbol { color: var(--white); display: flex; justify-content: center; }
.front-symbol svg {
  width: min(54vw, 46vh);
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 6px 18px rgba(30,14,18,0.25));
}
/* image symbol (e.g. the original mother-and-baby artwork) */
.front-symbol img.symbol-img {
  display: block;
  width: auto;
  height: min(46vh, 64vw);
  max-width: 84vw;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(30,14,18,0.22));
}
/* photo: full-bleed cover */
.card--front.front--photo .front-media { position: absolute; inset: 0; padding: 0; }
.front-photo-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.card--front.front--photo::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(20,10,14,0.15), rgba(20,10,14,0.55));
}

/* photo: inset shapes (circle / rounded rectangle) on the themed background,
   with the name/date below — like the symbol layout. */
.card--front.front--photo-inset .front-media { padding: 40px 24px 8px; }
.front-photo-shape {
  overflow: hidden;
  background: rgba(255,255,255,0.10);
  box-shadow: 0 14px 40px rgba(20,10,14,0.35);
}
.front-photo-inset-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
/* circle */
.front--photo-circle .front-photo-shape {
  width: min(58vw, 46vh);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
/* rounded rectangle (portrait) */
.front--photo-square .front-photo-shape {
  width: min(64vw, 44vh);
  aspect-ratio: 4 / 5;
  border-radius: 14px;
}
/* framed: a soft white mat + ring, like a printed photo in a frame */
.front--photo-framed .front-photo-shape {
  background: #fff;
  border: 7px solid #fff;
  box-shadow: 0 18px 44px rgba(20,10,14,0.42);
}
.front--photo-framed.front--photo-circle .front-photo-shape { border-width: 6px; }
.front--photo-framed.front--photo-square .front-photo-shape { border-width: 12px; border-radius: 6px; }

/* text overlay (name / date) */
.front-overlay {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(20,10,14,0.45);
}
.card--front.front--photo .front-overlay {
  position: absolute; inset: 0;
  justify-content: center;
}
.card--front.front--symbol .front-overlay { margin-top: -4vh; }
.card--front.front--photo-inset .front-overlay { margin-top: 3vh; }
.front-name {
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(44px, 9vw, 78px);
  line-height: 1.05;
}
.front-sub {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 3.6vw, 30px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.front-date {
  font-family: var(--serif);
  font-size: clamp(15px, 2.4vw, 20px);
  letter-spacing: 0.18em;
  margin-top: 10px;
}
/* Event front: the celebration saying (Spruch) is the hero, name is a subtitle. */
.front-saying {
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(40px, 8.5vw, 76px);
  line-height: 1.08;
  max-width: 14ch;
  text-align: center;
}
.front-overlay--event { gap: 10px; }
.front-overlay--event .front-sub { margin-top: 2px; }
/* Birthday front: the age — which birthday it is — shown as a large gold number. */
.front-age {
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(46px, 9vw, 82px);
  line-height: 1;
  color: var(--gold-soft);
  margin-top: 2px;
}

.scroll-hint {
  position: absolute;
  bottom: 22px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.scroll-hint .chevron { font-size: 22px; line-height: 1; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(5px)} }

/* ---------------- Inside spread ---------------- */
.card--inside {
  background: linear-gradient(135deg, var(--cream), var(--cream-2));
  flex-direction: row;
  gap: clamp(24px, 6vw, 80px);
  align-items: stretch;
  padding: 96px clamp(20px, 6vw, 90px);
}
.inside-left, .inside-right {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center; max-width: 440px;
}
.inside-left { align-items: center; }
.inside-divider { width: 1px; background: linear-gradient(to bottom, transparent, rgba(181,138,90,0.4), transparent); }
.mini-heart, .footer-heart { width: 26px; height: 24px; margin: 0 auto 18px; }
.mini-heart svg path, .footer-heart svg path { fill: var(--gold); }
.greeting {
  font-family: var(--script); font-weight: 600;
  font-size: clamp(38px, 7vw, 58px); color: var(--ink); margin-bottom: 28px;
}
.verse {
  font-family: var(--serif); font-size: clamp(17px, 2.4vw, 21px);
  color: var(--ink-soft); white-space: pre-line; line-height: 1.7;
}
.inside-right { align-items: center; }
.name-display { line-height: 1; margin-bottom: 8px; }
.name-first {
  display: block; font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 8vw, 72px); letter-spacing: 0.02em; color: var(--ink-soft);
}
.name-last {
  display: block; font-family: var(--script); font-size: clamp(34px, 6vw, 52px);
  color: var(--gold); margin-top: -0.15em;
}
.birth-line { margin-top: 18px; }
.birth-date { font-family: var(--serif); font-size: clamp(18px, 3vw, 24px); color: var(--ink); letter-spacing: 0.06em; }
.birth-stats {
  font-family: var(--sans); font-weight: 300; letter-spacing: 0.14em;
  color: var(--ink-soft); margin-top: 10px; font-size: clamp(14px, 2.2vw, 17px);
}
.dot-heart { color: var(--gold); margin: 0 8px; }
.parents-block {
  margin-top: 40px; font-family: var(--sans); font-weight: 300;
  font-size: 14px; color: var(--ink-soft); line-height: 1.9;
}
.parents-block:empty { margin-top: 0; }
.invitation { font-style: italic; font-family: var(--serif); font-size: 16px; }
.phones a { color: var(--ink-soft); text-decoration: none; }
.phones a:hover { color: var(--gold); }
.phone-sep { margin: 0 6px; color: rgba(140,134,129,0.5); }
.contact-reveal-btn {
  margin-top: 8px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em;
  color: var(--ink-soft); background: transparent;
  border: 1px solid rgba(181,138,90,0.5); border-radius: 999px;
  padding: 8px 18px; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.contact-reveal-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.name-amp { color: var(--gold); font-family: var(--script); padding: 0 0.12em; }
/* invitation sign-off ("Liebe Grüsse, <name>") at the end of the inside spread */
.sign-off { margin-top: 34px; display: flex; flex-direction: column; gap: 2px; }
.sign-off-phrase { font-family: var(--serif); font-style: italic; font-size: clamp(15px, 2.2vw, 18px); color: var(--ink-soft); }
.sign-off-name { font-family: var(--script); font-size: clamp(24px, 4vw, 34px); color: var(--gold); }
.contact-email a { color: var(--ink-soft); text-decoration: none; }
.contact-email a:hover { color: var(--gold); }

/* ---- event "when & where" (birthday / wedding) ---- */
.event-block { margin-top: 26px; font-family: var(--sans); font-weight: 300; color: var(--ink-soft); line-height: 1.7; }
.event-invitation {
  font-style: italic; font-family: var(--serif); font-size: clamp(15px, 2.2vw, 18px);
  color: var(--ink); margin-bottom: 18px;
}
.event-invitation:empty { display: none; }
.event-title {
  font-family: var(--script); font-weight: 600; font-size: clamp(22px, 4vw, 30px);
  color: var(--gold); margin-bottom: 6px;
}
.event-title:empty { display: none; }
.event-when { font-family: var(--serif); font-size: clamp(16px, 2.6vw, 20px); color: var(--ink); letter-spacing: 0.04em; }
.event-location { margin-top: 8px; font-size: 15px; color: var(--ink); }
.event-address { font-size: 14px; }
.event-map {
  display: inline-block; margin-top: 10px; font-size: 13px; letter-spacing: 0.05em;
  color: var(--ink-soft); text-decoration: none;
  border-bottom: 1px solid rgba(181,138,90,0.5); padding-bottom: 2px;
}
.event-map:hover { color: var(--gold); border-color: var(--gold); }

/* ---------------- RSVP ---------------- */
.card--rsvp {
  background: linear-gradient(135deg, var(--cream-2), var(--cream));
  padding: clamp(56px, 9vw, 88px) clamp(20px, 6vw, 60px);
}
.rsvp-inner { width: min(460px, 92vw); margin: 0 auto; text-align: center; }
.rsvp-title {
  font-family: var(--script); font-weight: 600; font-size: clamp(30px, 6vw, 44px);
  color: var(--ink); margin-bottom: 8px;
}
.rsvp-deadline { font-family: var(--sans); font-weight: 300; font-size: 13px; color: var(--ink-soft); margin-bottom: 22px; }
.rsvp-deadline:empty { display: none; }
.rsvp-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: left; }
.rsvp-choice { display: flex; gap: 10px; }
.rsvp-opt {
  flex: 1; padding: 12px; border: 1px solid rgba(181,138,90,0.5); border-radius: 12px;
  background: transparent; color: var(--ink-soft); font-family: var(--sans); font-size: 15px;
  cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.rsvp-opt.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.rsvp-form input, .rsvp-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(181,138,90,0.4); border-radius: 12px;
  background: #fff; font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.rsvp-form input.err { border-color: #b3444d; }
.rsvp-form textarea { min-height: 72px; resize: vertical; }
.rsvp-count-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--sans); font-size: 14px; color: var(--ink-soft); }
.rsvp-count-row .rsvp-count { width: 90px; flex: 0 0 auto; }
.rsvp-send {
  margin-top: 4px; padding: 13px; border: none; border-radius: 999px;
  background: var(--gold); color: #fff; font-family: var(--sans); font-size: 15px; letter-spacing: 0.04em;
  cursor: pointer; transition: opacity 0.2s;
}
.rsvp-send:hover { opacity: 0.9; }
.rsvp-send:disabled { opacity: 0.6; cursor: default; }
.rsvp-thanks {
  font-family: var(--serif); font-style: italic; font-size: clamp(18px, 3vw, 22px);
  color: var(--gold); padding: 20px 0;
}

/* ---------------- Photos ---------------- */
.card--photos {
  background: linear-gradient(160deg, var(--rose-1), var(--rose-2) 70%, var(--rose-3));
  color: var(--white);
}
.photos-title { font-family: var(--script); font-weight: 600; font-size: clamp(32px, 6vw, 48px); margin-bottom: 8px; }
.photos-intro {
  font-family: var(--serif); font-size: clamp(15px, 2.2vw, 19px);
  color: rgba(255,255,255,0.82); margin-bottom: 40px; text-align: center; max-width: 40ch;
}
.photo-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 26px); width: min(760px, 92vw);
}
.photo-slot {
  position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 30px rgba(40,20,26,0.25);
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,0.55);
}
.photo-placeholder svg { width: 40px; height: 40px; opacity: 0.6; }
.photo-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  font-family: var(--serif); font-size: 15px; color: #fff; text-align: center;
  background: linear-gradient(to top, rgba(40,20,26,0.6), transparent);
}
.photo-caption:empty { display: none; }

/* ---------------- Footer ---------------- */
.card-footer { background: var(--rose-3); color: rgba(255,255,255,0.75); text-align: center; padding: 48px 24px 40px; }
.footer-name { font-family: var(--script); font-size: 26px; color: var(--gold-soft); margin-bottom: 6px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .card--inside { flex-direction: column; gap: 44px; padding: 90px 24px 60px; }
  .inside-divider { width: 60%; height: 1px; background: linear-gradient(to right, transparent, rgba(181,138,90,0.4), transparent); margin: 0 auto; }
  .inside-left, .inside-right { max-width: 100%; }
  .photo-grid { width: 100%; }
  .front-card-img { width: min(94vw, 82vh); }
  .front-symbol svg { width: min(66vw, 44vh); }
  .front-symbol img.symbol-img { height: min(44vh, 78vw); }
  .front-art-img { height: min(46vh, 80vw); }
}
@media (max-width: 480px) {
  .lang-btn .l-full { display: none; }
  .lang-btn .l-short { display: inline; }
  .lang-btn { padding: 6px 16px; font-size: 14px; letter-spacing: 0.08em; }
}

/* Scroll-reveal: fade in the CONTENT of later sections, never the section
   itself — a transparent section would expose the page background behind it
   for a moment while scrolling (visible as a colour flash between pages). */
.reveal > * { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal > * { opacity: 1; transform: none; transition: none; }
  .scroll-hint .chevron { animation: none; }
}

/* "Design your own" CTA — shown only on public example (showcase) cards. */
.example-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  color: #7c4650;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.example-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); }
@media (max-width: 480px) {
  .example-cta { right: 12px; bottom: 12px; padding: 10px 16px; font-size: 13px; }
}

/* Discreet legal links (Impressum/Datenschutz) on public card pages. */
.card-legal {
  position: fixed; left: 10px; bottom: 8px; z-index: 55;
  font-size: 11px; color: #fff; opacity: 0.5;
}
.card-legal a { color: inherit; text-decoration: none; }
.card-legal a:hover { text-decoration: underline; }
@media print { .card-legal { display: none; } }
