/* 
 * Franka & Sebastian — 1. Jahrestag CSS
 * Theme: Warm Editorial (Warm Alabaster, Sage Green, Champagne Gold, Charcoal)
 */

/* ==========================================================================
   1. Design System & CSS Variablen
   ========================================================================== */
:root {
  --bg-primary: #FAF9F6;      /* Edles warmes Alabaster / Sandweiß */
  --bg-secondary: #F3F1EA;    /* Sanftes Leinen / Creme-Beige */
  --color-sage: #2D4232;      /* Tiefes Salbeigrün (Natur-Akzent) */
  --color-sage-light: #526E59;/* Helles Salbeigrün */
  --color-gold: #C5A880;      /* Mattes Champagner-Gold */
  --color-gold-dark: #A98B62; /* Dunkleres Gold */
  --color-charcoal: #1C1E1B;  /* Weiches Anthrazit für exzellente Lesbarkeit */
  --color-white: #FFFFFF;
  
  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Animation Speeds */
  --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-medium: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.25s ease;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(28, 30, 27, 0.03);
  --shadow-md: 0 12px 30px -10px rgba(28, 30, 27, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(28, 30, 27, 0.1);
  --border-subtle: 1px solid rgba(45, 66, 50, 0.06);
}

/* Reset & Basis-Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition-medium);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   2. Hilfsklassen & Wiederkehrende Elemente
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-gold-dark);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-sage);
  margin-bottom: 1.5rem;
}

.section-line {
  width: 60px;
  height: 2px;
  background-color: var(--color-gold);
  margin: 0 auto 1.5rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--color-sage-light);
  font-weight: 300;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   3. INTRO SCREEN ("Unboxing" Schleife & Siegel)
   ========================================================================== */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.intro-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.intro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 2rem;
}

/* Geschenkbox / Umschlag */
.gift-box {
  width: 320px;
  height: 320px;
  background-color: var(--bg-primary);
  border-radius: 12px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(197, 168, 128, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--transition-slow);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
  border-top: 130px solid rgba(243, 241, 230, 0.8);
  border-radius: 12px 12px 0 0;
  transform-origin: top;
  z-index: 2;
  pointer-events: none;
  transition: transform var(--transition-slow);
}

.gift-card-front {
  text-align: center;
  z-index: 1;
}

.gift-initials {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-sage);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.gift-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-gold-dark);
}

/* Die Seidenschleife (Als perfektes Kreuz, das in 4 Teile bricht) */
.ribbon-vertical, .ribbon-horizontal {
  position: absolute;
  background: linear-gradient(to bottom, var(--color-sage), var(--color-sage-light));
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(45, 66, 50, 0.2);
  transition: transform var(--transition-slow);
}

/* Vertikale Schleife */
.ribbon-vertical {
  width: 28px;
  height: 100%;
  top: 0;
  left: calc(50% - 14px);
}

/* Horizontale Schleife */
.ribbon-horizontal {
  height: 28px;
  width: 100%;
  top: calc(50% - 14px);
  left: 0;
}

/* Der goldene Siegelknopf in der Mitte */
.gift-seal {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #eedebe 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
  z-index: 4;
  top: calc(50% - 35px);
  left: calc(50% - 35px);
  box-shadow: 0 4px 15px rgba(169, 139, 98, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse-seal 2.5s infinite ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gift-seal::after {
  content: '';
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.seal-inner {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--color-white);
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.gift-seal:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(169, 139, 98, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.4);
  animation-play-state: paused;
}

.intro-hint {
  margin-top: 2rem;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.6;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-sage-light);
  font-weight: 400;
  opacity: 0.8;
}

/* Animations-Klassen, wenn geöffnet */
.gift-box.opened {
  transform: scale(0.95);
}

.gift-box.opened .envelope-flap {
  transform: rotateX(160deg);
}

.gift-box.opened .ribbon-vertical {
  transform: scaleY(0);
}

.gift-box.opened .ribbon-horizontal {
  transform: scaleX(0);
}

.gift-box.opened .gift-seal {
  transform: scale(0);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97), opacity 0.4s ease;
}

@keyframes pulse-seal {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(169, 139, 98, 0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 6px 22px rgba(169, 139, 98, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(169, 139, 98, 0.4);
  }
}

/* ==========================================================================
   4. MAIN LAYOUT (Header & Hero)
   ========================================================================== */
.main-content {
  opacity: 0;
  transition: opacity 1.5s ease-out;
}

.main-content.fade-in {
  opacity: 1;
}

/* Header */
.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  z-index: 10;
}

