/* ================================================================
   Noémi & László — garden-wedding theme
   Sage/eucalyptus greens, cream background, gold accents.
   Mobile-first: everything sized for one-handed phone use.
   ================================================================ */
@import url("/static/fonts/fonts.css");

:root {
  --cream: #faf7f0;
  --cream-deep: #f3eee2;
  --sage: #8aa68a;
  --sage-soft: #b8c9b4;
  --sage-mist: #e4ebe1;
  --eucalyptus: #5f7d62;
  --forest: #38503e;
  --forest-ink: #273a2d;
  --gold: #b99b5e;
  --gold-soft: #d8c193;
  --danger: #a85b50;
  --shadow: 0 6px 24px rgba(56, 80, 62, 0.12);
  --shadow-soft: 0 2px 10px rgba(56, 80, 62, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  /* very faint leafy texture via layered radial gradients */
  background-image:
    radial-gradient(ellipse 60% 40% at 8% -5%, rgba(138, 166, 138, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(184, 201, 180, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 30% at 50% 105%, rgba(216, 193, 147, 0.10), transparent 60%);
  background-attachment: fixed;
  color: var(--forest-ink);
  font-family: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100svh;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 18px 64px;
}

.wide main { max-width: 1100px; }

/* ------------------------------------------------ header */
header.hero {
  text-align: center;
  padding: 30px 16px 10px;
}

.botanical {
  display: block;
  margin: 0 auto 6px;
  width: min(260px, 70vw);
  height: auto;
  color: var(--eucalyptus);
}

h1.names {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 9vw, 3.4rem);
  letter-spacing: 0.02em;
  color: var(--forest);
  margin: 0;
  line-height: 1.12;
}

h1.names .amp {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  font-size: 0.78em;
  padding: 0 0.12em;
}

.tagline {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.18rem;
  color: var(--eucalyptus);
  margin: 6px 0 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px auto 22px;
  max-width: 320px;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.divider::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }
.divider svg { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------ cards */
.card {
  background: #fffdf8;
  border: 1px solid var(--sage-mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px;
  margin-bottom: 20px;
}

.card h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--forest);
  margin: 0 0 10px;
}

.hint { color: #6f7d6f; font-size: 0.93rem; margin: 4px 0 14px; }

/* ------------------------------------------------ inputs & buttons
   Tap targets ≥ 52px tall — guests will be using one hand, in dim
   light, possibly after champagne. */
input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 14px 16px;
  border: 1.5px solid var(--sage-soft);
  border-radius: 14px;
  background: var(--cream);
  color: var(--forest-ink);
  outline: none;
}
input[type="text"]:focus { border-color: var(--eucalyptus); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  margin: 10px 0;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--eucalyptus), var(--forest));
  color: var(--cream);
  box-shadow: var(--shadow);
}
.btn-primary:disabled { opacity: 0.55; cursor: default; }

.btn-secondary {
  background: var(--sage-mist);
  color: var(--forest);
  border: 1.5px solid var(--sage-soft);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #a3854b);
  color: #fffdf6;
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--eucalyptus);
  min-height: 44px;
  font-weight: 600;
}

/* ------------------------------------------------ upload previews */
.previews { display: grid; gap: 16px; margin: 14px 0; }

.preview-card {
  border: 1px solid var(--sage-mist);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-deep);
  box-shadow: var(--shadow-soft);
}
.preview-card img {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #2e3b31;
}
.preview-card .preview-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  flex-wrap: wrap;
}
.preview-card .preview-actions .btn { flex: 1 1 160px; margin: 0; min-height: 48px; font-size: 0.95rem; }
.preview-card .fname {
  padding: 10px 14px 0;
  font-size: 0.85rem;
  color: #6f7d6f;
  word-break: break-all;
}

/* upload progress */
.progress-wrap {
  height: 14px;
  border-radius: 999px;
  background: var(--sage-mist);
  overflow: hidden;
  margin: 14px 0 6px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), var(--eucalyptus));
  transition: width 0.2s ease;
}

.status { text-align: center; font-weight: 600; min-height: 1.4em; }
.status.ok { color: var(--eucalyptus); }
.status.err { color: var(--danger); }

.success-box {
  text-align: center;
  padding: 26px 18px;
}
.success-box .big {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  color: var(--forest);
  margin: 10px 0 4px;
}

/* ------------------------------------------------ gallery */
.gallery-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
}
.gallery-bar .count { font-weight: 700; color: var(--eucalyptus); }
.gallery-bar .btn { width: auto; padding: 12px 22px; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.tile {
  border-radius: 14px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid var(--sage-mist);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--sage-mist);
}
.tile .meta {
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}
.tile .meta .who { font-weight: 700; color: var(--forest); }
.tile .meta .when { color: #8a948a; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 33, 0.93);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}
.lightbox .lb-meta { color: var(--cream); margin: 14px 0 4px; text-align: center; font-size: 0.95rem; }
.lightbox .lb-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lightbox .lb-actions .btn { width: auto; padding: 12px 26px; }
.lightbox .lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(250, 247, 240, 0.16);
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #7d887d;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
}

footer {
  text-align: center;
  padding: 26px 16px 40px;
  color: #98a398;
  font-size: 0.85rem;
}
footer svg { width: 90px; height: auto; color: var(--sage-soft); display: block; margin: 0 auto 8px; }
