/* ═══════════════════════════════════════════════════════════
   lisa-roman.com — Stylesheet
   Inhalt: 1 Basis/Palette · 2 Tür-Intro · 3 Sprachumschalter
           4 Hero · 5 Programm/Timeline · 6 Dresscode · 7 RSVP
           8 Footer · 9 Deko/Parallax · 10 Reveals · 11 Motion-Fallbacks
   ═══════════════════════════════════════════════════════════ */

/* ── 1 · Basis & Palette ─────────────────────────────────── */
:root {
  --cream: #fbf3ec;
  --cream-deep: #f4e5d8;
  --terracotta: #d1634b;
  --terracotta-soft: #dd8a78;
  --ink: #8f4432;
  --gold: #c9a94f;
  --font-script: "Caveat", "Comic Sans MS", cursive;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --ease-over: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background-color: var(--cream);
  /* Papier: hauchfeines Korn aus zwei radialen Mustern */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(209, 99, 75, .025) 0 1.5px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(143, 68, 50, .02) 0 1px, transparent 1.5px);
  background-size: 240px 240px, 180px 180px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.19rem;
  line-height: 1.65;
  overflow-x: hidden;
}

.script { font-family: var(--font-script); color: var(--terracotta); font-weight: 400; }

h1, h2, h3 { font-weight: 600; margin: 0 0 .5rem; }
h2.script { font-size: clamp(2.6rem, 7vw, 4rem); text-align: center; margin-bottom: 2.5rem; }

section { position: relative; padding: clamp(4rem, 10vh, 7rem) 1.5rem; }

:focus-visible { outline: 2.5px solid var(--terracotta); outline-offset: 3px; border-radius: 2px; }

/* ── 2 · Tür-Intro ───────────────────────────────────────── */
#door-intro {
  position: fixed; inset: 0; z-index: 50;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .8s ease .15s, visibility 0s 1s;
}
#door-intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.door-stage {
  position: relative;
  width: min(46vw, 34vh, 340px); aspect-ratio: 2 / 3;
  perspective: 1200px;
}
.door-frame {
  position: absolute; inset: -6% -8%;
  background: url("/img/door.png") center / contain no-repeat;
  opacity: .35;
}
.door-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background-image: url("/img/door.png");
  background-size: 200% 100%;
  transition: transform 1.25s cubic-bezier(.6, .05, .35, 1);
  will-change: transform;
}
.door-left  { left: 0;  background-position: left center;  transform-origin: left center; }
.door-right { right: 0; background-position: right center; transform-origin: right center; }
#door-intro.open .door-left  { transform: rotateY(-104deg); }
#door-intro.open .door-right { transform: rotateY(104deg); }

.door-hint {
  margin-top: 2.2rem; font-family: var(--font-script);
  color: var(--terracotta); font-size: 1.6rem;
  animation: hint-pulse 2.2s ease-in-out infinite;
}
@keyframes hint-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* ── 3 · Sprachumschalter ────────────────────────────────── */
.lang-switch {
  position: fixed; top: 1rem; right: 1rem; z-index: 40;
  display: flex; gap: .3rem;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(6px);
  border: 1.5px solid var(--terracotta-soft);
  border-radius: 999px; padding: .25rem;
}
.lang-switch button {
  font-family: var(--font-serif); font-size: .95rem; font-weight: 600;
  color: var(--ink); background: none; border: none;
  padding: .3rem .7rem; border-radius: 999px; cursor: pointer;
  transition: background .25s, color .25s;
}
.lang-switch button:hover { background: var(--cream-deep); }
.lang-switch button.active { background: var(--terracotta); color: var(--cream); }

