/* ========================================
   v2 - Mobile First CSS
   ======================================== */

/* Fonts */
@font-face {
  font-family: "Le Jour Serif";
  src: url("LeJourSerif-Personal.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Alta";
  src: url("Alta-Regular.woff2") format("woff2");
  font-display: swap;
}

/* Variables */
:root {
  --color-olive: #7a7e62;
  --color-olive-dark: #4a4d3a;
  --color-bg: #ffffff;
  --color-cream: #F3EEE6;
  --header-height: 70px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

/* Base */
body {
  font-family: "Alta", system-ui, sans-serif;
  color: var(--color-olive-dark);
  background: var(--color-bg);
  line-height: 1.7;
  padding-top: var(--header-height);
}

/* ========================================
   HEADER - Mobile First
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-olive);
  z-index: 1000;
}

/* Burger Button - absolut links im Header */
.menu-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 10;
}
.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 6px auto;
  transition: 0.3s;
}
/* Burger Animation */
.nav-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .menu-btn span:nth-child(2) { opacity: 0; }
.nav-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Brand - zentriert im Header */
.header-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.brand-name {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.3rem;
  color: white;
  letter-spacing: 0.04em;
}
.brand-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.12em;
}

/* Navigation - Mobile: Combined Dropdown */
.nav {
  display: none;
  position: fixed;
  left: 1rem;
  right: 1rem;
  background: var(--color-olive);
  padding: 0.5rem;
  flex-direction: column;
}
.nav-left {
  top: var(--header-height);
  border-radius: 12px 12px 0 0;
  padding-bottom: 0;
}
.nav-right {
  top: calc(var(--header-height) + 96px);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  padding-top: 0;
}
.nav-open .nav { display: flex; }
.nav a {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}
.nav a:hover { background: rgba(255,255,255,0.1); }

/* ========================================
   HEADER - Desktop
   ======================================== */
@media (min-width: 680px) {
  .header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
  }
  .menu-btn { display: none; }

  .header-brand {
    position: static;
    transform: none;
    margin: 0 2rem;
  }

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 1.5rem;
    height: 100%;
    align-items: center;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-left { justify-content: flex-end; }
  .nav-right { justify-content: flex-start; }
  .nav a { padding: 0.5rem; }
}

/* ========================================
   INTRO
   ======================================== */
.intro {
  padding: 2rem 1rem;
}
.intro-text {
  margin-bottom: 2rem;
  text-align: center;
}
.intro-text .smallcaps {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-olive);
  font-size: 1.9rem;
  margin: 0 0 1rem;
}
.intro-text p {
  margin: 0.3rem 0;
  letter-spacing: 0.05em;
  font-size: 1.3rem;
}
.intro-text .author {
  margin-top: 1rem;
  color: var(--color-olive);
  letter-spacing: 0.1em;
  font-size: 1.1rem;
}
.intro-figure img {
  border-radius: 8px;
}

@media (min-width: 680px) {
  .intro {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
  }
  .intro-text { margin-bottom: 0; text-align: left; }
}

/* ========================================
   CALENDAR
   ======================================== */
.calendar {
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--color-olive);
  border-bottom: 1px solid var(--color-olive);
  max-width: 400px;
  margin: 0 auto;
}
.calendar .day {
  flex: 1;
  text-align: center;
  padding: 1rem 0.5rem;
  border-left: 1px solid rgba(122,126,98,0.4);
}
.calendar .day:not(.desktop-only):first-of-type { border-left: none; }
.calendar .day.desktop-only { display: none; }
.calendar .weekday {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.calendar .date {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 2rem;
}
.calendar .highlight {
  background: rgba(122,126,98,0.1);
  animation: glow 3s ease-in-out infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 rgba(122,126,98,0); }
  50% { box-shadow: 0 0 20px rgba(122,126,98,0.3); }
}

@media (min-width: 680px) {
  .calendar {
    max-width: 900px;
  }
  .calendar .day.desktop-only { display: block; }
  .calendar .day:first-child { border-left: none; }
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section h2 {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-olive-dark);
  margin: 0 0 0.5rem;
  text-align: center;
}
.section .lead {
  text-align: center;
  color: var(--color-olive);
  margin: 0 0 2rem;
}

/* ========================================
   AGENDA
   ======================================== */
.agenda {
  display: flex;
  flex-direction: column;
  gap: 7rem;
}
@media (min-width: 680px) {
  .agenda { gap: 5rem; }
}
.agenda-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Mobile: Bild immer zuerst */
.agenda-item figure { order: 1; }
.agenda-item .panel { order: 2; }

.agenda-item .panel {
  background: rgba(122,126,98,0.1);
  padding: 1.5rem;
  border-radius: 8px;
}
.agenda-item .panel h3 {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.4rem;
  color: var(--color-olive);
  margin: 0 0 0.75rem;
  font-weight: normal;
}
.agenda-item .panel p { margin: 0; }
.agenda-item figure { margin: 0; }
.agenda-item img { border-radius: 8px; }

@media (min-width: 680px) {
  .agenda-item {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: center;
  }
  .agenda-item .panel { order: 1; }
  .agenda-item figure { order: 2; }
  .agenda-item.reverse .panel { order: 2; }
  .agenda-item.reverse figure { order: 1; }
}

/* ========================================
   HOTEL
   ======================================== */
.hotel-img {
  margin: 0 0 1.5rem;
}
.hotel-img img {
  border-radius: 8px;
}
.hotel-content {
  max-width: 800px;
  margin: 0 auto;
}
.hotel-intro p {
  max-width: 65ch;
  margin: 0 0 1rem;
}
.hotel-booking {
  background: var(--color-cream);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}
