/* =========================================================
   FARBEN & GRUNDEINSTELLUNGEN
   ========================================================= */
:root {
  --cream:      #f7f3ec;   /* Hintergrund */
  --cream-2:    #efe8dc;   /* Karten / Abschnitte */
  --ink:        #3a3630;   /* Text */
  --ink-soft:   #6f685e;   /* Sekundärtext */
  --sage:       #8a9a7b;   /* Salbeigrün Akzent */
  --sage-dark:  #6d7c5e;
  --gold:       #b89b5e;   /* Gold Akzent */
  --rose:       #d8a7a0;   /* zarter Rosé */
  --white:      #fffdf9;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-script:  "Great Vibes", cursive;
  --font-body:    "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 18px 40px rgba(58, 54, 48, 0.10);
  --maxw: 720px;
}

/* Arabische Schriften, wenn <html lang="ar"> */
html[lang="ar"] {
  --font-display: "Aref Ruqaa", serif;
  --font-script:  "Aref Ruqaa", serif;
  --font-body:    "Amiri", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* dezenter Blumen-/Textur-Verlauf im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(138,154,123,0.10), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(216,167,160,0.12), transparent 36%),
    radial-gradient(circle at 78% 88%, rgba(184,155,94,0.10), transparent 40%),
    var(--cream);
}

img { max-width: 100%; display: block; }
a { color: var(--sage-dark); }

/* =========================================================
   INTRO / BLUR-OVERLAY
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(247, 243, 236, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  padding: 24px;
}

.intro__hint {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-soft);
  animation: fadeUp 1.4s ease both;
}

/* Runder Button */
.open-btn {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 50% 35%, var(--white), var(--cream-2));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(184,155,94,0.18);
  display: grid;
  place-items: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: popIn 1s cubic-bezier(.16,1,.3,1) both;
}
.open-btn:hover { transform: scale(1.04); box-shadow: 0 22px 50px rgba(58,54,48,0.16); }
.open-btn:active { transform: scale(0.98); }

.open-btn__ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.55;
  animation: pulse 2.6s ease-in-out infinite;
}

.open-btn__content { display: flex; flex-direction: column; gap: 6px; }
.open-btn__names {
  font-family: var(--font-script);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ink);
}
.open-btn__sub {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--sage-dark);
}

/* =========================================================
   SPRACH-UMSCHALTER
   ========================================================= */
.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 253, 249, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  /* bleibt auf Arabisch an gleicher Stelle und in gleicher Reihenfolge */
  direction: ltr;
}

.lang-switch button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 2px 4px;
  transition: color 0.25s ease;
}
.lang-switch button.active { color: var(--sage-dark); font-weight: 600; }
.lang-switch__divider { width: 1px; height: 14px; background: rgba(58,54,48,0.18); }

/* =========================================================
   ALLGEMEINE LAYOUTS
   ========================================================= */
.content { opacity: 1; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 12vw, 110px) 24px;
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 36px;
}

/* Scroll-Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   1) HERO – Vornamen
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.hero__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--sage-dark);
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 400;
  line-height: 1;
}
.hero__names .name {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 16vw, 7rem);
  color: var(--ink);
}
.hero__names .amp {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  color: var(--gold);
  font-style: italic;
  margin: -6px 0;
}

.hero__scroll {
  margin-top: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  animation: floatY 2.6s ease-in-out infinite;
}
.hero__scroll-text {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.66rem;
  color: var(--sage-dark);
  opacity: 0.9;
}
.hero__chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 30px;
}
.hero__chevrons span {
  display: block;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0;
  animation: chevron 2s infinite;
}
.hero__chevrons span:nth-child(1) { animation-delay: 0s; }
.hero__chevrons span:nth-child(2) { animation-delay: 0.18s; }
.hero__chevrons span:nth-child(3) { animation-delay: 0.36s; }

/* schwebende Blütenblätter (CSS-Punkte als dezente Deko) */
.hero__petals { position: absolute; inset: 0; pointer-events: none; }

/* =========================================================
   2) WELCOME + AYA
   ========================================================= */
.welcome { background: transparent; }

.welcome__aya {
  background: var(--cream-2);
  border-radius: var(--radius);
  padding: clamp(28px, 7vw, 48px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(184,155,94,0.18);
}
.aya__arabic {
  font-family: "Amiri", serif;
  font-size: clamp(1.4rem, 5.5vw, 2rem);
  line-height: 2;
  color: var(--ink);
  direction: rtl;
}
.aya__translation {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  color: var(--ink-soft);
  margin-top: 18px;
}
.aya__ref {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.divider { margin: 44px 0; }
.divider__leaf {
  color: var(--sage);
  font-size: 1.2rem;
  position: relative;
}
.divider__leaf::before,
.divider__leaf::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 70px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sage));
}
.divider__leaf::before { right: 26px; transform: scaleX(-1); }
.divider__leaf::after { left: 26px; }

