:root {
  color-scheme: light;
  --ink: #2b2a26;
  --muted: #6f6a61;
  --leaf: #dbe6d2;
  --mist: #fbfaf7;
  --accent: #c7a351;
  --accent-soft: #f3e7c8;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(96, 84, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #ffffff 0%, #fbf8f1 45%, #f3f0e8 100%);
  min-height: 100vh;
}

.background-leaves {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(219, 230, 210, 0.28), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(210, 225, 200, 0.2), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(226, 236, 216, 0.3), transparent 55%),
    radial-gradient(circle at 60% 40%, rgba(235, 218, 176, 0.15), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

.page {
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 36px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: center;
  animation: page-fade 0.8s ease both;
}

.hero {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 2.9vw, 2.9rem);
  line-height: 1.05;
  margin: 12px 0;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
  margin: 0;
}

.subhead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

.hero-photo {
  width: min(480px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background-image:
    linear-gradient(180deg, rgba(226, 195, 124, 0.4), rgba(226, 195, 124, 0.1)),
    url("hero.png");
  background-size: cover;
  background-position: top center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(96, 84, 58, 0.18);
}

.card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(199, 163, 81, 0.12);
  animation: rise-in 0.9s ease both;
  animation-delay: 0.2s;
}

.card-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.card-header p {
  margin: 0 0 20px;
  color: var(--muted);
}

#upload-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.name-field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.name-field span {
  font-size: 0.9rem;
  color: var(--muted);
}

.name-field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(199, 163, 81, 0.22);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fffdf8;
  color: var(--ink);
}

.name-field input:focus {
  outline: 2px solid rgba(199, 163, 81, 0.3);
  border-color: rgba(199, 163, 81, 0.4);
}

.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf1, #f2ead9);
  border: 1px solid rgba(199, 163, 81, 0.32);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(199, 163, 81, 0.12);
  margin-top: 0;
  width: fit-content;
  align-self: center;
}

.file-picker input {
  display: none;
}

.file-picker:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(199, 163, 81, 0.18);
}

.file-picker span::before {
  content: "✿";
  margin-right: 8px;
  color: var(--accent);
  font-size: 1.1em;
}

.file-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.secondary-button {
  border: 1px solid rgba(199, 163, 81, 0.35);
  border-radius: 12px;
  background: #fffaf1;
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(199, 163, 81, 0.2);
}

.thankyou-banner {
  margin-top: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fffaf1;
  border: 1px dashed rgba(199, 163, 81, 0.35);
  color: var(--ink);
  font-weight: 500;
  display: none;
}

.thankyou-banner.show {
  display: block;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 0;
  min-height: 170px;
  align-content: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(199, 163, 81, 0.22);
  background: rgba(255, 250, 241, 0.35);
}

.preview-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(199, 163, 81, 0.16);
  display: flex;
  flex-direction: column;
  position: relative;
}

.preview-card img,
.preview-card video {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.preview-meta {
  padding: 10px 12px 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 12px rgba(96, 84, 58, 0.2);
}

.preview-remove:hover {
  transform: translateY(-1px);
}

.actions {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: column;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #d8b262, #b38b3f);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.ready {
  box-shadow: 0 8px 18px rgba(226, 195, 124, 0.25);
  animation: button-glow 2.4s ease-in-out infinite;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(199, 163, 81, 0.28);
}


.status {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 460px;
}

.progress {
  margin-top: 16px;
  height: 6px;
  background: #f7f2e8;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #e2c37c, #b1893e);
  transition: width 0.25s ease;
}

.progress.active {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff7e6;
  border: 1px solid rgba(199, 163, 81, 0.25);
  color: var(--ink);
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  animation: toast-glow 1.8s ease-in-out infinite;
}

.hero .eyebrow,
.hero h1,
.hero .subhead {
  animation: fade-up 0.8s ease both;
}

.hero .eyebrow {
  animation-delay: 0.1s;
}

.hero h1 {
  animation-delay: 0.2s;
}

.hero .subhead {
  animation-delay: 0.3s;
}

.footer {
  animation: fade-up 0.8s ease both;
  animation-delay: 0.35s;
}

@keyframes toast-glow {
  0% {
    box-shadow: 0 0 0 rgba(226, 195, 124, 0.3);
  }
  50% {
    box-shadow: 0 10px 25px rgba(226, 195, 124, 0.35);
  }
  100% {
    box-shadow: 0 0 0 rgba(226, 195, 124, 0.3);
  }
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes button-glow {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(226, 195, 124, 0.25);
  }
  50% {
    box-shadow: 0 14px 28px rgba(226, 195, 124, 0.45);
  }
}


.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.mobile-action-bar {
  display: none;
}

@media (max-width: 720px) {
  .page {
    padding-top: 24px;
    padding-bottom: 120px;
    animation: page-fade-mobile 0.6s ease both;
  }

  .hero {
    gap: 18px;
  }

  .card {
    padding: 20px;
  }

  .preview-card img,
  .preview-card video {
    height: 120px;
  }

  .preview-grid {
    min-height: 140px;
  }

  .mobile-action-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 18px 18px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(199, 163, 81, 0.18);
    box-shadow: 0 -10px 24px rgba(96, 84, 58, 0.12);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .mobile-action-bar.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  #mobile-upload-button {
    width: 100%;
    border-radius: 16px;
  }
}

@media (min-width: 900px) {
  .hero h1 {
    white-space: nowrap;
  }
}

@keyframes page-fade-mobile {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
