:root {
  --bg: #f4eee2;
  --bg-strong: #e6d6bb;
  --paper: rgba(255, 251, 244, 0.82);
  --paper-strong: rgba(255, 249, 240, 0.95);
  --ink: #2f261d;
  --muted: #6b5c4f;
  --olive: #55624d;
  --terracotta: #b5684f;
  --gold: #d7b972;
  --line: rgba(47, 38, 29, 0.12);
  --shadow: 0 24px 70px rgba(55, 36, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(213, 185, 114, 0.4),
      transparent 32%
    ),
    radial-gradient(
      circle at top right,
      rgba(181, 104, 79, 0.24),
      transparent 30%
    ),
    linear-gradient(180deg, #f7f1e7 0%, #f2e9dd 48%, #efe5d7 100%);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(12px);
}

.hero::before {
  width: min(70vw, 42rem);
  height: min(70vw, 42rem);
  top: -9rem;
  right: -9rem;
  background: rgba(213, 185, 114, 0.28);
}

.hero::after {
  width: min(68vw, 40rem);
  height: min(68vw, 40rem);
  bottom: -11rem;
  left: -10rem;
  background: rgba(85, 98, 77, 0.18);
}

.hero__veil {
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2rem;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.55),
      rgba(255, 250, 243, 0.25)
    ),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.18) 3px,
      transparent 3px,
      transparent 12px
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero__content {
  position: relative;
  width: min(100%, 56rem);
  padding: clamp(2rem, 6vw, 4.5rem);
  text-align: center;
  background: rgba(255, 250, 243, 0.62);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
}

.hero__eyebrow,
.section__label {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--olive);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 14vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.hero__copy {
  width: min(100%, 34rem);
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero__actions,
.section__actions,
.upload-panel__actions,
.gallery-footer,
.lightbox__footer {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero__actions {
  justify-content: center;
  margin-top: 2rem;
}

.section {
  width: min(100% - 2rem, 76rem);
  margin: 0 auto 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.section__heading {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section__heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 0.95;
}

.section__actions {
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--terracotta), #9f533a);
  color: #fff9f1;
  box-shadow: 0 18px 30px rgba(159, 83, 58, 0.28);
}

.button--ghost,
.button--subtle {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  border: 1px solid rgba(47, 38, 29, 0.08);
}

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

.gallery-status,
.upload-panel__meta,
.upload-panel__status,
.lightbox__meta,
.upload__hint {
  color: var(--muted);
}

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

.gallery-card {
  position: relative;
  overflow: hidden;
  min-height: 15rem;
  border-radius: 1.25rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.32),
    rgba(205, 183, 151, 0.22)
  );
  box-shadow: 0 16px 30px rgba(47, 38, 29, 0.08);
}

.gallery-card__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
}

.gallery-card__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.48);
}

.gallery-card__overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(20, 12, 9, 0.76));
  color: #fef9f0;
}

.gallery-card__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery-card__meta {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: rgba(255, 249, 240, 0.7);
}

.gallery-card__download {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff9f1;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.gallery-card__download:hover {
  background: rgba(255, 255, 255, 0.2);
}

.upload-panel {
  display: grid;
  gap: 1rem;
}

.upload-panel__field {
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
}

.upload-panel__field input {
  width: 100%;
}

.upload-panel__turnstile {
  min-height: 70px;
}

.lightbox {
  width: min(100% - 1rem, 76rem);
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(33, 24, 18, 0.72);
  backdrop-filter: blur(8px);
}

.lightbox__frame {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: rgba(29, 20, 16, 0.92);
  color: #fff7ef;
  border-radius: 1.5rem;
}

.lightbox__frame img {
  width: 100%;
  max-height: 76svh;
  object-fit: contain;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff7ef;
  font-size: 1.5rem;
}

.lightbox__footer {
  justify-content: space-between;
}

.lightbox__name {
  margin: 0;
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .hero {
    min-height: auto;
    padding-top: 5rem;
  }

  .hero__veil {
    inset: 0.7rem;
  }

  .section__heading,
  .section__actions,
  .lightbox__footer {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: clamp(3.4rem, 18vw, 5.5rem);
  }
}