/* ── 4 · Hero ────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-top: 5rem;
}
.portrait-wrap { width: min(72vw, 340px); }
.portrait {
  width: 100%; height: auto; display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 55%);
          mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 55%);
  -webkit-mask-size: 100% 400%;
          mask-size: 100% 400%;
  -webkit-mask-position: 0 100%;
          mask-position: 0 100%;
}
.intro-done .portrait { animation: sketch-in 2.4s cubic-bezier(.5, 0, .3, 1) .3s forwards; }
@keyframes sketch-in {
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

.hero-title { font-size: clamp(2.4rem, 8vw, 4.2rem); margin: 1.4rem 0 0; }

.names { font-size: clamp(3rem, 10vw, 5.2rem); margin: .2rem 0 0; line-height: 1.1; }
.names span { display: inline-block; opacity: 0; transform: translateY(26px) rotate(4deg); }
.intro-done .names span { animation: letter-in .7s var(--ease-over) forwards; }
.names span:nth-child(1)  { animation-delay: .55s; } .names span:nth-child(2)  { animation-delay: .63s; }
.names span:nth-child(3)  { animation-delay: .71s; } .names span:nth-child(4)  { animation-delay: .79s; }
.names span:nth-child(5)  { animation-delay: .85s; } .names span:nth-child(6)  { animation-delay: .93s; }
.names span:nth-child(7)  { animation-delay: .99s; } .names span:nth-child(8)  { animation-delay: 1.07s; }
.names span:nth-child(9)  { animation-delay: 1.15s; } .names span:nth-child(10) { animation-delay: 1.23s; }
.names span:nth-child(11) { animation-delay: 1.31s; } .names span:nth-child(12) { animation-delay: 1.39s; }
@keyframes letter-in { to { opacity: 1; transform: none; } }

.date { letter-spacing: .35em; font-size: 1.05rem; margin: 1rem 0 0; font-weight: 600; }

#countdown { display: flex; gap: clamp(.8rem, 4vw, 2rem); margin-top: 2rem; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 3.2rem; }
.cd-num { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; display: inline-block; }
.cd-num.flip { animation: cd-flip .45s var(--ease-over); }
@keyframes cd-flip { 0% { transform: rotateX(80deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cd-label { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-top: .2rem; }

.scroll-cue { margin-top: 3rem; height: 54px; width: 1.5px; background: var(--terracotta-soft); position: relative; overflow: hidden; }
.scroll-cue span {
  position: absolute; left: -1px; top: -12px; width: 3.5px; height: 12px;
  background: var(--terracotta); border-radius: 3px;
  animation: cue-fall 1.8s ease-in-out infinite;
}
@keyframes cue-fall { 0% { top: -12px; } 70%, 100% { top: 60px; } }

/* ── 5 · Programm / Timeline ─────────────────────────────── */
#programm { max-width: 880px; margin: 0 auto; }
#route {
  position: absolute; inset: 7rem 0 2rem; width: 100%; height: calc(100% - 9rem);
  pointer-events: none; z-index: 0;
}
#route path {
  fill: none; stroke: var(--terracotta-soft); stroke-width: .55;
  stroke-dasharray: 1.6 1.4;
  /* zeichnet sich über --p (Scroll-Fortschritt der Sektion) */
  stroke-dashoffset: calc(100 - min(var(--p, 0) * 160, 100));
  opacity: .8;
}

.day {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(120px, 240px) 1fr;
  gap: clamp(1.2rem, 4vw, 3rem); align-items: center;
  margin: 0 0 clamp(3.5rem, 9vh, 6rem);
}
.day-alt { grid-template-columns: 1fr minmax(120px, 240px); }
.day-alt .day-art-wrap { order: 2; }
.day-alt .day-body { order: 1; text-align: right; }
.day-alt .tbd { margin-left: auto; }

.day-art-wrap { position: relative; }
.day-art {
  width: 100%; height: auto; display: block;
  will-change: transform;
}
/* Yacht segelt mit Scroll-Fortschritt */
#day-fri .day-art {
  transform: translateX(calc((var(--p, 0) - .35) * 11vw)) rotate(calc((var(--p, 0) - .5) * 5deg));
}
/* Ringe: Glanz-Streifen einmalig bei in-view */
#day-sat .day-art-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .8) 50%, transparent 58%);
  transform: translateX(-110%); mix-blend-mode: screen;
}
#day-sat .day-body.in-view ~ * {}
#day-sat.shine .day-art-wrap::after { animation: ring-shine 1.4s ease .4s forwards; }
@keyframes ring-shine { to { transform: translateX(110%); } }
/* Schirm klappt auf */
#day-sun .day-art {
  transform: scaleY(.25) rotate(-6deg); transform-origin: 50% 92%;
  transition: transform 1.1s var(--ease-over) .25s;
}
#day-sun.shine .day-art { transform: none; }

.day-date { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0; }
.day h3 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.day-time { font-weight: 600; letter-spacing: .05em; margin: .2rem 0 .6rem; }
.day-text { margin: 0 0 1rem; }

.tbd {
  display: inline-block; font-family: var(--font-script); font-size: 1.15rem;
  color: var(--terracotta); border: 1.6px dashed var(--terracotta-soft);
  border-radius: 999px; padding: .15rem .95rem;
  transform: rotate(-1.5deg);
}

