/* 
  Elegante Hochzeitsseite – Deutsch standard
  - Mobile-first, responsiv, zugänglich
  - Fonts: Playfair Display (Headings) + Inter (Body)
  - Weniger Rundungen, größere Bilder, horizontale Galerie
*/

/* CSS Variablen */
:root {
  --bg: #ffffff;
  --bg-alt: #faf6f5;
  --text: #222222;
  --muted: #6b6b6b;
  --primary: #8A9A8A; /* Salbei */
  /* 
  Alternativ: #6B7F6E oder #7F8F7A
  */
  /* --primary-contrast: #ffffff; */
  --primary-contrast: #fdfdfd;
  --accent: #d4a5a5;  /* Rosé */
  --border: #e6e2e1;
  --error: #c0392b;
  --focus: var(--primary);

  --max-w: 1200px;
  --radius: 6px;        /* weniger Rundungen */
  --radius-img: 0px;    /* Bilder ohne Rundungen */
  --shadow: 0 6px 24px rgba(0,0,0,0.08);
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
}

/* Reset + Basis */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans Pro", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Typografie */
h1, h2, h3, .display {
  font-family: "Raleway", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: #1a1a1a;
}
h1 { font-size: clamp(30px, 4.8vw, 48px); margin: var(--space-3) 0; }
h2 { font-size: clamp(26px, 3.6vw, 38px); margin: var(--space-4) 0 var(--space-3); }
h3 { font-size: clamp(18px, 2.4vw, 22px); margin: var(--space-3) 0 var(--space-2); }
.lead { font-weight: 600; }
.overline {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}
.display {
  font-size: clamp(42px, 7.6vw, 72px);
  font-weight: 600;
}
.date { font-weight: 600; color: var(--primary); }
.intro { max-width: 62ch; }

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-3);
}
.brand {
  font-family: "Raleway", Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  color: #1a1a1a;
}
.lang-switch .btn.small {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.nav-toggle {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none; /* mobil: verborgen bis toggled */
  flex-direction: column;
  gap: 8px;
  position: absolute;
  top: 64px;
  right: var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: var(--space-3);
}
.nav-links.open { display: flex; }
.nav-links a {
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}
.nav-links a:hover:not(.btn-primary) {
  background: var(--bg-alt);
  text-decoration: none;
}
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: var(--space-3);
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
}

/* Sektionen */
.section {
  padding: var(--space-4) 0;
  /* Offset anchor scrolling so sections aren't hidden under the sticky header */
  scroll-margin-top: 80px;
}
.section.alt { background: var(--bg-alt); }
.section-header {
  text-align: center;
  margin-bottom: var(--space-4);
}
.section-header p {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--muted);
}

/* Hero – großes Bild, Text darunter */
.hero {
  display: grid;
  gap: var(--space-4);
}
.hero-media {
  width: 100%;
  aspect-ratio: 21/10;
  overflow: hidden;
  background: transparent;
  border-radius: var(--radius-img);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}
/* Adjust object position for mobile */
.hero-media img[src$="20220320-00039.jpg"] { object-position: center 15%; }

/* Specific crop for hero image 20220320-00039 on desktop */
@media (min-width: 960px) {
  .hero-media img[src$="20220320-00039.jpg"] { object-position: center 15%; }
}
.hero-content {
  text-align: left;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.btn:hover { text-decoration: none; background: var(--primary-contrast) }

.btn-primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover {
  filter: none;
  background: #7C8F7C;
}

.btn:focus,
.nav-toggle:focus,
.lang-switch .btn.small:focus {
  box-shadow: 0 0 0 3px rgba(138, 154, 138, 0.35);
}

/* Galerie – horizontales Scrollen, große Bilder */
.gallery-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
}
.gallery-scroll::-webkit-scrollbar {
  height: 8px;
}
.gallery-scroll::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 6px;
}
.gallery-item {
  flex: 0 0 auto;
  /* Portrait-optimized size: narrower and taller card */
  width: min(80vw, 500px);
  aspect-ratio: 3/4;
  scroll-snap-align: start;
  background: #eee;
  border-radius: var(--radius-img);
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  /* Show full portrait images without cropping */
  object-fit: cover;
  /* Allow per-image control when using cover; harmless with contain */
  object-position: var(--obj-pos, center center);
}

