:root {
  --color-bg: #faf6f2;
  --color-gold: #b8956a;
  --color-gold-dark: #6b5430;
  --color-text: #2a2218;
  --color-text-light: #5c5248;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(184, 149, 106, 0.22);
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-cursive: 'Great Vibes', 'Segoe Script', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body:not(.app-ready):not(.lite-mode) {
  overflow: hidden;
  height: 100dvh;
}

body:not(.app-ready) #main-content {
  visibility: hidden;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  cursor: pointer;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

#preloader.preloader-exiting {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
  width: 100%;
  padding: 0 24px;
  opacity: 0;
  transform: translateY(8px);
  animation: preloaderReveal 0.7s ease-out 0.08s forwards;
}

.preloader-names {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preloader-bismillah {
  font-family: var(--font-cursive);
  font-size: 1.35rem;
  color: var(--color-gold-dark);
  opacity: 0;
  animation: preloaderIn 0.75s ease-out 0.45s both;
}

.preloader-couple {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  letter-spacing: 2px;
  opacity: 0;
  animation: preloaderIn 0.75s ease-out 0.85s both;
}

.preloader-line {
  height: 1px;
  width: 0;
  margin: 18px auto;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
  animation: lineExpand 0.75s ease-in-out forwards;
}

.preloader-line-top { animation-delay: 0.2s; }
.preloader-line-bottom { animation-delay: 1.05s; }

.preloader-skip {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 1px;
  opacity: 0;
  animation: skipHint 2s ease-in-out 2.6s infinite;
}

.lang-switcher {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 10001;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}

.lang-btn {
  min-width: 34px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-light);
  font: 600 0.7rem/1 var(--font-sans);
  cursor: pointer;
}

.lang-btn.active { background: var(--color-gold); color: #fff; }

#hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: center;
  padding: 20px;
  padding-top: max(52px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232, 196, 198, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(200, 169, 106, 0.1) 0%, transparent 50%),
    radial-gradient(circle at center, #fff 0%, var(--color-bg) 100%);
  z-index: -1;
}

.hero-bismillah,
.hero-personal-block,
.hero-exclusive-badge,
.hero-guest-name,
.hero-personal,
.hero-personal-welcome,
.hero-tagline,
.hero-timeline,
.hero-name,
.hero-amp,
.hero-evleniyor,
.hero-date,
.hero-ornament {
  opacity: 0;
}

body.app-ready .hero-bismillah { animation: fadeUp 0.5s ease-out 0.05s both; }
body.app-ready .hero-personal-block { animation: fadeUp 0.5s ease-out 0.08s both; }
body.app-ready .hero-guest-name { animation: fadeUp 0.55s ease-out 0.12s both; }
body.app-ready .hero-personal { animation: fadeUp 0.5s ease-out 0.16s both; }
body.app-ready .hero-personal-welcome { animation: fadeUp 0.45s ease-out 0.2s both; }
body.app-ready .hero-tagline { animation: fadeUp 0.45s ease-out 0.24s both; }
body.app-ready .hero-timeline { animation: fadeUp 0.45s ease-out 0.28s both; }
body.app-ready .hero-name-1 { animation: fadeSideL 0.55s ease-out 0.22s both; }
body.app-ready .hero-name-2 { animation: fadeSideR 0.55s ease-out 0.22s both; }
body.app-ready .hero-amp { animation: fadeScale 0.5s ease-out 0.3s both; }
body.app-ready .hero-evleniyor { animation: fadeUp 0.45s ease-out 0.34s both; }
body.app-ready .hero-ornament { animation: fadeScaleX 0.5s ease-out 0.38s both; }
body.app-ready .hero-date { animation: fadeUp 0.45s ease-out 0.42s both; }

body.lite-mode .hero-bismillah,
body.lite-mode .hero-personal-block,
body.lite-mode .hero-guest-name,
body.lite-mode .hero-personal,
body.lite-mode .hero-personal-welcome,
body.lite-mode .hero-tagline,
body.lite-mode .hero-timeline,
body.lite-mode .hero-name,
body.lite-mode .hero-amp,
body.lite-mode .hero-evleniyor,
body.lite-mode .hero-date,
body.lite-mode .hero-ornament,
body.lite-mode .story-line,
body.lite-mode .story-heading,
body.lite-mode .story-families,
body.lite-mode .event-card,
body.lite-mode .transport-card {
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}

@keyframes preloaderReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes preloaderIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lineExpand {
  to { width: min(220px, 70vw); }
}

@keyframes skipHint {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSideL {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeSideR {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeScaleX {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}
