:root {
  --bg-main: #16110d;
  --bg-panel: rgba(34, 23, 17, 0.88);
  --bg-panel-soft: rgba(49, 34, 24, 0.82);
  --bg-card: rgba(28, 19, 13, 0.92);
  --text-main: #f0ddc1;
  --text-soft: #d1bb9a;
  --text-muted: #a88f73;
  --accent: #b55b2d;
  --accent-strong: #d4743c;
  --accent-dark: #7e3517;
  --border: rgba(210, 165, 108, 0.26);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", sans-serif;
  background:
    radial-gradient(circle at top, rgba(181, 91, 45, 0.16), transparent 34%),
    linear-gradient(180deg, #2b1c12 0%, #16110d 38%, #0f0a07 100%);
  color: var(--text-main);
}

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow-x: hidden;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0, rgba(255, 255, 255, 0.016) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  opacity: 0.45;
}

.hero,
.content-wrap,
.site-footer,
.split-layout,
.admin-header {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 28px 18px 12px;
}

.hero__inner,
.admin-header,
.hero-card,
.form-card,
.login-card,
.summary-card,
.gallery-status,
.empty-state,
.photo-card,
.admin-card {
  backdrop-filter: blur(6px);
}

.hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 34px 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(56, 37, 24, 0.84), rgba(24, 16, 11, 0.92)),
    radial-gradient(circle at top, rgba(212, 116, 60, 0.18), transparent 42%);
}

.hero h1,
.hero-card h1,
.admin-header h1,
.section-heading h2,
.login-card h2,
.summary-card h3,
.empty-state h3,
.success-panel h2 {
  margin: 0;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  text-transform: uppercase;
}

.hero__lead,
.section-heading__text,
.hero-card__text,
.admin-header__text,
.gallery-status__text,
.form-note,
.empty-state p,
.success-panel p {
  color: var(--text-soft);
}

.hero__lead {
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: #f7b36f;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

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

.button-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #fff6eb;
  box-shadow: 0 12px 24px rgba(181, 91, 45, 0.25);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(247, 179, 111, 0.32);
  color: var(--text-main);
}

.button-danger {
  background: linear-gradient(180deg, #772d21, #5b2018);
  color: #ffe4d6;
}

.button-block {
  width: 100%;
}

.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px 18px 72px;
}

.hero-gallery .hero__inner,
body:not(.admin-body) .content-wrap {
  max-width: 1400px;
}

.section-heading {
  text-align: center;
  margin: 22px auto 24px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.gallery-status,
.empty-state,
.login-card,
.hero-card,
.form-card,
.visitor-access,
.delete-request {
  background: var(--bg-panel);
}

.visitor-access {
  margin-bottom: 28px;
  padding: 24px 20px;
}

.visitor-access__intro {
  margin-bottom: 14px;
}

.visitor-access h2 {
  margin: 0;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.08;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.gallery-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-weight: 700;
}

.status-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f3a35e;
  box-shadow: 0 0 0 6px rgba(243, 163, 94, 0.14);
}

.photo-grid,
.admin-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

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

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