/* ── 6 · Dresscode ───────────────────────────────────────── */
#dresscode { text-align: center; max-width: 640px; margin: 0 auto; }
.tbd-block {
  font-family: var(--font-script); font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--terracotta);
  border: 1.6px dashed var(--terracotta-soft); border-radius: 18px;
  padding: 2rem 2.4rem; transform: rotate(-.8deg);
}

/* ── 7 · RSVP ────────────────────────────────────────────── */
#rsvp { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: minmax(140px, 260px) 1fr; gap: 2rem; align-items: end; }
.champagne-wrap { position: sticky; bottom: 0; align-self: end; }
.champagne-art {
  width: 100%; height: auto; display: block;
  /* füllt sich beim Scrollen: Mask wandert von unten nach oben */
  -webkit-mask-image: linear-gradient(0deg, #000 0%, #000 40%, transparent 62%);
          mask-image: linear-gradient(0deg, #000 0%, #000 40%, transparent 62%);
  -webkit-mask-size: 100% 320%;
          mask-size: 100% 320%;
  -webkit-mask-position: 0 calc((1 - min(var(--p, 0) * 1.45, 1)) * 100%);
          mask-position: 0 calc((1 - min(var(--p, 0) * 1.45, 1)) * 100%);
}
.rsvp-inner { min-width: 0; }
#rsvp h2 { text-align: left; margin-bottom: 1rem; }
.rsvp-deadline { margin-top: 0; }

#rsvp-form {
  background: color-mix(in srgb, #fff 42%, var(--cream));
  border: 1.6px solid var(--terracotta-soft); border-radius: 20px;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: 0 18px 40px -28px rgba(143, 68, 50, .45);
}
.step-dots { display: flex; gap: .45rem; justify-content: center; margin-bottom: 1.2rem; }
.step-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.6px solid var(--terracotta-soft); background: transparent;
  transition: background .3s, transform .3s;
}
.step-dots i.active { background: var(--terracotta); border-color: var(--terracotta); transform: scale(1.25); }

fieldset.step { border: none; margin: 0; padding: 0; animation: step-in .45s ease; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
legend { font-family: var(--font-script); font-size: 1.9rem; color: var(--terracotta); margin-bottom: 1rem; padding: 0; }

label { display: block; margin-bottom: 1.1rem; }
label > span { display: block; font-size: 1rem; letter-spacing: .04em; margin-bottom: .3rem; }
input:not([type="checkbox"]), textarea {
  width: 100%; font-family: var(--font-serif); font-size: 1.15rem; color: var(--ink);
  background: transparent; border: none; border-bottom: 1.6px solid var(--terracotta-soft);
  padding: .35rem .1rem; transition: border-color .25s;
  border-radius: 0; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-bottom-color: var(--terracotta); }

.day-check {
  display: flex; align-items: center; gap: .8rem; cursor: pointer;
  border: 1.6px solid var(--terracotta-soft); border-radius: 14px;
  padding: .8rem 1rem; margin-bottom: .7rem;
  transition: background .25s, transform .2s var(--ease-over);
}
.day-check:hover { transform: translateY(-2px); }
.day-check input { position: absolute; opacity: 0; }
.day-check i {
  flex: 0 0 22px; height: 22px; border-radius: 7px;
  border: 1.7px solid var(--terracotta); position: relative;
  transition: background .2s;
}
.day-check i::after {
  content: ""; position: absolute; inset: 3px 5px 6px 4px;
  border-left: 2.4px solid var(--cream); border-bottom: 2.4px solid var(--cream);
  transform: rotate(-48deg) scale(0); transition: transform .25s var(--ease-over);
}
.day-check input:checked + i { background: var(--terracotta); }
.day-check input:checked + i::after { transform: rotate(-48deg) scale(1); }
.day-check input:checked ~ span { font-weight: 600; }
.day-check:has(input:checked) { background: var(--cream-deep); }

.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.4rem; }
button.next, button[type="submit"], button.back {
  font-family: var(--font-script); font-size: 1.45rem; cursor: pointer;
  border-radius: 999px; padding: .35rem 1.6rem;
  transition: transform .2s var(--ease-over), background .25s, color .25s;
}
button.next, button[type="submit"] {
  background: var(--terracotta); color: var(--cream); border: 1.7px solid var(--terracotta);
}
button.next:hover, button[type="submit"]:hover { transform: translateY(-2px) rotate(-1deg); }
button[type="submit"]:disabled { opacity: .55; transform: none; cursor: wait; }
button.back { background: none; color: var(--ink); border: 1.7px solid var(--terracotta-soft); }
button.back:hover { background: var(--cream-deep); }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form-error {
  color: #a3300f; font-weight: 600; margin: 1rem 0 0;
  animation: err-shake .4s ease;
}
@keyframes err-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

#rsvp-success { text-align: center; padding: 2.5rem 1rem; }
#rsvp-success h3 { font-size: clamp(2.2rem, 6vw, 3rem); animation: pop-in .6s var(--ease-over); }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } }

/* ── 8 · Footer ──────────────────────────────────────────── */
footer { text-align: center; padding: 4rem 1.5rem 3rem; overflow: hidden; }
.skyline-wrap { margin: 0 -3rem 2rem; }
.skyline { width: calc(100% + 6rem); max-width: none; height: auto; display: block; opacity: .9; }
.wa-link {
  display: inline-block; color: var(--cream); background: var(--terracotta);
  text-decoration: none; font-weight: 600; letter-spacing: .06em;
  border-radius: 999px; padding: .55rem 1.5rem; margin-top: .4rem;
  transition: transform .2s var(--ease-over), box-shadow .2s;
}
.wa-link:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 10px 24px -12px rgba(143, 68, 50, .6); }
.footer-names { font-size: 1.6rem; margin-top: 2.2rem; }