.header-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-sage);
  letter-spacing: 2px;
  font-weight: 500;
}

.header-nav {
  display: flex;
  gap: 2.5rem;
}

.header-nav a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-sage-light);
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-gold);
  transition: var(--transition-medium);
}

.header-nav a:hover {
  color: var(--color-sage);
}

.header-nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 10rem 0 7rem;
  background-color: var(--bg-primary);
  overflow: hidden;
  text-align: center;
}

.hero-bg-accent {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.08) 0%, rgba(250, 249, 246, 0) 70%);
  pointer-events: none;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.hero-tagline {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-gold-dark);
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: fade-in-up 1s ease-out;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  color: var(--color-sage);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 800px;
  animation: fade-in-up 1.2s ease-out;
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-sage-light);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
  animation: fade-in-up 1.4s ease-out;
}

/* ==========================================================================
   5. COUNTDOWN & CELEBRATION CARD
   ========================================================================== */
.timer-card {
  width: 100%;
  max-width: 700px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  border: var(--border-subtle);
  animation: fade-in-up 1.6s ease-out;
  position: relative;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.timer-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.timer-val {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--color-sage);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.timer-divider {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-gold);
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.timer-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold-dark);
  font-weight: 500;
}

/* Feiertags-Feier Layout */
.celebration-message {
  text-align: center;
  animation: scale-up 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 1rem 0;
}

.celebration-message h2 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--color-sage);
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
}

.celebration-message p {
  font-size: 1.1rem;
  color: var(--color-sage-light);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

.sparkle-icon {
  font-size: 1.8rem;
  color: var(--color-gold);
  display: inline-block;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   6. TIMELINE SECTION ("Unsere Reise")
   ========================================================================== */
.timeline-section {
  background-color: var(--bg-secondary);
  padding: 8rem 0;
  position: relative;
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Mittellinie der Timeline */
.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: rgba(45, 66, 50, 0.15);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  margin-bottom: 6rem;
  position: relative;
  width: 100%;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Timeline Knöpfe / Punkte */
.timeline-dot {
  position: absolute;
  top: 2rem;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-gold);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.2);
  transform: translateX(-50%);
  z-index: 2;
  transition: transform var(--transition-medium);
}

.timeline-item:hover .timeline-dot {
  transform: translateX(-50%) scale(1.3);
  background-color: var(--color-sage);
}

/* Inhaltskarten */
.timeline-card {
  width: 45%;
  background-color: var(--bg-primary);
  border-radius: 12px;
  padding: 2.2rem;
  box-shadow: var(--shadow-md);
  border: var(--border-subtle);
  position: relative;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Abwechselnd links und rechts */
.timeline-item:nth-child(odd) .timeline-card {
  margin-left: auto; /* Rechte Seite */
}

.timeline-item:nth-child(even) .timeline-card {
  margin-right: auto; /* Linke Seite */
}

/* Die Pfeile an den Karten */
.timeline-card::after {
  content: '';
  position: absolute;
  top: 2rem;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline-item:nth-child(odd) .timeline-card::after {
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--bg-primary) transparent transparent;
}

.timeline-item:nth-child(even) .timeline-card::after {
  right: -10px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--bg-primary);
}

/* Card Inhalte */
.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-sage);
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--color-charcoal);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.timeline-img-wrapper {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.timeline-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.timeline-card:hover .timeline-img {
  transform: scale(1.05);
}

/* ==========================================================================
   7. GALLERY SECTION ("Augenblicke im Fokus")
   ========================================================================== */
.gallery-section {
  padding: 8rem 0;
  background-color: var(--bg-primary);
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  padding: 0.6rem 1.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  border: 1px solid rgba(45, 66, 50, 0.1);
  color: var(--color-sage-light);
  background-color: transparent;
  transition: var(--transition-medium);
}

.filter-btn:hover {
  background-color: rgba(45, 66, 50, 0.05);
  color: var(--color-sage);
}

.filter-btn.active {
  background-color: var(--color-sage);
  color: var(--color-white);
  border-color: var(--color-sage);
  box-shadow: var(--shadow-sm);
}

/* Galerie Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  transition: opacity 0.5s ease;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 380px;
  box-shadow: var(--shadow-md);
  border: var(--border-subtle);
  cursor: pointer;
  background-color: var(--bg-secondary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* Hover-Effekte */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(28, 30, 27, 0.7) 0%, rgba(28, 30, 27, 0.2) 60%, rgba(28, 30, 27, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-caption {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  transform: translateY(15px);
  transition: transform var(--transition-medium);
}

.gallery-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold);
  font-weight: 500;
  transform: translateY(15px);
  transition: transform var(--transition-medium) 0.05s;
}

