:root {
  --paper: #f7f2e8;
  --cream: #edf3ea;
  --rose: #a9b89f;
  --rose-dark: #647a61;
  --wine: #263326;
  --gold: #FEC846;
  --sage: #859C83;
  --sage-dark: #4f664c;
  --sage-soft: #dce7d7;
  --ink: #1f2a20;
  --muted: #5f705d;
  --line: rgba(38, 51, 38, 0.16);
  --shadow: 0 24px 80px rgba(38, 51, 38, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 5%, rgba(254, 200, 70, 0.22), transparent 26rem),
    radial-gradient(circle at 86% 20%, rgba(247, 242, 232, 0.24), transparent 24rem),
    linear-gradient(135deg, #859C83 0%, #748d72 48%, #9caf98 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(247, 242, 232, 0.58);
  border-radius: 999px;
  background: rgba(247, 242, 232, 0.86);
  box-shadow: 0 10px 40px rgba(38, 51, 38, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1;
}

.brand small {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(133, 156, 131, 0.16);
}

.nav-link {
  min-height: 42px;
  padding: 11px 17px;
  border-radius: 999px;
  color: var(--wine);
  font-weight: 700;
  text-decoration: none;
}

.nav-link.active {
  color: #fff;
  background: var(--sage-dark);
}

.hero {
  position: relative;
  display: flex;
  align-items: end;
  min-height: clamp(620px, 78vh, 900px);
  margin: 18px calc(50% - 50vw) 42px;
  padding: clamp(120px, 16vh, 180px) max(24px, calc((100vw - 1180px) / 2 + 16px)) 64px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 27, 20, 0.08) 0%, rgba(20, 27, 20, 0.2) 34%, rgba(20, 27, 20, 0.78) 100%),
    linear-gradient(90deg, rgba(38, 51, 38, 0.5), rgba(38, 51, 38, 0.08) 55%),
    url("/assets/jaqueline-lukas.jpeg") center 62% / cover no-repeat;
  box-shadow: 0 28px 90px rgba(38, 51, 38, 0.24);
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--sage-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
}

h1 {
  max-width: 760px;
  font-size: clamp(4rem, 10vw, 8.6rem);
  text-shadow: 0 6px 34px rgba(0, 0, 0, 0.48);
}

h2 {
  font-size: clamp(2.3rem, 5vw, 4.3rem);
}

.hero-logo {
  width: min(220px, 44vw);
  height: auto;
  margin: 0 0 16px -12px;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.3));
}

.wedding-date {
  margin: 10px 0 0;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.42);
}

.hero-copy p:last-child {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
}

.notice {
  margin: 8px 0 26px;
  padding: 16px 18px;
  border: 1px solid rgba(254, 200, 70, 0.36);
  border-radius: 8px;
  color: var(--wine);
  background: rgba(247, 242, 232, 0.82);
}

.hidden,
.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading {
  margin-bottom: 22px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tool-panel,
.upload-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 242, 232, 0.86);
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--wine);
  font-weight: 800;
}

.input-row {
  display: flex;
  gap: 10px;
}

input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.input-row button,
.primary-button,
.ghost-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.input-row button,
.primary-button {
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--sage-dark), var(--wine));
}

.primary-button {
  width: 100%;
  margin-top: 16px;
}

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

.ghost-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--wine);
  background: rgba(247, 242, 232, 0.86);
}

.helper-text,
.file-summary {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.dropzone {
  display: grid;
  min-height: 230px;
  margin-top: 16px;
  padding: 24px;
  place-items: center;
  border: 1.5px dashed rgba(79, 102, 76, 0.44);
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(247, 242, 232, 0.96), rgba(220, 231, 215, 0.82));
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  background: var(--sage-dark);
}

.dropzone strong,
.dropzone small {
  display: block;
}

.dropzone small {
  color: var(--muted);
}

.queue {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.queue-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 242, 232, 0.88);
}

.queue-item div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.queue-status {
  color: var(--muted);
  font-size: 0.9rem;
}

progress {
  width: 100%;
  height: 10px;
  accent-color: var(--sage-dark);
}

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

.folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.folder-chip {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--wine);
  font-weight: 800;
  background: rgba(247, 242, 232, 0.9);
}

.folder-chip.active {
  color: #fff;
  background: var(--sage-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.media-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 242, 232, 0.9);
  box-shadow: 0 16px 50px rgba(38, 51, 38, 0.13);
}

.media-preview {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-weight: 800;
  background: var(--sage-soft);
  cursor: pointer;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview.no-preview {
  padding: 18px;
}

.play-badge {
  position: absolute;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  background: rgba(38, 51, 38, 0.82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.media-body {
  padding: 12px;
}

.media-body strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--wine);
}

.media-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.media-actions a {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  background: var(--sage-dark);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(247, 242, 232, 0.72);
}

.media-dialog {
  width: min(96vw, 980px);
  max-height: 92vh;
  padding: 18px;
  border: 0;
  border-radius: 8px;
  background: rgba(247, 242, 232, 0.98);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.36);
}

.media-dialog::backdrop {
  background: rgba(31, 42, 32, 0.78);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(38, 51, 38, 0.86);
}

.dialog-content {
  display: grid;
  min-height: 260px;
  place-items: center;
}

.dialog-content img,
.dialog-content video {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
}

.dialog-message {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.dialog-download {
  display: block;
  width: min(320px, 100%);
  margin: 14px auto 0;
  padding: 13px 18px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  background: var(--sage-dark);
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 20px, 720px);
    padding-top: 10px;
  }

  .site-header {
    position: static;
    align-items: stretch;
    border-radius: 8px;
    flex-direction: column;
  }

  .main-nav,
  .nav-link {
    width: 100%;
  }

  .nav-link {
    text-align: center;
  }

  .upload-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 720px;
    margin-top: 12px;
    padding: 270px 20px 42px;
    background:
      linear-gradient(180deg, rgba(20, 27, 20, 0.04) 0%, rgba(20, 27, 20, 0.16) 42%, rgba(20, 27, 20, 0.82) 100%),
      url("/assets/jaqueline-lukas.jpeg") center top / cover no-repeat;
  }

  .input-row {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand strong {
    font-size: 1.1rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .hero {
    min-height: 680px;
    padding-top: 250px;
  }

  .hero-logo {
    width: 150px;
  }

  h1 {
    font-size: 4rem;
  }

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

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
