/* =====================================================
   EMMA'S TAUFE — Stylesheet
   ===================================================== */

/* ---------- Custom Properties ---------- */
:root {
  --gold:        #6B9EC7;
  --gold-light:  #BFDBF0;
  --gold-dark:   #3D6E94;
  --blue:        #6B9EC7;
  --blue-light:  #BFDBF0;
  --blue-dark:   #3D6E94;
  --cream:       #F5F8FB;
  --warm-white:  #FAFCFF;
  --peach:       #E8F2FA;
  --rose:        #C2D9EA;
  --text:        #1A2F45;
  --text-muted:  #5A7A99;
  --text-light:  #8AAABF;
  --border:      #C9DFF0;
  --shadow:      rgba(26, 47, 69, 0.1);
  --radius:      12px;
  --radius-lg:   20px;
  --transition:  0.25s ease;
  --max-w:       1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Lato', system-ui, sans-serif;
  background: var(--warm-white);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

/* ---------- Navigation ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0 1.5rem;
}
#navbar.scrolled {
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--warm-white);
  transition: color var(--transition);
}
#navbar.scrolled .nav-brand { color: var(--gold-dark); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color var(--transition);
}
.nav-links a:hover { color: #fff; }
#navbar.scrolled .nav-links a { color: var(--text-muted); }
#navbar.scrolled .nav-links a:hover { color: var(--gold-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background var(--transition);
}
#navbar.scrolled .nav-toggle span { background: var(--text); }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0D2137 0%, #1A3F60 45%, #2A5F8A 100%);
  overflow: hidden;
  padding: 100px 1.5rem 80px;
  text-align: center;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(107,158,199,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(191,219,240,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-pre {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-style: italic;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.hero-ornament {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-verse {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  margin: 0 auto 0.3rem;
}
.hero-verse-source {
  font-size: 0.8rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
}

/* Countdown */
.countdown-wrapper { min-height: 80px; }

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}
.countdown-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--gold-light);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}
.countdown-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}
.countdown-sep {
  font-size: 2rem;
  color: var(--gold);
  padding-bottom: 1.5rem;
  line-height: 1;
}
.countdown-past {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold-light);
}

/* Scroll down arrow */
.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  animation: bounce 2s infinite;
  z-index: 1;
}
.scroll-arrow { font-size: 1.5rem; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 1.5rem;
}
.section-alt { background: var(--cream); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.75rem;
}

/* ---------- Info Section ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 20px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow);
}
.info-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.info-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.info-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-dark);
  transition: color var(--transition);
}
.info-link:hover { color: var(--gold); }

.info-note {
  background: var(--peach);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- RSVP Form ---------- */
.form-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 4px 30px var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }

.field-error {
  font-size: 0.8rem;
  color: #c0392b;
  min-height: 1rem;
}

/* Radio Cards */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
@media (max-width: 480px) {
  .radio-group { grid-template-columns: 1fr; }
}

.radio-card { cursor: pointer; }
.radio-card input { display: none; }
.radio-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
  transition: border-color var(--transition), background var(--transition);
  font-size: 0.9rem;
}
.radio-icon { font-size: 1.5rem; flex-shrink: 0; }
.radio-card input:checked + .radio-content {
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
}

/* Attendance Details */
.attendance-details {
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.25rem;
}
@media (max-width: 580px) {
  .menu-grid { grid-template-columns: 1fr; }
}

.menu-card-label { cursor: pointer; }
.menu-card-label input { display: none; }
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding: 1.25rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
  transition: border-color var(--transition), background var(--transition);
  height: 100%;
}
.menu-emoji { font-size: 1.8rem; }
.menu-title { font-weight: 700; font-size: 0.9rem; }
.menu-desc { font-size: 0.78rem; color: var(--text-muted); }
.menu-card-label input:checked + .menu-card {
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  width: 100%;
  justify-content: center;
  margin-top: 1.75rem;
  box-shadow: 0 4px 15px rgba(154,116,64,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(154,116,64,0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: #fff;
  color: var(--gold-dark);
  border: 1.5px solid var(--gold);
}
.btn-secondary:hover {
  background: var(--peach);
}
.btn-download {
  background: var(--gold-dark);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
}
.btn-download:hover { background: var(--gold); }

/* Form Success */
.form-success {
  text-align: center;
  padding: 3rem 2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 30px var(--shadow);
}
.success-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.form-success h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.form-success p { color: var(--text-muted); }

/* ---------- Polls ---------- */
.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.poll-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 20px var(--shadow);
}
.poll-question {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.poll-options { display: flex; flex-direction: column; gap: 0.75rem; }

.poll-option {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  transition: all var(--transition);
  width: 100%;
}
.poll-option:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(201,169,110,0.06);
}
.poll-option.voted {
  border-color: var(--gold);
  background: rgba(201,169,110,0.08);
}
.poll-option.winner {
  border-color: var(--gold-dark);
  background: rgba(201,169,110,0.12);
}
.poll-emoji { font-size: 1.3rem; text-align: center; }
.poll-label { font-weight: 600; }
.poll-bar-wrap {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 0.5s ease;
}
.poll-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}
.poll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.poll-voted-note { color: var(--gold-dark); font-weight: 700; }

/* ---------- Gallery ---------- */
.gallery-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.gallery-placeholder-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.gallery-placeholder h3 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--text); }
.gallery-placeholder p { font-size: 0.95rem; }

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.gallery-count { font-size: 0.9rem; color: var(--text-muted); }

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

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--border);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44,36,22,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.gallery-item:hover .gallery-item-overlay { background: rgba(44,36,22,0.35); }
.gallery-item-overlay span {
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
}
.gallery-item:hover .gallery-item-overlay span {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;   /* shown via JS */
  align-items: center;
  justify-content: center;
}
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,15,8,0.95);
  cursor: pointer;
}
.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
  gap: 0.75rem;
}
.lightbox-media {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox-media img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}
.lightbox-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
}
.lightbox-caption { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

.lightbox-btn {
  position: fixed;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.3); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Footer ---------- */
footer {
  background: #0D2137;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 3rem 1.5rem;
}
.footer-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}
.footer-date {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.footer-love { font-size: 0.85rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 0.8rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 200;
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(255,253,249,0.97);
    backdrop-filter: blur(8px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .nav-links a { color: var(--text) !important; font-size: 1rem; }
  .nav-toggle { display: flex; }

  .section { padding: 3.5rem 1.25rem; }
  .form { padding: 1.75rem 1.25rem; }
  .countdown { gap: 0.25rem; }
  .countdown-number { font-size: 2rem; }
  .countdown-item { min-width: 55px; }
  .polls-grid { grid-template-columns: 1fr; }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .countdown-sep { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Focus / Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