.gallery-item:hover .gallery-caption,
.gallery-item:hover .gallery-category {
  transform: translateY(0);
}

/* ==========================================================================
   8. LOVE LETTER SECTION (Umschlag & Brief)
   ========================================================================== */
.letter-section {
  padding: 8rem 0;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.letter-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px; /* Ermöglicht 3D Faltung */
  padding: 2rem 0;
}

/* Der Umschlag Container */
.letter-envelope {
  position: relative;
  width: 450px;
  height: 300px;
  background-color: #E2DDD5;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 8px 8px;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

/* Umschlag Klappen */
.envelope-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #DFD9D0;
  border-radius: 0 0 8px 8px;
  z-index: 1;
}

.envelope-front {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 225px solid transparent;
  border-right: 225px solid transparent;
  border-bottom: 150px solid #ECE7DF;
  top: 150px;
  z-index: 3;
}

.envelope-front::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 225px solid #ECE7DF;
  border-top: 150px solid transparent;
  left: -225px;
  top: -150px;
}

.envelope-front::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-right: 225px solid #ECE7DF;
  border-top: 150px solid transparent;
  right: -225px;
  top: -150px;
}

/* Die obere Verschlussklappe */
.envelope-bottom-flap {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 225px solid transparent;
  border-right: 225px solid transparent;
  border-top: 155px solid #DFD9D0;
  top: 0;
  left: 0;
  transform-origin: top;
  z-index: 4;
  transition: transform 0.6s ease, z-index 0.3s ease 0.3s;
  border-radius: 8px 8px 0 0;
}

/* Das Briefpapier im Inneren */
.letter-paper {
  position: absolute;
  top: 15px;
  left: 25px;
  width: 400px;
  height: 270px;
  background-color: var(--bg-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s, 
              height 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s,
              z-index 0.1s ease 0.5s;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(197, 168, 128, 0.15);
}

.paper-content {
  opacity: 0;
  transition: opacity 0.5s ease 0.8s;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.8;
  color: #2F322F;
}

.paper-content h3 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-sage);
  text-align: center;
  margin-bottom: 0.5rem;
}

.paper-divider {
  width: 40px;
  height: 1px;
  background-color: var(--color-gold);
  margin: 0 auto 1.5rem;
}

.paper-content p {
  white-space: pre-line;
  font-weight: 300;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.paper-signature {
  text-align: right;
  font-style: italic;
  font-weight: 400;
  color: var(--color-sage-light);
}

/* Button zum Herausziehen */
.pull-letter-btn {
  position: absolute;
  bottom: -25px;
  left: calc(50% - 75px);
  width: 150px;
  padding: 0.8rem 1.5rem;
  background-color: var(--color-sage);
  color: var(--color-white);
  border-radius: 25px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 5;
}

.pull-letter-btn:hover {
  background-color: var(--color-sage-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* AKTIVIERTE BRIEF-ANIMATION (Wenn Umschlag geöffnet ist) */
.letter-envelope.letter-opened {
  transform: translateY(100px);
}

.letter-envelope.letter-opened .envelope-bottom-flap {
  transform: rotateX(180deg);
  z-index: 1; /* Schiebt sich visuell nach hinten */
  transition: transform 0.6s ease, z-index 0.1s ease 0.2s;
}

.letter-envelope.letter-opened .letter-paper {
  transform: translateY(-280px) scale(1.05);
  height: 480px;
  z-index: 4; /* Schiebt sich vor den Umschlag */
  box-shadow: var(--shadow-lg);
  overflow-y: auto; /* Ermöglicht Scrollen auf kleinen Screens */
}

.letter-envelope.letter-opened .paper-content {
  opacity: 1;
}

.letter-envelope.letter-opened .pull-letter-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* ==========================================================================
   9. LIGHTBOX (Bilder-Betrachter)
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(28, 30, 27, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-size: 2.5rem;
  color: var(--color-white);
  opacity: 0.7;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-content {
  max-width: 85%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.95);
  transition: transform var(--transition-medium);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-white);
  margin-top: 1.5rem;
  text-align: center;
  font-weight: 300;
  opacity: 0.9;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: var(--color-white);
  opacity: 0.5;
  padding: 1.5rem;
}

.lightbox-prev:hover, .lightbox-next:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--color-charcoal);
  color: rgba(250, 249, 246, 0.6);
  padding: 5rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-credit {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--bg-primary);
  font-weight: 400;
}

