:root {
  color-scheme: light;
  --bg: #f7f3ee;
  --ink: #201b17;
  --muted: #746960;
  --line: #ddd1c7;
  --paper: #fffaf5;
  --accent: #7f4f35;
  --accent-dark: #4f2f23;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.narrow {
  max-width: 860px;
}

.hero {
  min-height: 72vh;
  display: grid;
  align-items: end;
  background: linear-gradient(130deg, #2a211c, #86654d);
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
}

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

.hero p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(42px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero span {
  display: block;
  max-width: 620px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.scene-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 238, 0.92);
  backdrop-filter: blur(10px);
}

.scene-nav a {
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
}

.scene {
  padding-top: 28px;
}

.scene h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.media-card {
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  background: #e4dbd3;
  border-radius: 8px;
}

.media-thumb,
.gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.media-card:hover .media-thumb,
.gallery-card:hover img {
  transform: scale(1.035);
}

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

.gallery-card {
  min-height: 280px;
  display: grid;
  align-content: end;
  gap: 4px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  border-radius: 8px;
  background: #ddd1c7;
  padding: 18px;
}

.gallery-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.gallery-card span,
.gallery-card small {
  position: relative;
  z-index: 1;
  color: #fff;
}

.gallery-card span {
  font-size: 24px;
  font-weight: 800;
}

.gallery-card small {
  color: rgba(255, 255, 255, 0.8);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 18px;
  background: rgba(20, 16, 13, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox button {
  justify-self: end;
  background: rgba(255, 255, 255, 0.12);
}

.lightbox [data-lightbox-body] {
  min-height: 0;
  display: grid;
  place-items: center;
}

.lightbox img,
.lightbox video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.lightbox p {
  margin: 0;
  color: #fff;
  text-align: center;
}

.no-scroll {
  overflow: hidden;
}

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

.login form,
.panel {
  width: min(100%, 560px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 22px;
}

.login h1,
.admin h1,
.panel h2 {
  margin: 0 0 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.admin {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 70px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin > header,
.admin > .panel:last-child {
  grid-column: 1 / -1;
}

.admin > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.admin-card strong,
.admin-card small {
  display: block;
}

.admin-card small {
  color: var(--muted);
  word-break: break-all;
}

details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

code {
  border-radius: 6px;
  background: #eee5dd;
  padding: 2px 6px;
}

@media (max-width: 820px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero {
    min-height: 66vh;
  }
}
