/* =========================================================
   HOCHZEITS-WEBSITE — Stylesheet
   Palette:  Ivory #FBF7EF · Bg-Alt #F3ECDD · Ink #2E3B2C
             Gold #B98F4A · Gold-Soft #DCC48F · Salbei #7C8B6F
   Typo:     Display  = 'Cormorant Garamond' (Serife, für Namen/Titel)
             Body     = 'Jost' (ruhige Grotesk für Fliesstext)
   ========================================================= */

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

:root {
  --bg: #FBF7EF;
  --bg-alt: #F3ECDD;
  --ink: #2E3B2C;
  --ink-soft: #5B5A52;
  --gold: #B98F4A;
  --gold-soft: #DCC48F;
  --sage: #7C8B6F;
  --line: rgba(46, 59, 44, 0.15);

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 780px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-section {
  padding: 72px 0;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  padding: 28px 0 0;
  text-align: center;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}

.nav a {
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-alt);
}

/* ---------- Sprig divider (signature motif) ---------- */
.sprig {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
  color: var(--sage);
}
.sprig svg { width: 120px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 40px 0 20px;
}

.hero .eyebrow {
  font-size: 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 6px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .date-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

.hero-photo {
  max-width: 480px;
  margin: 36px auto 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(46, 59, 44, 0.16), 0 4px 10px rgba(46, 59, 44, 0.08);
}

.hero-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Countdown — Flip-Clock-Karten ---------- */
.countdown-live {
  margin: 48px 0 8px;
}

.sprig-countdown {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--sage);
}
.sprig-countdown svg { width: 150px; height: 30px; }

.flip-clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 3vw, 20px);
  flex-wrap: nowrap;
}

.flip-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.flip-card {
  position: relative;
  width: clamp(58px, 20vw, 92px);
  height: clamp(66px, 22vw, 100px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 26px rgba(46, 59, 44, 0.14), 0 2px 6px rgba(46, 59, 44, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 260px;
}

.flip-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(46, 59, 44, 0.16);
  z-index: 2;
}

.hinge-clip {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 15px;
  background: var(--gold-soft);
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 3;
}
.hinge-clip.hinge-left { left: -4px; }
.hinge-clip.hinge-right { right: -4px; }

.flip-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 8vw, 3rem);
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transform-style: preserve-3d;
}

.flip-number.flipping {
  animation: cardFlip 0.5s ease;
}

@keyframes cardFlip {
  0%   { transform: rotateX(0deg); opacity: 1; }
  45%  { transform: rotateX(-90deg); opacity: 0.4; }
  55%  { transform: rotateX(90deg); opacity: 0.4; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.flip-label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown-sub {
  text-align: center;
  font-size: 1rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-top: 26px;
}

@media (max-width: 400px) {
  .flip-clock { gap: 6px; }
  .flip-label { font-size: 0.58rem; letter-spacing: 0.1em; }
}

/* ---------- Section headings ---------- */
.section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-heading .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 10px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0;
}

/* ---------- Info cards (Location & Infos) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.info-card {
  background: var(--bg-alt);
  border-radius: 18px;
  padding: 30px 28px;
}

.info-card .icon {
  color: var(--gold);
  margin-bottom: 14px;
}

.info-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.map-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 28px 0;
}
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }

.note-box {
  border: 1px dashed var(--gold-soft);
  border-radius: 14px;
  padding: 20px 24px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Forms (RSVP + Login) ---------- */
.form-card {
  background: var(--bg-alt);
  border-radius: 22px;
  padding: 44px clamp(24px, 6vw, 56px);
}

.field {
  margin-bottom: 26px;
}

.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}

.field textarea { resize: vertical; min-height: 100px; }

.radio-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio-pill {
  flex: 1;
  min-width: 140px;
}

.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }

.radio-pill span {
  display: block;
  text-align: center;
  padding: 13px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.radio-pill input:checked + span {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.guests-fields { margin-top: 10px; }

.btn {
  display: inline-block;
  width: 100%;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: #23301f; }

.helper-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 16px;
}

.alert {
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.alert-error { background: #F7E4E1; color: #8A3B2E; }
.alert-success { background: #E7EEDF; color: #3E5A2C; }

/* ---------- Photo area ---------- */
.upload-box {
  border: 2px dashed var(--gold-soft);
  border-radius: 18px;
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.gallery-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-grid a:hover img { transform: scale(1.05); }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
  font-size: 0.95rem;
}

.top-bar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 12px;
}

.logout-link {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 50px 0 60px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ---------- Utility ---------- */
.center-text { text-align: center; }
.mt-0 { margin-top: 0; }
