:root {
  --gold:        #c4a255;
  --gold-light:  #d4b46a;
  --gold-dark:   #a8893a;
  --slate:       #3d4455;
  --slate-light: #5c6375;
  --cream:       #f7f6f2;
  --cream-dark:  #eeece6;
  --white:       #fdfcfa;
}

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

body {
  min-height: 100vh;
  background-color: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--slate);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Header ─── */
header {
  width: 100%;
  max-width: 640px;
  padding: 0 24px;
  text-align: center;
  position: relative;
  padding-top: 20px;
}

.header-text {
  padding: 8px 40px 28px;
}

.couple-name {
  font-family: 'Cormorant SC', serif;
  font-size: clamp(42px, 12vw, 72px);
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 8px;
  line-height: 1.05;
}

.ampersand {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(52px, 14vw, 80px);
  color: var(--gold);
  line-height: 1;
  display: inline;
  margin: 0 4px;
}

.page-title {
  font-family: 'Cormorant SC', serif;
  font-size: clamp(36px, 10vw, 64px);
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 8px;
  line-height: 1.05;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--gold);
  margin: 20px auto 16px;
  opacity: 0.7;
}

.date-text {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(28px, 7vw, 44px);
  color: var(--gold);
  margin-top: 4px;
}

/* ─── Main ─── */
main {
  width: 100%;
  max-width: 560px;
  padding: 0 20px 60px;
}

/* ─── Drop Zone ─── */
.drop-zone {
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  background: var(--white);
  padding: 44px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  margin-bottom: 20px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--gold-dark);
  background: #fdfbf5;
  box-shadow: 0 6px 28px rgba(196,162,85,0.15);
}
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-icon { font-size: 40px; margin-bottom: 14px; display: block; }

.drop-zone h2 {
  font-family: 'Cormorant SC', serif;
  font-size: 20px;
  color: var(--slate);
  margin-bottom: 8px;
  letter-spacing: 2px;
  font-weight: 400;
}
.drop-zone p {
  font-style: italic;
  font-size: 14px;
  color: var(--slate-light);
  font-weight: 300;
  line-height: 1.5;
}
.drop-zone .or-divider {
  margin: 16px 0;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 4px;
  opacity: 0.7;
}

.camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--gold);
  padding: 10px 26px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Cormorant SC', serif;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}
.camera-btn:hover { background: var(--gold); color: white; }
.camera-input { position: absolute; width: 0; height: 0; opacity: 0; }

/* ─── Preview Grid ─── */
#preview-section { display: none; margin-bottom: 20px; }
#preview-section h3 {
  font-family: 'Cormorant SC', serif;
  font-size: 13px;
  color: var(--slate-light);
  margin-bottom: 12px;
  letter-spacing: 3px;
  font-weight: 300;
}
#preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.preview-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-thumb .remove-btn {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-thumb .upload-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255,255,255,0.7);
}

/* ─── Upload Button ─── */
#upload-btn {
  width: 100%;
  background: var(--slate);
  color: var(--cream);
  border: none;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Cormorant SC', serif;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: none;
  box-shadow: 0 4px 16px rgba(61,68,85,0.2);
}
#upload-btn:hover:not(:disabled) {
  background: #2e3344;
  box-shadow: 0 8px 24px rgba(61,68,85,0.3);
  transform: translateY(-1px);
}
#upload-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ─── Progress Bar ─── */
#progress-container { display: none; margin-top: 16px; }
#progress-bar-wrap {
  background: var(--cream-dark);
  border-radius: 12px;
  height: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  width: 0%;
  border-radius: 12px;
  transition: width 0.3s ease;
}
#progress-label {
  text-align: center;
  font-style: italic;
  font-size: 13px;
  color: var(--slate-light);
}

/* ─── Success Screen ─── */
#success-screen {
  display: none;
  text-align: center;
  padding: 48px 32px;
  background: var(--white);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}
.heart-anim {
  font-size: 52px;
  display: block;
  animation: heartbeat 0.6s ease-out 0.1s both;
}
@keyframes heartbeat {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
#success-screen h2 {
  font-family: 'Cormorant SC', serif;
  font-size: 28px;
  color: var(--slate);
  margin: 16px 0 8px;
  letter-spacing: 4px;
  font-weight: 400;
}
#success-screen p {
  color: var(--slate-light);
  font-style: italic;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 28px;
}
.upload-more-btn {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--gold);
  padding: 11px 28px;
  border-radius: 12px;
  font-size: 13px;
  font-family: 'Cormorant SC', serif;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-more-btn:hover { background: var(--gold); color: white; }

/* ─── Error Banner ─── */
#error-banner {
  display: none;
  background: #fdf0ef;
  border: 1px solid #e8c5c2;
  border-radius: 12px;
  padding: 14px 18px;
  font-style: italic;
  font-size: 14px;
  color: #8a4040;
  margin-top: 14px;
  text-align: center;
}

/* ─── Footer ─── */
footer {
  padding: 24px;
  text-align: center;
  font-style: italic;
  font-size: 12px;
  color: #b0a898;
  font-weight: 300;
}
footer span { color: var(--gold); }
