/* ============================================================
   Reece & Elexa — wedding album
   Autumnal / earthy palette: woodsmoke, rust, amber, moss.
   ============================================================ */

:root {
  --bg: #201711;
  --bg-glow: #33221476;
  --surface: #2b1f16;
  --surface-2: #352719;
  --line: #4a3623;
  --text: #f3e7d3;
  --text-dim: #c9b599;
  --rust: #c1502e;
  --rust-deep: #9c3f24;
  --amber: #e8a13c;
  --moss: #8a9158;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

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

body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-glow), transparent 65%),
    radial-gradient(900px 500px at 90% 100%, #2a180e66, transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

/* Drifting ember accents */
.ember {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
.ember-1 { width: 340px; height: 340px; background: var(--rust); top: -80px; right: -100px; }
.ember-2 { width: 280px; height: 280px; background: var(--amber); bottom: 5%; left: -120px; opacity: 0.09; }

/* ======================= Hero ======================= */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 64px 24px 36px;
  max-width: 640px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--amber);
  margin-bottom: 14px;
}
.hero-names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px auto 14px;
}
.orn-line {
  display: block;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.orn-line:last-child { transform: scaleX(-1); }
.orn-leaf { font-size: 1.05rem; }
.hero-date {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--amber);
  letter-spacing: 0.08em;
}
.hero-blurb {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 0.98rem;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ======================= Buttons ======================= */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  text-decoration: none;
  display: inline-block;
  color: var(--text);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(140deg, var(--rust), var(--rust-deep));
  color: #fff7ec;
  box-shadow: 0 6px 18px rgba(193, 80, 46, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(193, 80, 46, 0.5); }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; margin-top: 18px; }

/* ======================= Tabs ======================= */
.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tab {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tab.is-active {
  color: var(--text);
  background: var(--surface-2);
}

/* ======================= Panels & cards ======================= */
main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 18px 60px;
}
.panel.is-hidden { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
}
.card-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 6px 0 22px;
}

/* ======================= Form ======================= */
.field { display: block; margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.field-label em { font-weight: 400; color: var(--text-dim); font-style: normal; }
.field input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--amber); }

/* ======================= Dropzone ======================= */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--amber);
  background: var(--surface-2);
}
.dropzone-icon { font-size: 2rem; margin-bottom: 8px; }
.dropzone-title { font-weight: 600; }
.dropzone-hint { color: var(--text-dim); font-size: 0.85rem; margin-top: 3px; }

/* ======================= Upload queue ======================= */
.queue { list-style: none; margin-top: 16px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.queue-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.queue-info { flex: 1; min-width: 0; }
.queue-name {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-status { font-size: 0.75rem; color: var(--text-dim); }
.queue-status.is-done { color: var(--moss); }
.queue-status.is-error { color: var(--rust); }
.queue-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--bg);
  margin-top: 5px;
  overflow: hidden;
}
.queue-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rust), var(--amber));
  transition: width 0.2s ease;
}
.queue-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
}
.queue-remove:hover { color: var(--rust); }

.upload-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 12px;
  min-height: 1.2em;
}
.upload-note.is-success { color: var(--moss); }
.upload-note.is-error { color: var(--rust); }

/* ======================= Gallery ======================= */
.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.gallery-count {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
@media (min-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  border: none;
  padding: 0;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .vid-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.7rem;
  color: #fff;
}
.gallery-item .by-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 10px 7px;
  font-size: 0.72rem;
  color: #f7ecd9;
  background: linear-gradient(transparent, rgba(15, 9, 5, 0.75));
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
  font-size: 1rem;
}
.gallery-empty p:first-child { font-size: 2.2rem; margin-bottom: 10px; }

/* ======================= Lightbox ======================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 10, 6, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox.is-hidden { display: none; }
.lightbox-stage {
  max-width: 92vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-stage img,
.lightbox-stage video {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  padding: 8px;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(43, 31, 22, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-meta {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-dim);
  font-size: 0.88rem;
  padding: 0 16px;
}

/* ======================= Toast & footer ======================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  z-index: 60;
  transition: opacity 0.3s;
}
.toast.is-hidden { opacity: 0; pointer-events: none; }

.footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 26px 16px 40px;
  position: relative;
  z-index: 1;
}