.footer-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold);
}

/* ==========================================================================
   11. ANIMATIONS & RESPONSIVENESS
   ========================================================================== */
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-up {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   12. PASSWORD OVERLAY (Freischalt-Bildschirm)
   ========================================================================== */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
  padding: 2rem;
}

.password-overlay.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.password-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-lg);
  border: var(--border-subtle);
  text-align: center;
  transition: transform 0.3s ease;
}

.password-card.shake {
  animation: shake-card 0.5s ease-in-out;
}

.password-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-gold-dark);
  margin-bottom: 1rem;
  font-weight: 500;
}

.password-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--color-sage);
  margin-bottom: 1rem;
}

.password-subtitle {
  font-size: 0.92rem;
  color: var(--color-sage-light);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.password-input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.password-field {
  padding: 1.1rem 1.5rem;
  border-radius: 30px;
  border: 1px solid rgba(45, 66, 50, 0.12);
  background-color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  text-align: center;
  color: var(--color-charcoal);
  font-family: inherit;
  transition: var(--transition-medium);
}

.password-field:focus {
  outline: none;
  border-color: var(--color-sage);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(45, 66, 50, 0.06);
}

.password-btn {
  padding: 1.1rem;
  border-radius: 30px;
  background-color: var(--color-sage);
  color: var(--color-white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-medium);
}

.password-btn:hover {
  background-color: var(--color-sage-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.password-btn:active {
  transform: translateY(0);
}

.password-error {
  font-size: 0.8rem;
  color: #a35b4b; /* Weiches warmes Braun-Rot */
  line-height: 1.6;
  font-weight: 400;
  margin-top: 1rem;
  animation: fade-in-up 0.3s ease;
}

@keyframes shake-card {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .timeline-container::before {
    left: 2rem;
  }
  
  .timeline-item {
    flex-direction: column;
    margin-bottom: 4rem;
  }
  
  .timeline-dot {
    left: 2rem;
    top: 1.5rem;
  }
  
  .timeline-card {
    width: calc(100% - 4rem) !important;
    margin-left: 4rem !important;
    margin-right: 0 !important;
    padding: 1.8rem;
  }
  
  .timeline-item:nth-child(odd) .timeline-card::after,
  .timeline-item:nth-child(even) .timeline-card::after {
    left: -10px !important;
    right: auto !important;
    border-width: 10px 10px 10px 0 !important;
    border-color: transparent var(--bg-primary) transparent transparent !important;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-nav {
    gap: 1.2rem;
  }
  
  .hero-section {
    padding: 8rem 0 5rem;
  }
  
  .hero-title {
    font-size: 2.4rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .timer-card {
    padding: 2rem 1rem;
  }
  
  .countdown-timer {
    gap: 0.8rem;
  }
  
  .timer-val {
    font-size: 2.2rem;
  }
  
  .timer-divider {
    font-size: 1.6rem;
    margin-bottom: 1.1rem;
  }
  
  .timer-segment {
    min-width: 60px;
  }
  
  .timer-label {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }
  
  .celebration-message h2 {
    font-size: 2rem;
  }
  
  .letter-envelope {
    width: 90vw;
    height: 60vw;
  }
  
  .envelope-front {
    top: 30vw;
    border-left: 45vw solid transparent;
    border-right: 45vw solid transparent;
    border-bottom: 30vw solid #ECE7DF;
  }
  
  .envelope-front::before {
    border-left: 45vw solid #ECE7DF;
    border-top: 30vw solid transparent;
    left: -45vw;
    top: -30vw;
  }
  
  .envelope-front::after {
    border-right: 45vw solid #ECE7DF;
    border-top: 30vw solid transparent;
    right: -45vw;
    top: -30vw;
  }
  
  .envelope-bottom-flap {
    border-left: 45vw solid transparent;
    border-right: 45vw solid transparent;
    border-top: 31vw solid #DFD9D0;
  }
  
  .letter-paper {
    width: 80vw;
    left: 5vw;
    height: 50vw;
    padding: 1.5rem;
  }
  
  .letter-envelope.letter-opened .letter-paper {
    transform: translateY(-260px) scale(1.02);
    height: 400px;
  }
  
  .pull-letter-btn {
    left: calc(50% - 65px);
    width: 130px;
    padding: 0.6rem 1rem;
  }
  
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-prev, .lightbox-next { font-size: 1.8rem; padding: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
  }
}
