/* Schriften lokal statt von Google (DSGVO): Cormorant Garamond + Jost, SIL Open Font License */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-wght-italic.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/jost-latin-wght-normal.woff2) format('woff2'); }

/* Palette aus dem Moodboard: Sonnenblumengelb + Creme + Salbei */
:root {
  --cream: #faf6ee;
  --paper: #fffdf8;
  --sage: #8a9a7b;
  --sage-dark: #4f5d45;
  --sun: #e3b23c;
  --ink: #2f332b;
  --muted: #6d7266;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 300 17px/1.7 var(--sans); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--sage-dark); }
h3 { font-size: 1.4rem; }
a { color: var(--sage-dark); }
.center { text-align: center; }
.eyebrow { font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: var(--sage); margin: 0 0 .6em; font-weight: 500; }
.note { color: var(--muted); font-size: .92rem; }

.hero {
  min-height: 92vh; display: grid; place-items: center; text-align: center; color: #fff; padding: 2rem;
  background: linear-gradient(rgba(30,35,25,.35), rgba(30,35,25,.5)), url(/img/terrasse.jpg) center/cover;
}
.hero .eyebrow { color: #f3e6c4; }
.hero h1 { font-size: clamp(3.2rem, 10vw, 6.5rem); margin: 0; }
.amp { font-style: italic; color: var(--sun); }
.hero-date { font-family: var(--serif); font-size: 1.7rem; margin: .4em 0 0; }
.hero-place { margin: .2em 0 2rem; opacity: .9; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; font: 500 .85rem var(--sans);
  letter-spacing: .15em; text-transform: uppercase; padding: 1rem 2.2rem; border-radius: 999px;
  background: var(--sage-dark); color: #fff; transition: background .2s;
}
.btn:hover { background: var(--ink); }
.btn:disabled { opacity: .6; }
.btn-light { background: rgba(255,255,255,.92); color: var(--sage-dark); }
.btn-light:hover { background: #fff; }

.nav {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.8rem;
  padding: .9rem 1rem; background: rgba(250,246,238,.94); backdrop-filter: blur(6px); border-bottom: 1px solid #e7e0cf;
}
.nav a { text-decoration: none; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.nav a:hover { color: var(--sage-dark); }

.section { max-width: 1080px; margin: 0 auto; padding: 5.5rem 1.5rem; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4rem; align-items: center; }
.portrait { border-radius: 200px 200px 12px 12px; aspect-ratio: 3/4; object-fit: cover; object-position: center 30%; }
.countdown { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--sun); }

.timeline { list-style: none; padding: 0; margin: 2.5rem auto 1.5rem; max-width: 760px; position: relative; --tl-x: 50%; }
.timeline li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; padding: 0 0 2rem; position: relative; }
.timeline li::before { content: ''; position: absolute; left: calc(var(--tl-x) - 6px); top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--cream); border: 2px solid #d8cfb5; z-index: 1; transition: background .3s, border-color .3s; }
.timeline li.past::before { background: var(--sun); border-color: var(--sun); }
.timeline li time, .timeline li h3 { transition: color .3s; }
.timeline li:not(.past) time { color: #a3a796; }
/* durchgehende Linie + Fortschritt + wandernder Punkt (Position per JS) */
.tl-track, .tl-fill { position: absolute; left: var(--tl-x); width: 1px; background: #d8d1bd; }
.tl-fill { width: 2px; margin-left: -.5px; background: var(--sun); height: 0; }
.tl-dot { position: absolute; left: var(--tl-x); top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px rgba(227,178,60,.22), 0 4px 10px rgba(0,0,0,.12); z-index: 2; will-change: transform; }
.tl-track { top: 0; }
.timeline time { font-family: var(--serif); font-size: 1.5rem; color: var(--sage-dark); text-align: right; }
.timeline div { padding-left: 0; }
.timeline h3 { margin: 0; }
.timeline p { margin: .1rem 0 0; color: var(--muted); }

.cards { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: var(--paper); border: 1px solid #ebe4d3; border-radius: 10px; padding: 1.6rem; }
.card p { margin: 0 0 .6rem; color: var(--muted); }

.rsvp { max-width: none; background: #eef0e8; }
.rsvp form { display: grid; gap: 1.2rem; margin-top: 2rem; }
.choice { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.choice label { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; line-height: 1.2; font-size: 1rem; color: var(--ink); min-height: 44px; }
.details { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; }
.details[hidden] { display: none; }
label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
input:not([type=radio]), select, textarea {
  font: 400 1rem var(--sans); color: var(--ink); padding: .7rem .8rem; border: 1px solid #cfd3c4; border-radius: 6px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
input[type=radio] { accent-color: var(--sage-dark); width: 1.1rem; height: 1.1rem; margin: 0; flex: none; }
.rsvp .btn { justify-self: center; margin-top: .5rem; }
.status { min-height: 1.5em; color: var(--sage-dark); font-weight: 400; }

.footer { text-align: center; padding: 3rem 1rem; font-family: var(--serif); font-size: 1.2rem; color: var(--muted); }

@media (max-width: 760px) {
  .split, .cards, .details { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { max-width: 320px; margin: 0 auto; }
  .timeline li { gap: 2.4rem; }
  .section { padding: 4rem 1.2rem; }
}

/* ---------- Umschlag mit Wachssiegel (Intro) ---------- */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.locked { overflow: hidden; }
/* Ablauf beim Öffnen (langsam, gestaffelt): Siegel 0–0,8 s · Klappe 0,6–2,2 s · Karte 1,9–3,5 s · Überblendung 3,4–4,6 s */
.envelope { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: #e7decd var(--grain); transition: opacity 1.2s ease 3.4s, visibility 0s 4.6s; }
.env-obj { --fh: 54%; --rise: -46%; --nf: 5.5cqw; container-type: inline-size; position: absolute; left: 50%; top: 58%; translate: -50% -50%; aspect-ratio: 3 / 2;
  width: min(80vw, 90vh, 900px); width: min(80vw, 90dvh, 900px); transition: scale 1.4s cubic-bezier(.5,0,.2,1) 3.3s; }
@media (orientation: portrait) {
  /* Handy hochkant: Umschlag steht hochkant, Klappe flacher, Platz über dem Umschlag für die geöffnete Klappe */
  .env-obj { --fh: 38%; --rise: -40%; --nf: 7cqw; aspect-ratio: 5 / 7; top: 56%; width: min(86vw, 46vh); width: min(86vw, 46dvh); }
}
.env-inside, .pocket, .pocket-bottom, .flap-wrap { position: absolute; inset: 0; }
.env-inside { background: #ddd1bb; border-radius: 6px; box-shadow: 0 18px 40px -12px rgba(90,70,40,.35), 0 2px 6px rgba(90,70,40,.12); }
.pocket i, .pocket-bottom i { position: absolute; inset: 0; background: #ebe2d1 var(--grain); }
.pocket .p-left { clip-path: polygon(0 0, 50% var(--fh), 0 100%); border-radius: 6px 0 0 6px; }
.pocket .p-right { clip-path: polygon(100% 0, 50% var(--fh), 100% 100%); border-radius: 0 6px 6px 0; }
.pocket-bottom { filter: drop-shadow(0 -1px 1.5px rgba(110,90,60,.18)); }
.pocket-bottom i { background-color: #f0e8da; clip-path: polygon(0 100%, 50% var(--fh), 100% 100%); border-radius: 0 0 6px 6px; }
.flap-wrap { perspective: 1600px; filter: drop-shadow(0 3px 5px rgba(110,90,60,.16)); z-index: 4; }
.flap { position: absolute; left: 0; right: 0; top: 0; height: var(--fh); transform-origin: top; border-radius: 6px 6px 0 0;
  background: #f3ecdf var(--grain); clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform 1.6s cubic-bezier(.55,.05,.3,1) .6s; }
.letter { position: absolute; left: 5%; right: 5%; top: 5%; bottom: 5%; z-index: 1; background: #fffdf8; border-radius: 3px;
  box-shadow: 0 1px 4px rgba(90,70,40,.18); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 7%;
  text-align: center; transition: transform 1.6s cubic-bezier(.4,0,.2,1) 1.9s; }
.letter-eyebrow { margin: 0; font: 500 .68rem var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--sage); }
.letter-names { margin: .3em 0 0; font: 400 clamp(1rem, var(--nf), 2.6rem)/1.1 var(--serif); color: var(--sage-dark); }
.letter-date { margin: .4em 0 0; font: 400 .95rem var(--serif); color: var(--muted); }
.pocket, .pocket-bottom { z-index: 2; }
.seal { position: absolute; top: var(--fh); left: 50%; translate: -50% -50%; width: min(156px, 30%); aspect-ratio: 1; height: auto; border: 0; padding: 0; cursor: pointer; background: none; transition: transform .8s ease, opacity .7s ease; z-index: 5; }
.seal svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 8px 12px rgba(70,50,20,.3)); }
.seal:hover { transform: scale(1.04); }
.seal:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 4px; border-radius: 50%; }
.hint { position: absolute; top: calc(100% + 1.6rem); left: -20%; right: -20%; text-align: center; font: 500 .72rem var(--sans); letter-spacing: .32em; text-transform: uppercase; color: #8b7f68; animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.envelope.open .seal { transform: scale(.85); opacity: 0; }
.envelope.open .hint { animation: none; opacity: 0; transition: opacity .4s ease; }
.envelope.open .flap { transform: rotateX(178deg); }
/* Sobald die Klappe senkrecht steht, rutscht sie hinter die Karte */
.envelope.open .flap-wrap { z-index: 0; transition: z-index 0s 1.4s; }
.envelope.open .letter { transform: translateY(var(--rise)); }
.envelope.open .env-obj { scale: 1.06; }
.envelope.open { opacity: 0; visibility: hidden; cursor: pointer; }
.envelope.gone { display: none; }
/* Seite taucht beim Öffnen sanft auf */
.opened .hero-inner { animation: rise 1.6s ease 3.6s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .envelope, .env-obj, .flap, .flap-wrap, .letter, .seal, .hint, .opened .hero-inner { transition: none !important; animation: none !important; } }

/* Hotelliste in der Karte „Übernachten“ */
.hotels { list-style: none; padding: 0; margin: .4rem 0 0; }
.hotels li { padding: .45rem 0; border-top: 1px solid #ebe4d3; line-height: 1.35; }
.hotels li:first-child { border-top: 0; }
.hotels a { font-weight: 400; }
.hotels span { display: block; font-size: .85rem; color: var(--muted); }