/* ── 9 · Deko / Parallax ─────────────────────────────────── */
.deco { position: absolute; pointer-events: none; opacity: .55; will-change: transform; }
.deco-lemons-tl { top: 2vh; left: -3vw; width: clamp(130px, 22vw, 260px); transform: rotate(-8deg); }
.deco-shells-r { right: -4vw; top: 8%; width: clamp(110px, 18vw, 220px); transform: rotate(10deg); }
.deco-heart { right: 12vw; bottom: 18%; width: clamp(30px, 4vw, 52px); transform: rotate(9deg); }
.deco-glasses { left: 6vw; bottom: 6%; width: clamp(90px, 12vw, 160px); transform: rotate(-11deg); }
.deco-lobster { right: 2vw; top: 4%; width: clamp(70px, 9vw, 120px); transform: rotate(14deg); }
.deco-tomato { left: 1vw; bottom: 8%; width: clamp(60px, 8vw, 110px); transform: rotate(-7deg); }

#cursor-trail { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* ── 10 · Reveals ────────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s var(--ease-over); }
[data-reveal].in-view { opacity: 1; transform: none; }
.day-art { opacity: 0; transition: opacity 1.1s ease .15s; }
.day.shine .day-art, .intro-done .day-art { opacity: 1; }

/* ── 11 · Motion-Fallbacks & Responsive ──────────────────── */
@media (max-width: 700px) {
  #route { display: none; }
  /* Mobile-Timeline: Rail am linken Rand, zeichnet sich mit dem Scroll-Fortschritt */
  #programm::before {
    content: ""; position: absolute; top: 7rem; left: 10px; width: 2px;
    background: repeating-linear-gradient(180deg,
      var(--terracotta-soft) 0 9px, transparent 9px 18px);
    height: calc((100% - 9rem) * min(var(--p, 0) * 1.6, 1));
    opacity: .75;
  }
  .day, .day-alt { grid-template-columns: 1fr; text-align: center; gap: .8rem; }
  .day-alt .day-body { order: 2; text-align: center; }
  .day-alt .day-art-wrap { order: 1; }
  .day-alt .tbd { margin-left: 0; }
  .day-art-wrap { width: min(52vw, 220px); margin: 0 auto; }
  #rsvp { grid-template-columns: 1fr; }
  /* Champagner-Pyramide klein überm Formular, füllt sich weiter beim Scrollen */
  .champagne-wrap { position: static; width: clamp(110px, 30vw, 150px); margin: 0 auto .5rem; }
  #rsvp h2 { text-align: center; }
  .rsvp-deadline { text-align: center; }
  .deco-lemons-tl { left: -12vw; }
  .deco-shells-r { right: -14vw; }
}

/* Hinweis: prefers-reduced-motion wird bewusst NICHT ausgewertet — die iOS-Einstellung
   "Bewegung reduzieren" ist weit verbreitet und hatte die Seite komplett statisch gemacht. */