.welcome__lead {
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--sage-dark);
  margin-bottom: 14px;
}
.welcome__fullnames {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 20px;
}
.welcome__and { color: var(--gold); font-style: italic; padding: 0 6px; }
.welcome__body {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
}

/* =========================================================
   3) KACHELN – Datum & Ort
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 6vw, 40px) 24px;
  text-align: center;
  /* Reihenfolge bleibt auch auf Arabisch gleich (Datum links, Ort rechts) */
  direction: ltr;
}
.card {
  position: relative;
  background: linear-gradient(170deg, var(--white), var(--cream-2));
  border-radius: var(--radius);
  padding: clamp(34px, 6vw, 46px) 24px clamp(28px, 5vw, 38px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(184, 155, 94, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px rgba(58, 54, 48, 0.14);
}
.card__badge {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(138, 154, 123, 0.10);
  box-shadow: 0 0 0 6px rgba(184, 155, 94, 0.06);
  margin-bottom: 18px;
}
.card__badge svg { width: 27px; height: 27px; }
.card__title {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--sage-dark);
}
.card__rule {
  width: 34px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 12px 0 16px;
}
.card__big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 4.6vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink);
}
.card__sub {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-top: 4px;
}
.card .btn { margin-top: 22px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  margin-top: 12px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--white);
  background: var(--sage);
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn:hover { background: var(--sage-dark); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--full { width: 100%; margin-top: 18px; padding: 14px; font-size: 0.95rem; }

/* Dezente Outline-Variante (für die Kacheln) */
.btn--ghost {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid var(--sage);
}
.btn--ghost:hover {
  background: var(--sage);
  color: var(--white);
}

/* =========================================================
   4) COUNTDOWN
   ========================================================= */
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
  /* gleiche Reihenfolge wie auf Deutsch (Tage links → Sekunden rechts),
     auch wenn die Seite auf Arabisch (RTL) steht */
  direction: ltr;
}
.cd-unit {
  background: var(--cream-2);
  border-radius: 14px;
  padding: 18px 8px;
  border: 1px solid rgba(184,155,94,0.16);
}
.cd-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 8vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
}
.cd-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown__done {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--rose);
}

/* =========================================================
   5) RSVP
   ========================================================= */
.rsvp__intro {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 520px;
  margin: -16px auto 34px;
}
.rsvp__form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 6vw, 38px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(184,155,94,0.16);
}
html[lang="ar"] .rsvp__form { text-align: right; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(58,54,48,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138,154,123,0.18);
}
.field textarea { resize: vertical; }

.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 0 !important;
}
.radio input { width: auto; accent-color: var(--sage); }

.form-status {
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}
.form-status.ok { color: var(--sage-dark); }
.form-status.err { color: #c0584f; }

/* =========================================================
   6) FOOTER
   ========================================================= */
.footer {
  text-align: center;
  padding: 50px 24px 60px;
  background: var(--cream-2);
}
.footer__leaf { color: var(--sage); display: block; margin-bottom: 12px; }
.footer__text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer__text a { color: var(--gold); text-decoration: none; font-weight: 500; }
.footer__text a:hover { text-decoration: underline; }

/* =========================================================
   ANIMATIONEN
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.06); opacity: 0.15; }
}
@keyframes chevron {
  0%   { opacity: 0; transform: rotate(45deg) translate(-3px, -3px); }
  50%  { opacity: 0.9; }
  100% { opacity: 0; transform: rotate(45deg) translate(3px, 3px); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   ARABISCHE FEINHEITEN
   (letter-spacing trennt sonst die verbundenen Buchstaben)
   ========================================================= */
html[lang="ar"] .hero__eyebrow,
html[lang="ar"] .card__title,
html[lang="ar"] .open-btn__sub,
html[lang="ar"] .hero__scroll-text,
html[lang="ar"] .cd-label,
html[lang="ar"] .aya__ref,
html[lang="ar"] .lang-switch button,
html[lang="ar"] .footer__text {
  letter-spacing: 0;
}

/* =========================================================
   RESPONSIVE – HANDY
   ========================================================= */
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .countdown__grid { gap: 8px; }
  .cd-unit { padding: 14px 4px; }
  .open-btn { width: 168px; height: 168px; }
  .open-btn__names { font-size: 2.2rem; }
  .lang-switch { top: 12px; right: 12px; }
}
