:root {
  --ivory: #FFFFFF;
  --ivory-deep: #F1ECDD;
  --wine: #3C5844;        /* deep forest green (was wine) */
  --wine-deep: #22331F;   /* deepest forest shadow */
  --gold: #C2A467;        /* warm gold accent */
  --gold-light: #EAE0C4;
  --charcoal: #2B2620;
  --charcoal-soft: #5C554A;
  --line: #E4DFC9;
  --success: #4C6B4A;
  --error: #A23B3B;
  --radius: 14px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}
@keyframes frameIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero: text on plain background, photo below in a soft-framed card */
.hero-text { text-align: center; padding-top: 56px; }
.hero-text > * { opacity: 0; animation: fadeUp 0.9s var(--ease-out) forwards; }
.hero-text .eyebrow {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  text-transform: none;
  letter-spacing: normal;
  color: var(--gold);
  margin: 0 0 16px;
  animation-delay: 0.05s;
}
.hero-text .names {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: clamp(38px, 9vw, 58px); line-height: 1.05; color: var(--wine-deep);
  margin: 0 0 12px; animation-delay: 0.16s;
}
.hero-text .date {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--charcoal-soft); margin: 0 0 22px; animation-delay: 0.28s;
}
.hero-text .welcome {
  font-family: var(--font-display); font-size: 19px; color: var(--charcoal);
  max-width: 440px; margin: 0 auto 8px; animation-delay: 0.4s;
}

.photo-frame {
  margin: 24px 0 0;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  animation: frameIn 1s var(--ease-out) 0.5s forwards;
}
.photo-frame img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(34, 51, 31, 0.3);
  border: 6px solid #fff;
  opacity: 0;
  transition: opacity 1s ease;
}
.photo-frame img.loaded {
  opacity: 1;
  animation: kenBurns 18s ease-in-out infinite alternate;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 64px;
  position: relative;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes driftRotate {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 146, 79, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(185, 146, 79, 0); }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.5); }
  70% { opacity: 1; transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes shimmerSweep {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--wine-deep);
  text-align: center;
  margin: 0 0 8px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 0.7s var(--ease-out) 0.15s;
}
.reveal.in-view .section-title::after { width: 72px; transform: translateX(-50%); }
.section-title { margin-bottom: 22px; }

/* Scroll-reveal utility, applied via JS IntersectionObserver */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal .stagger { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.in-view .stagger { opacity: 1; transform: translateY(0); }
.reveal.in-view .stagger:nth-child(1) { transition-delay: 0.05s; }
.reveal.in-view .stagger:nth-child(2) { transition-delay: 0.15s; }
.reveal.in-view .stagger:nth-child(3) { transition-delay: 0.25s; }
.reveal.in-view .stagger:nth-child(4) { transition-delay: 0.35s; }
.reveal.in-view .stagger:nth-child(5) { transition-delay: 0.45s; }

/* Details */
.details { position: relative; z-index: 1; margin-top: 24px; padding-top: 40px; border-top: 1px solid var(--line); }
.details-grid { display: grid; gap: 16px; margin-top: 28px; }
.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s ease;
}
.detail-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -12px rgba(75, 27, 39, 0.25);
  border-color: var(--gold);
}
.detail-card .icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--wine-deep);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ease-out);
}
.detail-card:hover .icon { transform: rotate(-8deg) scale(1.08); }
.detail-card h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--charcoal); }
.detail-card p { margin: 0; font-size: 14px; color: var(--charcoal-soft); }

/* Upload section */
.upload-section { position: relative; z-index: 1; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); text-align: center; }
.upload-sub { color: var(--charcoal-soft); font-size: 15px; max-width: 420px; margin: 0 auto 28px; }

.quota-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: var(--ivory-deep);
  border: 1px solid var(--line);
  overflow: hidden;
  max-width: 320px;
  margin: 0 auto 10px;
}
.quota-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--wine));
  background-size: 200% 100%;
  transition: width 0.6s var(--ease-out);
  animation: shimmerSweep 2.4s linear infinite;
}
.quota-label { display: block; font-size: 13px; color: var(--charcoal-soft); margin-bottom: 28px; transition: color 0.3s ease; }

.dropzone {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px 20px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.dropzone:hover, .dropzone:focus-within {
  border-color: var(--gold);
  background: var(--ivory-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(34, 51, 31, 0.25);
}
.dropzone.drag-over {
  border-color: var(--wine);
  background: var(--gold-light);
  transform: scale(1.015);
}
.dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--wine-deep); }
.dropzone-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--wine-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
  animation: softPulse 3.5s ease-in-out infinite;
  transition: transform 0.3s var(--ease-out);
}
.dropzone:hover .dropzone-icon { transform: scale(1.08); }
.dropzone-text { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--charcoal); }
.dropzone-hint { font-size: 12px; color: var(--charcoal-soft); }
.dropzone.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.dropzone.disabled .dropzone-icon { animation: none; }

.upload-queue { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.queue-item {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13px;
  animation: fadeUp 0.4s var(--ease-out);
}
.queue-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--ivory-deep); }
.queue-info { flex: 1; min-width: 0; }
.queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--charcoal); }
.queue-bar-track { height: 4px; border-radius: 99px; background: var(--ivory-deep); margin-top: 4px; overflow: hidden; }
.queue-bar-fill { height: 100%; background: var(--gold); width: 0%; transition: width 0.2s ease; }
.queue-status { font-size: 16px; flex-shrink: 0; display: inline-block; }
.queue-status.ok { color: var(--success); animation: popIn 0.4s var(--ease-out); }
.queue-status.err { color: var(--error); animation: popIn 0.4s var(--ease-out); }

.consent-note { margin-top: 22px; font-size: 12px; color: var(--charcoal-soft); }
.turnstile-holder {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  max-height: 80px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s ease, max-height 0.5s ease, margin-top 0.5s ease;
}
.turnstile-holder.verified-hidden {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  pointer-events: none;
}

/* Gallery */
.gallery-section { position: relative; z-index: 1; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); text-align: center; }
.gallery-sub { color: var(--charcoal-soft); font-size: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.gallery-item {
  position: relative;
  animation: fadeUp 0.5s var(--ease-out) backwards;
}
.gallery-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--ivory-deep);
  display: block;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.gallery-item:hover img {
  transform: scale(1.06);
  box-shadow: 0 8px 20px -8px rgba(75, 27, 39, 0.35);
  z-index: 2;
  position: relative;
}
.gallery-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(34, 51, 31, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-delete:hover { background: var(--error); transform: scale(1.1); }
.gallery-delete:disabled { opacity: 0.5; cursor: not-allowed; }
.gallery-item:nth-child(6n+1) { animation-delay: 0.02s; }
.gallery-item:nth-child(6n+2) { animation-delay: 0.08s; }
.gallery-item:nth-child(6n+3) { animation-delay: 0.14s; }
.gallery-item:nth-child(6n+4) { animation-delay: 0.2s; }
.gallery-item:nth-child(6n+5) { animation-delay: 0.26s; }
.gallery-item:nth-child(6n+6) { animation-delay: 0.32s; }

/* Footer */
.site-footer { text-align: center; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.site-footer p { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--wine-deep); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120%) scale(0.9);
  background: var(--charcoal);
  color: #fff;
  padding: 13px 22px;
  border-radius: 99px;
  font-size: 14px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}
.toast.show { transform: translate(-50%, 0) scale(1); }
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }

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