/* Optional helpers for common focal points */
.gallery-item img.focus-top { --obj-pos: center top; }
.gallery-item img.focus-bottom { --obj-pos: center bottom; }
.gallery-item img.focus-left { --obj-pos: left center; }
.gallery-item img.focus-right { --obj-pos: right center; }

/* Story-Text darunter */
.story-text {
  margin-top: var(--space-5);
  max-width: 80ch;
}

/* Details */
.details-grid {
  display: grid;
  gap: var(--space-4);
}

/* Elegantly centered date & time in purple */
.datetime-center {
  display: flex;
  flex-direction: column;
  align-items: center;   /* horizontal centering */
  justify-content: center; /* vertical centering */
  text-align: center;
  min-height: 240px;     /* more vertical balance within tile */
}
.datetime-center .datelead {
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 8px;
  font-size: clamp(40px, 3.6vw, 48px);
}
.datetime-center .ceremonytime {
  color: var(--text);
  font-weight: 600;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 38px);
  letter-spacing: 0.02em;
}
/* Thin dotted divider between date and time */
.dt-divider {
  display: inline-block;
  width: 0;
  height: 28px;
  border-left: 1px solid color-mix(in oklab, var(--primary) 60%, #ffffff);
  opacity: 0.6;
  margin: 10px 0 12px;
}
.details-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}
.details-card-wide {
  grid-column: 1;
}
@media (min-width: 840px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Zeitplan */
.timeline {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}
.timeline li {
  display: flex;
  align-items: baseline;
  gap: 30px;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
  font-size: 20px;
}
.timeline li:last-child { border-bottom: 0; }
.time {
  display: inline-block;
  min-width: 56px;
  font-weight: 600;
  color: var(--primary);
}

/* Ort & Karte – kombiniert */
.location-map {
  display: grid;
  gap: var(--space-3);
}
.location-text {
  font-size: 16px;
}
.map-embed {
  border: 1px solid var(--border);
  background: #ddd;
}
.map-embed iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}
@media (min-width: 960px) {
  .location-map {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

/* Dresscode */
.dress-grid {
  display: grid;
  gap: var(--space-4);
}
.dress-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}
.dress-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
@media (min-width: 900px) {
  .dress-grid {
    /* Center two dress items on desktop */
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 900px;
    margin: 0 auto;
    justify-items: stretch;
    /* Stretch items to ensure equal heights across the row */
    align-items: stretch;
  }
  /* Ensure tiles fill the grid track height */
  .dress-item { height: 100%; }
}

/* Karten (geteilt) */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow);
}

/* Formular */
.form-group { margin-bottom: var(--space-3); }
.form-inline { display: grid; gap: var(--space-3); }
label { font-weight: 600; }
.required { color: var(--accent); }
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(111, 74, 120, 0.15);
  outline: none;
}
input[type="radio"],
input[type="checkbox"] { transform: translateY(1px); }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.error {
  color: var(--error);
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: 8px;
}
.actions { margin-top: var(--space-4); }
.status {
  display: none;
  margin-top: var(--space-3);
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text);
  min-height: 24px;
}
.status.is-visible {
  display: block;
}

/* Dynamische Gäste-Details */
.guest-details.subtle {
  border-style: dashed;
  color: #444;
  background: #fff;
}
.guest-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.guest-block h4 {
  margin: 0 0 var(--space-2) 0;
  font-size: 16px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
  background: #fff;
}
.small { font-size: 13px; }
.muted { color: var(--muted); }
