:root {
  --beige: #f7f2e9;
  --beige-deep: #ece1cc;
  --pistachio: #c3d4ac;
  --pistachio-deep: #9db584;
  --ink: #4a4436;
  --ink-soft: #7a7360;
  --white: #fffdf8;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(74, 68, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Jost", sans-serif;
  color: var(--ink);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

/* Whole-page blurred backdrop, fixed behind every section */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("images/hero.png") center 22% / cover no-repeat;
  filter: blur(5px) saturate(1.15) brightness(1.03);
  transform: scale(1.04);
  z-index: -2;
}

/* Wider screens get the 16:9 outpainted version instead of a cover-cropped
   portrait photo — swap back to hero.png here once a 9:16 mobile version
   exists, scoped the other way (max-width). */
@media (min-width: 700px) {
  body::before {
    background-image: url("images/hero-wide.png");
    background-position: center center;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(247, 242, 233, 0.32) 0%, rgba(236, 225, 204, 0.32) 100%);
  z-index: -1;
}

h1, h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  margin: 0;
}

p {
  line-height: 1.7;
  margin: 0 0 1rem;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.hero-inner {
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(6px);
  border-radius: 24px;
  padding: 2.5rem 2.5rem;
  max-width: 480px;
  box-shadow: var(--shadow);
}

.overline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: var(--pistachio-deep);
  margin: 0 0 0.7rem;
}

.overline-flourish {
  font-size: 0.7rem;
  opacity: 0.75;
}

.names {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  color: var(--ink);
}

.names .amp {
  display: block;
  color: var(--pistachio-deep);
  font-style: italic;
  margin: 0.1em 0;
}

.divider {
  color: var(--pistachio-deep);
  margin: 1rem auto;
  opacity: 0.8;
}

.date {
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Main content ---------- */

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1rem;
}

.thanks {
  text-align: center;
  margin-bottom: 2.5rem;
  background: rgba(255, 253, 248, 0.6);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}

.thanks h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.thanks p {
  color: var(--ink);
  font-weight: 500;
}

.upload-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
}

.upload-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.upload-hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.guest-fields {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  text-align: left;
}

.guest-input {
  width: 100%;
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--beige);
  border: 1.5px solid var(--beige-deep);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  resize: none;
  transition: border-color 0.2s ease;
}

.guest-input::placeholder {
  color: var(--ink-soft);
}

.guest-input:focus {
  outline: none;
  border-color: var(--pistachio-deep);
}

.guest-message {
  font-family: inherit;
}

.dropzone {
  border: 2px dashed var(--pistachio-deep);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  cursor: pointer;
  background: var(--beige);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dropzone.drag-active {
  background: var(--pistachio);
  border-color: var(--pistachio-deep);
}

.dropzone-icon {
  color: var(--pistachio-deep);
  margin-bottom: 0.6rem;
}

.dropzone-text {
  color: var(--ink-soft);
  margin: 0;
}

.link-like {
  color: var(--pistachio-deep);
  text-decoration: underline;
}

/* ---------- File list ---------- */

.file-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-row {
  background: var(--beige);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.8rem;
  align-items: center;
  font-size: 0.85rem;
}

.file-info {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  grid-column: 1 / -1;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--ink-soft);
  flex-shrink: 0;
}

.progress-track {
  grid-column: 1 / 2;
  height: 6px;
  background: var(--beige-deep);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--pistachio-deep);
  transition: width 0.15s ease;
}

.file-status {
  grid-column: 2 / 3;
  width: 1.4rem;
  text-align: center;
  font-size: 0.95rem;
}

.file-row.is-done .progress-bar {
  background: var(--pistachio-deep);
}

.file-row.is-done .file-status {
  color: var(--pistachio-deep);
}

.file-row.is-error .progress-bar {
  background: #c98b6b;
}

.file-row.is-error .file-status {
  color: #c98b6b;
}

/* ---------- Success ---------- */

.success-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--pistachio);
  color: #3c4a2e;
  font-size: 0.95rem;
}

.success-message.visible {
  display: flex;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  color: var(--ink);
  font-weight: 500;
}

.signature {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}

@media (max-width: 420px) {
  .hero-frame {
    width: min(300px, 82vw);
  }
}
