:root {
  color-scheme: light;
  --ink: #232824;
  --muted: #667065;
  --paper: #fffaf4;
  --surface: #fffdf9;
  --sage: #637463;
  --sage-dark: #34433a;
  --rose: #d59c96;
  --gold: #c6a45f;
  --line: rgba(35, 40, 36, 0.14);
  --shadow: 0 18px 45px rgba(35, 40, 36, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(213, 156, 150, 0.2), transparent 34rem),
    linear-gradient(180deg, #fff7ef 0%, #f7f2ea 42%, #f8f7f1 100%);
}

button,
input {
  font: inherit;
}

.is-locked .app-shell,
.is-unlocked .countdown-screen {
  display: none;
}

.countdown-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 6vw, 72px);
  color: #fffaf4;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 45, 38, 0.91), rgba(34, 45, 38, 0.36)),
    url("/header-leonie-rene.webp") 58% 45% / cover;
}

.countdown-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at center, rgba(25, 31, 27, 0.18), transparent 32rem),
    linear-gradient(0deg, rgba(25, 31, 27, 0.72), rgba(25, 31, 27, 0.16) 58%),
    rgba(99, 116, 99, 0.12);
  backdrop-filter: saturate(0.86);
}

.countdown-screen__content {
  width: min(920px, 100%);
  text-align: center;
  transform: translateY(2vh);
}

.countdown-screen h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 12vw, 8rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0;
}

.countdown-screen__date {
  margin: 16px 0 0;
  color: #f4ded3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3.5vw, 2.25rem);
}

.countdown-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 3.5vw, 38px);
  margin: clamp(30px, 5vw, 48px) auto 0;
}

.countdown-unit {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

.countdown-unit span {
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  font-weight: 850;
  line-height: 0.95;
  color: #fffaf4;
  text-shadow:
    0 8px 30px rgba(0, 0, 0, 0.36),
    0 0 1px rgba(255, 250, 244, 0.72);
}

.countdown-unit small {
  color: rgba(255, 250, 244, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.hero {
  min-height: clamp(360px, 58vh, 620px);
  display: flex;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: clamp(28px, 7vw, 72px);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  color: #fffaf4;
  background:
    linear-gradient(135deg, rgba(34, 45, 38, 0.88), rgba(34, 45, 38, 0.34)),
    url("/header-leonie-rene.webp") 58% 45% / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(25, 31, 27, 0.7), rgba(25, 31, 27, 0.08) 58%),
    rgba(99, 116, 99, 0.1);
  backdrop-filter: saturate(0.9);
}

.hero__content {
  max-width: 720px;
}

.kicker,
.section-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 12vw, 8rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0;
}

.date {
  margin: 12px 0 0;
  font-size: clamp(1.35rem, 4vw, 2.6rem);
  color: #f4ded3;
  font-family: Georgia, "Times New Roman", serif;
}

.intro {
  max-width: 560px;
  margin: 20px 0 0;
  color: rgba(255, 250, 244, 0.92);
  font-size: clamp(1.02rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}

.upload-panel,
.gallery-section {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 34px);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.upload-panel h2,
.gallery-section h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.2rem);
  letter-spacing: 0;
}

.upload-form {
  margin-top: 22px;
}

.drop-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed rgba(99, 116, 99, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 116, 99, 0.08), rgba(213, 156, 150, 0.12));
  cursor: pointer;
  text-align: center;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.drop-zone:focus-within,
.drop-zone:hover {
  border-color: var(--sage);
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(99, 116, 99, 0.13), rgba(213, 156, 150, 0.16));
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-zone__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--sage-dark);
  font-size: 2rem;
  line-height: 1;
}

.drop-zone__title {
  font-weight: 800;
  font-size: 1.1rem;
}

.drop-zone__text,
.status,
.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.selection {
  margin: 14px 0 0;
  color: var(--sage-dark);
  font-weight: 700;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.preview {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #e9e4dc;
  position: relative;
}

.preview img,
.preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.preview--more {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sage-dark);
  font-size: 1.2rem;
  font-weight: 800;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 16px;
  color: #fff;
  background: var(--sage-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ghost-button {
  padding: 0 16px;
  color: var(--sage-dark);
  background: rgba(99, 116, 99, 0.12);
}

.progress {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 40, 36, 0.1);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--rose));
  transition: width 150ms ease;
}

.status {
  min-height: 1.5em;
  margin: 12px 0 0;
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.photo {
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #e9e4dc;
  cursor: zoom-in;
  box-shadow: 0 10px 24px rgba(35, 40, 36, 0.1);
  position: relative;
}

.photo img,
.photo video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 40, 36, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.empty-state {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.lightbox {
  width: min(96vw, 1180px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(14, 18, 16, 0.86);
}

.lightbox__content {
  display: grid;
  place-items: center;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 92vh;
  display: block;
  margin: auto;
  border-radius: 8px;
  background: #111;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
  cursor: pointer;
  z-index: 3;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  z-index: 3;
}

.lightbox__nav--previous {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

@media (max-width: 640px) {
  main {
    width: min(100% - 18px, 1120px);
    padding-top: 9px;
  }

  .hero {
    min-height: 430px;
    padding: 28px 20px;
  }

  .countdown-screen {
    align-items: center;
    padding: 26px 14px;
  }

  .countdown-screen__content {
    transform: none;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }

  .gallery-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lightbox__nav {
    top: auto;
    bottom: 18px;
    transform: none;
  }
}