.hotel-booking h3 {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.2rem;
  color: var(--color-olive);
  margin: 0 0 1rem;
  font-weight: normal;
}
.hotel-booking p {
  margin: 0 0 0.5rem;
}
.hotel-booking p:last-child {
  margin-bottom: 0;
}
.hotel-contact {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}
.hotel-contact a {
  color: var(--color-olive-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--color-olive);
}
.hotel-contact a:hover {
  color: var(--color-olive);
}

/* ========================================
   FAQ
   ======================================== */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}
.accordion details {
  margin: 0.5rem 0;
  background: var(--color-cream);
  border-radius: 6px;
}
.accordion summary {
  padding: 1rem 2.5rem 1rem 1rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--color-olive-dark);
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}
.accordion details[open] summary::after { content: "−"; }
.accordion details[open] summary {
  border-bottom: 1px solid rgba(122,126,98,0.2);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}
.accordion details p {
  padding: 0 1rem 0.75rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-olive-dark);
}

/* ========================================
   RSVP
   ======================================== */
.rsvp {
  max-width: 600px;
  margin: 0 auto;
}
.rsvp .grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 500px) {
  .rsvp .grid { grid-template-columns: 1fr 1fr; }
}
.rsvp label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-olive-dark);
}
.rsvp input, .rsvp select, .rsvp textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.75rem;
  border: 1px solid rgba(122,126,98,0.3);
  border-radius: 8px;
  font: inherit;
  color: var(--color-olive-dark);
}
.rsvp input:focus, .rsvp select:focus, .rsvp textarea:focus {
  outline: none;
  border-color: var(--color-olive);
}
.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-olive-dark);
  border-radius: 999px;
  background: none;
  color: var(--color-olive-dark);
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover {
  background: var(--color-olive-dark);
  color: white;
}
.btn.secondary {
  border-color: rgba(122,126,98,0.4);
}
.form-note { margin: 0.5rem 0 0; }

/* ========================================
   GALLERY
   ======================================== */
.gallery {
  columns: 1;
  gap: 1rem;
}
.gallery figure {
  margin: 0 0 1rem;
  break-inside: avoid;
}
.gallery img {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
@media (min-width: 600px) { .gallery { columns: 2; } }
@media (min-width: 900px) { .gallery { columns: 3; } }

/* ========================================
   FOOTER
   ======================================== */
.footer {
  height: 60px;
  background: var(--color-olive);
}

/* ========================================
   ACCESS GATE
   ======================================== */
.access-gate {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.access-gate.hidden {
  display: none;
}
.access-dialog {
  text-align: center;
  padding: 2rem;
}
.access-title {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 2.5rem;
  color: var(--color-olive);
  display: block;
  margin-bottom: 2rem;
}
.access-hint {
  color: var(--color-olive-dark);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}
#accessCode {
  width: 180px;
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: 0.4em;
  padding: 0.75rem;
  border: 1px solid var(--color-olive);
  border-radius: 8px;
  background: transparent;
  color: var(--color-olive-dark);
  font-family: inherit;
}
#accessCode:focus {
  outline: none;
  border-color: var(--color-olive-dark);
}
#accessCode::placeholder {
  color: rgba(122,126,98,0.4);
  letter-spacing: 0.3em;
}
.access-error {
  color: #a05252;
  margin: 1rem 0 0;
  min-height: 1.5em;
}

/* ========================================
   FADE IN ON SCROLL
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ========================================
   FAB (Floating Action Button)
   ======================================== */
.fab {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--color-olive);
  border: 1px solid var(--color-olive);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}
.fab.visible {
  display: block;
}
.fab.accepted {
  background: #5a7a5a;
  color: white;
  border-color: #5a7a5a;
}
.fab.declined {
  background: #f5f5f5;
  color: #888;
  border-color: #ddd;
}

/* ========================================
   BOTTOM SHEET
   ======================================== */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}
.bottom-sheet.open {
  visibility: visible;
  pointer-events: auto;
}
.bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.3s;
}
.bottom-sheet.open .bottom-sheet-backdrop {
  opacity: 1;
}
.bottom-sheet-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-radius: 20px 20px 0 0;
  padding: 1rem 1.5rem 2rem;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}
.bottom-sheet.open .bottom-sheet-content {
  transform: translateY(0);
}
@media (min-width: 680px) {
  .bottom-sheet-content {
    left: 0;
    right: 0;
    width: 400px;
    margin: 0 auto;
  }
}
.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(122,126,98,0.3);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}
.bottom-sheet-content h3 {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 1.5rem;
  color: var(--color-olive);
  margin: 0 0 0.5rem;
  text-align: center;
  font-weight: normal;
}
.bottom-sheet-content p {
  text-align: center;
  color: var(--color-olive-dark);
  margin: 0 0 1.5rem;
}
.bottom-sheet-field {
  margin-bottom: 1.5rem;
}
.bottom-sheet-field label {
  display: block;
  text-align: center;
  color: var(--color-olive-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.person-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.counter-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-olive);
  background: transparent;
  color: var(--color-olive);
  font-size: 1.5rem;
  cursor: pointer;
  transition: 0.2s;
}
.counter-btn:hover {
  background: var(--color-olive);
  color: white;
}
.counter-value {
  font-family: "Le Jour Serif", Georgia, serif;
  font-size: 2rem;
  color: var(--color-olive-dark);
  min-width: 2rem;
  text-align: center;
}
.bottom-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.btn-accept, .btn-decline {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn-accept {
  background: var(--color-olive);
  color: white;
  border: none;
}
.btn-accept:hover {
  background: var(--color-olive-dark);
}
.btn-decline {
  background: transparent;
  color: var(--color-olive-dark);
  border: 1px solid rgba(122,126,98,0.3);
}
.btn-decline:hover {
  border-color: var(--color-olive);
}
