/* ===================================================================
   FÜR DICH — gemeinsames Stylesheet
   Farben & Fonts hier zentral anpassen, falls gewünscht.
=================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root{
  --paper:        #ECE2C9;   /* Papiergrundfarbe */
  --paper-shadow: #C7B68C;   /* Knitter-Schatten */
  --paper-light:  #F6EFDB;   /* Knitter-Glanzlicht */
  --ink:          #7A1E1E;   /* dunkles Rot – Haupttextfarbe */
  --ink-soft:     #9B3A35;   /* helleres Rot für Akzente */
  --ink-faint:    rgba(122,30,30,0.55);
  --rose:         #B0495A;   /* für Blumen-Seite */
  --rose-deep:    #7E2A38;
  --leaf:         #5C6E3F;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: 'EB Garamond', serif;
}

body{
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background-color: var(--paper);
}

/* ---------- zerknülltes Papier ---------- */
.crumple-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--paper);
  background-image:
    /* feines Knitter-Rauschen */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    /* große Faltlinien */
    repeating-linear-gradient(115deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 1px, transparent 1px, transparent 140px),
    repeating-linear-gradient(25deg, rgba(0,0,0,0.045) 0px, rgba(0,0,0,0.045) 1px, transparent 1px, transparent 165px),
    repeating-linear-gradient(70deg, rgba(255,255,255,0.4) 0px, rgba(255,255,255,0.4) 1px, transparent 1px, transparent 95px),
    /* weiche Schatten-Flecken, simulieren Beulen */
    radial-gradient(ellipse 38% 26% at 12% 18%, rgba(0,0,0,0.10), transparent 60%),
    radial-gradient(ellipse 30% 22% at 85% 12%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(ellipse 40% 30% at 78% 82%, rgba(0,0,0,0.09), transparent 60%),
    radial-gradient(ellipse 35% 25% at 8% 85%, rgba(255,255,255,0.3), transparent 60%),
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(0,0,0,0.05), transparent 70%);
  background-size: 220px 220px, auto, auto, auto, auto, auto, auto, auto, auto;
}

/* dezente Vignette für mehr Tiefe */
.crumple-bg::after{
  content:"";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 55%, rgba(70,55,30,0.18) 100%);
}

main{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  padding: 8vh 6vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Typografie ---------- */
.headline{
  font-family: 'Caveat', cursive;
  font-weight: 700;
  color: var(--ink);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.1;
  margin: 0 0 0.4em 0;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

.subtitle{
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  margin: 0.2em 0 1.6em 0;
  letter-spacing: 0.02em;
}

.long-text{
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75;
  color: var(--ink);
  text-align: left;
  white-space: pre-wrap;
}

/* ---------- Bildrahmen (Polaroid-artig) ---------- */
.photo-frame{
  background: var(--paper-light);
  padding: 14px 14px 38px 14px;
  box-shadow: 0 10px 24px rgba(40,25,10,0.28), 0 2px 4px rgba(40,25,10,0.15);
  transform: rotate(-1.4deg);
  margin: 0.6em 0 1.6em 0;
  max-width: 320px;
}
.photo-frame img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  filter: sepia(8%) saturate(105%);
}
.photo-frame figcaption{
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------- Buttons: Kreuz & Haken ---------- */
.choice-row{
  display: flex;
  gap: 3.2rem;
  margin-top: 1.2em;
}

.mark-btn{
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 86px;
  height: 86px;
  padding: 0;
  position: relative;
  transition: transform 0.18s ease;
}
.mark-btn:hover{ transform: scale(1.08) rotate(-2deg); }
.mark-btn:focus-visible{
  outline: 2px dashed var(--ink);
  outline-offset: 6px;
}
.mark-btn svg{ width: 100%; height: 100%; }
.mark-btn .stroke{
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-btn.yes .stroke{ stroke: var(--ink-soft); }

/* ---------- Zurück-Pfeil ---------- */
.back-arrow{
  margin-top: 3.5em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink-faint);
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.back-arrow:hover{ opacity: 0.65; }
.back-arrow svg{ width: 34px; height: 34px; }
.back-arrow .stroke{
  fill:none; stroke: var(--ink-faint); stroke-width: 7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Blumenseite ---------- */
.flower-field{
  width: 100%;
  max-width: 560px;
  margin: 0.5em auto 1.4em;
}

.envelope-wrap{
  margin-top: 1.4em;
  background: none;
  border: none;
  cursor: pointer;
  width: 92px;
  transition: transform 0.2s ease;
}
.envelope-wrap:hover{ transform: translateY(-4px) scale(1.05); }
.envelope-wrap:focus-visible{ outline: 2px dashed var(--ink); outline-offset: 6px; }
.envelope-wrap svg{ width: 100%; height: auto; }

.hint{
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--ink-faint);
  margin-top: 0.6em;
}

/* ---------- letter.html Textfeld-Karte ---------- */
.letter-card{
  background: var(--paper-light);
  border-radius: 2px;
  padding: 2.6em 2.4em;
  box-shadow: 0 14px 30px rgba(40,25,10,0.22);
  max-width: 600px;
}

@media (max-width: 480px){
  .choice-row{ gap: 2.2rem; }
  .mark-btn{ width: 70px; height: 70px; }
  .letter-card{ padding: 1.8em 1.4em; }
}

@media (prefers-reduced-motion: reduce){
  .mark-btn, .back-arrow, .envelope-wrap{ transition: none; }
}