.photo-card,
.admin-card {
  overflow: hidden;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.photo-card__media,
.admin-card__media {
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
}

.photo-card__media,
.admin-card__media {
  aspect-ratio: 1 / 1;
}

.photo-card__media img,
.admin-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card__body,
.admin-card__body {
  padding: 14px 16px 16px;
}

.photo-card__meta,
.admin-card__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.photo-card__delete {
  margin-top: 12px;
}

.ornamental-frame {
  border: 1px solid rgba(247, 179, 111, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
}

.ornamental-frame::before,
.ornamental-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(247, 179, 111, 0.34);
  pointer-events: none;
}

.ornamental-frame::before {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
}

.ornamental-frame::after {
  right: 12px;
  bottom: 12px;
  border-left: 0;
  border-top: 0;
}

.compact-frame {
  border-radius: var(--radius-md);
}

.compact-frame::before,
.compact-frame::after {
  width: 18px;
  height: 18px;
}

.empty-state {
  text-align: center;
  padding: 38px 20px;
}

.site-footer {
  padding: 0 18px 32px;
  text-align: center;
  color: var(--text-muted);
}

.split-layout {
  min-height: 100vh;
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 22px 18px 32px;
}

.split-layout--centered {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-card,
.form-card,
.login-card {
  padding: 28px 22px;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  text-transform: uppercase;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
  color: var(--text-soft);
}

.feature-list li {
  padding: 12px 14px;
  border: 1px solid rgba(247, 179, 111, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.stack-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(247, 179, 111, 0.22);
  border-radius: 14px;
  background: rgba(10, 7, 5, 0.4);
  color: var(--text-main);
}

.upload-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 210px;
  padding: 20px;
  border: 1.5px dashed rgba(247, 179, 111, 0.28);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(181, 91, 45, 0.08), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.12);
  text-align: center;
  cursor: pointer;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-dropzone__title {
  font-weight: 700;
  font-size: 1.1rem;
}

.upload-dropzone__hint {
  color: var(--text-muted);
}

.preview-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 360px;
}

.preview-card img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(247, 179, 111, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.alert.is-error {
  background: rgba(119, 45, 33, 0.34);
  border-color: rgba(255, 153, 123, 0.2);
}

.alert.is-success {
  background: rgba(59, 92, 54, 0.36);
  border-color: rgba(148, 201, 131, 0.18);
}

.delete-code-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(247, 179, 111, 0.16);
}

.delete-code-panel__label {
  margin: 0 0 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.delete-code-panel strong {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: #fff3e2;
}

.identity-bar {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(247, 179, 111, 0.16);
}

.delete-request {
  margin-bottom: 24px;
  padding: 20px;
}

.delete-request h3 {
  margin: 0 0 8px;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
}

.delete-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.delete-form input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(247, 179, 111, 0.22);
  border-radius: 14px;
  background: rgba(10, 7, 5, 0.4);
  color: var(--text-main);
}

.success-panel {
  text-align: center;
}

.carousel-body {
  min-height: 100vh;
}

.carousel-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px;
}

.carousel-header {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.carousel-header h1 {
  margin: 0;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.carousel-shell {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
  background: rgba(24, 16, 11, 0.82);
}

.carousel-empty {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  color: var(--text-soft);
}

.carousel-empty h2 {
  margin: 0 0 12px;
  font-family: "Alfa Slab One", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
}

.carousel-slide {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 70vh;
  background: rgba(0, 0, 0, 0.18);
}

.carousel-slide__media {
  min-height: 70vh;
}

.carousel-slide__media img {
  width: 100%;
  height: 70vh;
  object-fit: contain;
  background: #0f0a07;
}

.admin-body {
  padding-bottom: 32px;
}

.admin-header {
  max-width: var(--content-width);
  margin: 22px auto 0;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  background: var(--bg-panel);
}

.admin-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-wrap {
  padding-top: 22px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  padding: 20px;
  background: var(--bg-panel-soft);
}

.summary-card h3 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 6px;
}

.admin-section {
  margin-bottom: 28px;
}

.section-heading--admin {
  text-align: left;
  margin: 0 0 14px;
}

.admin-card__body {
  display: grid;
  gap: 8px;
}

.admin-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.admin-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.admin-card__actions .button {
  min-height: 42px;
  padding: 0 12px;
}

.hidden {
  display: none !important;
}

@media (min-width: 700px) {
  .split-layout {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-card,
  .form-card {
    min-height: 620px;
  }
}

@media (min-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .delete-form {
    grid-template-columns: 150px minmax(0, 240px) auto;
    align-items: end;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .hero {
    padding-inline: 12px;
  }

  .hero__inner,
  .hero-card,
  .form-card,
  .login-card,
  .admin-header {
    padding: 22px 16px;
  }

  .content-wrap,
  .split-layout {
    padding-inline: 12px;
  }

  .gallery-status {
    padding: 16px;
  }

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

  .carousel-stage {
    padding: 14px;
  }

  .carousel-shell {
    padding: 12px;
  }

  .carousel-slide,
  .carousel-slide__media {
    min-height: 58vh;
  }

  .carousel-slide__media img {
    height: 58vh;
  }
}
