:root {
  --ink: #fff7df;
  --muted: #decaa0;
  --paper: #140f0b;
  --panel: rgba(26, 18, 12, 0.82);
  --line: rgba(255, 220, 139, 0.26);
  --gold: #f7d77d;
  --gold-strong: #f0b641;
  --blue: #a8c2e9;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(247, 183, 65, 0.28), transparent 32rem),
    radial-gradient(circle at 88% 18%, rgba(168, 194, 233, 0.22), transparent 28rem),
    linear-gradient(180deg, #21150d 0%, #110d0a 46%, #080706 100%);
  min-height: 100vh;
}

a { color: inherit; }

button, input {
  font: inherit;
}

.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 760px);
  overflow: hidden;
  display: grid;
  align-items: end;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 7, 5, 0.82), rgba(9, 7, 5, 0.28) 45%, rgba(9, 7, 5, 0.5)),
    linear-gradient(0deg, #140f0b 0%, rgba(20, 15, 11, 0.1) 34%);
}

.hero-content {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 54px;
}

.eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  margin: 0;
  line-height: 0.9;
  font-weight: 700;
}

h1 {
  font-size: clamp(4rem, 12vw, 10rem);
  color: var(--ink);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.26), 0 0 28px rgba(247, 215, 125, 0.42);
}

h1 span {
  color: var(--gold);
  white-space: nowrap;
}

.hero-content p:last-child {
  max-width: 520px;
  color: #f2e7c6;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.page {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.toolbar {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  padding: 10px 0 22px;
}

.toolbar h2 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

.count {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button,
.lightbox a,
.lightbox figcaption button,
.password-row button {
  border: 1px solid var(--line);
  background: rgba(255, 247, 223, 0.08);
  color: var(--ink);
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.primary,
.password-row button {
  background: linear-gradient(135deg, var(--gold), var(--gold-strong));
  color: #261706;
  border-color: rgba(255, 255, 255, 0.2);
}

.gallery {
  column-count: 4;
  column-gap: 14px;
}

.photo-card {
  width: 100%;
  break-inside: avoid;
  display: block;
  border: 1px solid rgba(255, 220, 139, 0.16);
  background: rgba(255, 247, 223, 0.05);
  margin: 0 0 14px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  cursor: zoom-in;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.photo-meta a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.lightbox {
  width: min(1120px, calc(100% - 20px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.lightbox::backdrop {
  background: rgba(5, 4, 3, 0.88);
  backdrop-filter: blur(10px);
}

.lightbox figure {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
}

.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--muted);
}

.lightbox-actions {
  display: flex;
  gap: 8px;
}

.close,
.nav {
  position: fixed;
  z-index: 2;
  border: 1px solid var(--line);
  background: rgba(20, 15, 11, 0.86);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
}

.close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
}

.nav {
  top: 50%;
  width: 46px;
  height: 54px;
  font-size: 2.2rem;
}

.prev { left: 12px; }
.next { right: 12px; }

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.login-shell {
  width: min(980px, 100%);
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  min-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-hero {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  background: #110d0a;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 48px);
}

.login-panel h1 {
  font-size: clamp(4rem, 10vw, 6.8rem);
}

.intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-form label {
  display: block;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.password-row {
  display: flex;
  gap: 8px;
}

.password-row input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}

.error {
  margin: 10px 0 0;
  color: #ffc9b8;
  font-weight: 700;
}

@media (max-width: 920px) {
  .gallery { column-count: 3; }
  .login-card { grid-template-columns: 1fr; }
  .login-hero {
    height: auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 560px;
    align-items: end;
  }

  .hero-image {
    object-position: 58% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(9, 7, 5, 0.12), rgba(9, 7, 5, 0.48) 36%, #140f0b 96%),
      linear-gradient(90deg, rgba(9, 7, 5, 0.72), rgba(9, 7, 5, 0.1));
  }

  .hero-content {
    margin-bottom: 28px;
  }

  .hero-content h1 {
    font-size: clamp(3.4rem, 16vw, 4.4rem);
    line-height: 0.96;
  }

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

  .actions {
    justify-content: stretch;
  }

  .actions > * {
    flex: 1;
  }

  .gallery { column-count: 2; }
  .lightbox figcaption { align-items: stretch; flex-direction: column; }
  .lightbox-actions > * { flex: 1; }
  .nav { display: none; }
  .password-row { flex-direction: column; }
}

@media (max-width: 430px) {
  .gallery {
    column-count: 1;
  }

  .page {
    width: min(100% - 16px, 1180px);
  }

  .login-page {
    padding: 0;
    place-items: stretch;
  }

  .login-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
}
