/* Little More — wedding upload site
   Palette: soft sage greens + warm stone neutrals. */

:root {
  --stone-bg:      #ece5d8;   /* page background */
  --stone-card:    #f7f2e8;   /* card / form surface */
  --stone-white:   #fffdf7;   /* inputs, tiles */
  --stone-border:  #d9cfbc;
  --stone-border-2:#cabfa8;

  --sage:          #7e8d6e;   /* primary buttons / header */
  --sage-dark:     #5f6d52;   /* hover / strong text */
  --sage-soft:     #e3e7db;   /* light fills, progress track */
  --sage-tint:     #dfe4d5;

  --text:          #3b382f;
  --text-soft:     #6d6858;
  --text-faint:    #938c79;

  --danger:        #a24a3c;

  --radius:        12px;
  --radius-sm:     9px;
  --shadow:        0 10px 30px rgba(59, 56, 47, 0.10);

  --font-display:  "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:     system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--stone-bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

img, video { max-width: 100%; display: block; }

/* ---------- Landing hero ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.landing {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  height: 100dvh;             /* tracks the phone's dynamic viewport (address bar) */
  z-index: 20;
  background: var(--sage);
  display: flex;
  align-items: flex-end;      /* button sits near the bottom, over their graphic */
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.7s ease;
}
.landing.is-hidden { opacity: 0; pointer-events: none; }

/* Blurred, scaled copy of the video fills the whole screen behind... */
.landing__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(30px) brightness(0.55);
  transform: scale(1.12);     /* hides the soft blurred edges */
}
/* ...the real video, shown in full (nothing cropped), centred on top. */
.landing__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Their GIF carries the names/writing — we only darken the very bottom so the
   button and hint stay legible. */
.landing__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(40,44,34,0), rgba(40,44,34,0.55));
  pointer-events: none;
}
/* Watercolour crossfade between the video and the form */
.landing__watercolour {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--stone-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}
.landing__watercolour.is-show { opacity: 1; }
.landing__watercolour img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Invitation cover — lifts on one tap to start the video + music */
.landing__cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fffdf7;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.9s ease;
}
.landing__cover.is-hidden { opacity: 0; pointer-events: none; }
.landing__cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.landing__cover-bg--blur {
  object-fit: cover;
  filter: blur(28px) brightness(0.72);
  transform: scale(1.1);
  z-index: 0;
}
.landing__cover-bg--main {
  object-fit: contain;
  z-index: 1;
}
.landing__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(40, 44, 34, 0.42);
  z-index: 2;
}
.landing__cover-inner { position: relative; z-index: 3; }
.landing__cover-names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 12vw, 84px);
  line-height: 1;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}
.landing__cover-date {
  font-size: clamp(13px, 3.6vw, 17px);
  letter-spacing: 5px;
  margin: 16px 0 0;
  opacity: 0.95;
}
.landing__cover-cue {
  display: block;
  width: 13px;
  height: 13px;
  margin: 36px auto 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 253, 247, 0.9);
  animation: cuePulse 1.8s ease-in-out infinite;
}
@keyframes cuePulse {
  0%, 100% { transform: scale(1); opacity: 0.55; box-shadow: 0 0 0 0 rgba(255, 253, 247, 0.4); }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 12px rgba(255, 253, 247, 0); }
}


.landing__inner {
  position: relative;
  color: #fffdf7;
  padding: 24px 24px 52px;
  max-width: 640px;
}
.landing__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fffdf7;
  color: var(--sage-dark);
  border: none;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  transition: transform 0.15s ease, background 0.15s ease;
}
.landing__cta:hover { transform: translateY(-1px); background: #fff; }
.landing__hint {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.85;
}

/* ---------- App / form ---------- */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 18px 64px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}
.app.is-visible { opacity: 1; transform: none; }

.brand {
  text-align: center;
  margin-bottom: 22px;
}
.brand__logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 66px;
  max-width: 230px;
  margin: 16px auto 8px;
}
.brand__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
  margin: 0;
  color: var(--sage-dark);
}
.brand__surname {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
  margin: 4px 0 0;
  color: var(--sage-dark);
}
.brand__sub {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 8px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--stone-card);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px 28px;
}
.card__title { font-family: var(--font-display); font-size: 30px; font-weight: 500; margin: 0 0 4px; color: var(--text); }
.card__lede  { font-size: 15px; color: var(--text-soft); margin: 0 0 20px; }

.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.input {
  width: 100%;
  background: var(--stone-white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--sage);
  color: #fffdf7;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--sage-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--ghost {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid var(--stone-border-2);
}
.btn--ghost:hover { background: var(--sage-soft); }

.btn-icon { font-size: 20px; line-height: 0; }

/* hidden native file input */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.hint { font-size: 13px; color: var(--text-faint); margin: 12px 0 0; text-align: center; }

/* upload queue */
.queue { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.queue:empty { margin-top: 0; }
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--stone-white);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.file__icon { font-size: 22px; color: var(--sage); flex: none; }
.file__thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  flex: none;
  background: var(--sage-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
  font-size: 22px;
  overflow: hidden;
}
.file__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file__remove {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--stone-border);
  background: transparent;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.file__remove:hover { background: var(--sage-soft); color: var(--sage-dark); }
.file.is-done .file__remove { color: var(--sage-dark); border-color: var(--sage-soft); cursor: default; }
.file.is-staged .file__track { display: none; }
.file__body { flex: 1; min-width: 0; }
.file__name {
  font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file__track { height: 5px; background: var(--sage-soft); border-radius: 5px; margin-top: 6px; overflow: hidden; }
.file__bar { height: 5px; width: 0; background: var(--sage); border-radius: 5px; transition: width 0.2s ease; }
.file__status { font-size: 12px; color: var(--text-faint); flex: none; min-width: 34px; text-align: right; }
.file.is-done .file__bar { background: var(--sage-dark); }
.file.is-error .file__name { color: var(--danger); }
.file.is-error .file__bar { background: var(--danger); }

.banner {
  margin-top: 16px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  display: none;
}
.banner.is-show { display: block; }
.banner--ok   { background: var(--sage-soft); color: var(--sage-dark); }
.banner--err  { background: #f3e2dd; color: var(--danger); }

/* ---------- Login ---------- */
.centered { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }

/* ---------- Gallery ---------- */
.gallery-top {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gallery-meta { color: var(--text-soft); font-size: 14px; }
.grid {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.tile {
  background: var(--stone-card);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tile__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--sage-soft);
  display: block;
}
.tile__media--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--sage); font-size: 34px;
}
.tile__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px;
}
.tile__who { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__dl { color: var(--sage-dark); text-decoration: none; font-size: 19px; line-height: 0; flex: none; margin-left: 8px; }
.tile__dl:hover { color: var(--sage); }

.empty { text-align: center; color: var(--text-soft); padding: 60px 20px; }
.empty i { font-size: 40px; color: var(--sage); display: block; margin-bottom: 12px; }

.spinner {
  width: 34px; height: 34px; margin: 60px auto;
  border: 3px solid var(--sage-soft);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
