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

:root {
  --ivory:   #FAF8F5;
  --blush:   #E8C4B8;
  --mauve:   #9B7B74;
  --gold:    #C9A96E;
  --charcoal:#2C2420;
  --glass:   rgba(250, 248, 245, 0.72);

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Jost', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--ivory);
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Upload page Nav ────────────────────────────────────── */
.site-nav-upload {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 50;
}
.nav-gallery-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  text-decoration: none;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232,196,184,0.4);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.nav-gallery-link:hover { color: var(--gold); border-color: var(--gold); }

/* Language toggle — top-left, styled to match nav-gallery-link */
.lang-toggle {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(232,196,184,0.4);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { border-color: var(--gold); }
.lang-option {
  opacity: 0.45;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.lang-option.active {
  opacity: 1;
  color: var(--charcoal);
}
.lang-sep {
  opacity: 0.35;
}

.nav-gallery-link .label-short { display: none; }

@media (max-width: 480px) {
  .site-nav-upload { top: 1rem; right: 1rem; }
  .lang-toggle { top: 1rem; left: 1rem; padding: 0.5rem 0.85rem; }
  .nav-gallery-link { padding: 0.5rem 0.8rem; }
  .nav-gallery-link .label-full { display: none; }
  .nav-gallery-link .label-short { display: inline; }
}

/* ── Petal Canvas ───────────────────────────────────────── */
#petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, #f0e3db 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 100%, #e8d9c8 0%, transparent 60%);
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239B7B74' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 680px; margin: 0 auto; }

.eyebrow {
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.2s forwards;
}

.hero h1 {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.4s forwards;
}

.amp {
  font-style: italic;
  color: var(--mauve);
  font-weight: 400;
}

.date {
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.55s forwards;
}

.sub {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--charcoal);
  opacity: .75;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.7s forwards;
}

/* Scroll cue */
.scroll-cue {
  display: inline-flex;
  justify-content: center;
  animation: fadeUp 1s var(--ease-out) 1s forwards;
  opacity: 0;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out 1.5s infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .5; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(1.15); }
}

/* ── Upload Section ─────────────────────────────────────── */
.upload-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1.5rem 6rem;
  background: linear-gradient(180deg, var(--ivory) 0%, #f3ece7 100%);
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(232, 196, 184, 0.45);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow:
    0 4px 24px rgba(155, 123, 116, 0.08),
    0 1px 3px rgba(155, 123, 116, 0.06);
}

.card-header { text-align: center; margin-bottom: 2.5rem; }
.card-header h2 {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}
.card-header p {
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mauve);
  font-weight: 300;
}

/* Drop Zone */
.dropzone {
  border: 1.5px dashed var(--blush);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  color: var(--mauve);
  margin-bottom: 1.75rem;
}
.dropzone:hover,
.dropzone:focus,
.dropzone.over {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.05);
  outline: none;
}
.drop-icon { margin-bottom: 1rem; opacity: 0.7; }
.drop-label {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.drop-or {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 0.9rem;
  opacity: .6;
}
.btn-browse {
  display: inline-block;
  padding: 0.55rem 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-family: var(--ff-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-browse:hover { background: var(--gold); color: #fff; }

/* Preview Grid */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 1.75rem;
}
.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--blush);
  animation: popIn 0.35s var(--ease-out) forwards;
}
.preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(44, 36, 32, 0.65);
  border: none;
  color: #fff;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1;
}
.preview-item:hover .preview-remove { opacity: 1; }

/* Fields */
.field-group { margin-bottom: 1.25rem; }
.field-group label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-bottom: 0.45rem;
  font-weight: 400;
}
.optional { opacity: 0.5; font-weight: 300; text-transform: none; letter-spacing: 0; }
.field-group input,
.field-group textarea {
  width: 100%;
  background: rgba(250, 248, 245, 0.8);
  border: 1px solid rgba(155, 123, 116, 0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--charcoal);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--mauve); opacity: .5; }
.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* Progress */
.progress-wrap {
  margin-bottom: 1.5rem;
}
.progress-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--blush), var(--gold));
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s var(--ease-out);
}
.progress-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mauve);
  margin-top: 0.5rem;
  text-align: center;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--mauve) 0%, #7a5e58 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  margin-bottom: 1.25rem;
}
.btn-submit:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.privacy-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--mauve);
  opacity: 0.6;
  line-height: 1.6;
  font-weight: 300;
}

/* ── Success Overlay ────────────────────────────────────── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.5s var(--ease-out) forwards;
}
.success-overlay[hidden] { display: none; }

.success-card {
  text-align: center;
  max-width: 420px;
  animation: fadeUp 0.6s var(--ease-out) forwards;
}
.success-icon {
  font-size: 3.5rem;
  color: var(--mauve);
  margin-bottom: 1.5rem;
  animation: heartbeat 1.5s ease-in-out 0.3s infinite;
}
.success-card h2 {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 1rem;
}
.success-card p {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--charcoal);
  opacity: .75;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.success-names {
  color: var(--mauve);
  margin-bottom: 2.5rem !important;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mauve);
  opacity: 0.5;
  background: #f3ece7;
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.2); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.1); }
  60%      { transform: scale(1); }
}

/* ── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .card { border-radius: 16px; }
  .dropzone { padding: 2rem 1rem; }
  .preview-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
