:root {
  --bg: #090909;
  --text: #f7f4f1;
  --muted: rgba(247, 244, 241, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --max: 1180px;
  --gold: #c9a37c;
  --ink: #1d1a17;
  --admin-bg: #f7f4ef;
  --admin-muted: #6f675e;
  --admin-gold: #8c5a34;
  --danger: #9c3b32;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.lock { overflow: hidden; }

a { color: inherit; }

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

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

.page { min-height: 100vh; background: #090909; }

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  background: #0a0a0a;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--hero-image, linear-gradient(135deg, #171717, #050505)) center top / cover no-repeat;
  transform: scale(1.01);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.3) 38%, rgba(0, 0, 0, 0.78) 76%, #090909 100%);
}

.hero-glow {
  position: absolute;
  inset: auto -20% -24% -20%;
  height: 55%;
  z-index: -1;
  background: radial-gradient(circle at 50% 40%, rgba(201, 163, 124, 0.12), transparent 58%);
  pointer-events: none;
}

.hero-inner {
  padding: 34px 0 54px;
  display: grid;
  gap: 20px;
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

h1, .gallery-section h2, .copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.mark {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
  margin: 8px 0 4px;
}

.copy {
  max-width: 650px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
  color: var(--muted);
}

.copy h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.1;
}

.copy h2:empty,
.bio:empty { display: none; }

.bio { margin: 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.actions[hidden],
.eyebrow[hidden],
.gallery-section h2[hidden] { display: none; }

.page-admin .cover-preview img {
  width: min(280px, 100%);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

.page-admin .admin-card input[type="file"] { font-size: 12px; }

.msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3d56a 0%, #e8c547 28%, #c9a227 62%, #a8841f 100%);
  color: #140f08;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 28px rgba(201, 162, 39, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.msg:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(201, 162, 39, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.msg svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.gallery-section {
  padding: 84px 0 92px;
  background: linear-gradient(180deg, #090909 0%, #0d0d0d 100%);
}

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

.gallery-section h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 66px);
  letter-spacing: -0.035em;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 120px;
  gap: 14px;
}

.thumb {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  overflow: hidden;
  background: #171717;
  cursor: zoom-in;
  color: inherit;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.thumb:hover img,
.thumb:focus-visible img {
  transform: scale(1.025);
  filter: brightness(1.05);
}

.thumb:focus-visible { outline: 1px solid var(--gold); }

.thumb:nth-child(1) { grid-column: span 7; grid-row: span 4; }
.thumb:nth-child(2) { grid-column: span 5; grid-row: span 4; }
.thumb:nth-child(3) { grid-column: span 4; grid-row: span 3; }
.thumb:nth-child(4) { grid-column: span 4; grid-row: span 3; }
.thumb:nth-child(5) { grid-column: span 4; grid-row: span 3; }
.thumb:nth-child(6) { grid-column: span 12; grid-row: span 3; }
.thumb:nth-child(n + 7) { grid-column: span 4; grid-row: span 3; }

.empty { color: var(--muted); }

.foot {
  padding: 28px 0 34px;
  background: #0d0d0d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

.foot a { text-decoration: none; color: rgba(255, 255, 255, 0.64); }

.foot-links { display: flex; gap: 18px; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 9, 0.96);
  padding: 64px 72px 48px;
}

.lb[hidden] { display: none; }

.lb-figure {
  margin: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lb-figure img {
  max-width: min(920px, 100%);
  max-height: calc(100vh - 140px);
  object-fit: contain;
}

.lb-figure figcaption,
.lb-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lb-count {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  letter-spacing: 0.14em;
}

.lb-close,
.lb-nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.lb-close {
  top: 16px;
  right: 18px;
  font-size: 36px;
  line-height: 1;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 54px;
  line-height: 1;
  padding: 8px 12px;
}

.lb-prev { left: 10px; }
.lb-next { right: 10px; }

@media (max-width: 800px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .hero::before { background-position: center top; }
  .hero-inner { padding: 28px 0 38px; }
  h1 { font-size: clamp(42px, 13vw, 72px); }
  .copy { font-size: 16px; line-height: 1.55; }
  .gallery-section { padding: 62px 0 70px; }
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
    gap: 10px;
  }
  .thumb:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
    border-radius: 16px;
  }
  .thumb:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .foot-inner { align-items: flex-start; flex-direction: column; }
  .lb { padding: 64px 16px 56px; }
  .lb-nav { font-size: 40px; }
}

@media (max-width: 480px) {
  .hero-inner { padding-bottom: 30px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.24em; }
  .copy h2 { font-size: 28px; }
  .actions { align-items: stretch; flex-direction: column; }
  .msg { width: 100%; }
  .mosaic { grid-auto-rows: 150px; }
}

body.page-admin {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(180, 140, 90, 0.22), transparent 55%),
    var(--admin-bg);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page-admin a { color: var(--admin-gold); text-decoration: none; }

.page-admin .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 7vw;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(29, 26, 23, 0.06);
}

.page-admin .brand {
  color: var(--ink);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

.page-admin .top-link {
  color: var(--admin-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-admin .eyebrow {
  margin: 0 0 10px;
  color: var(--admin-gold);
  letter-spacing: 0.28em;
}

.page-admin h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  text-shadow: none;
  font-size: 64px;
  line-height: 0.9;
  margin: 0 0 18px;
}

.page-admin .admin {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.page-admin .dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.page-admin label {
  display: grid;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 13px;
}

.page-admin input,
.page-admin textarea {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(29, 26, 23, 0.12);
  border-radius: 2px;
  padding: 12px 14px;
  color: var(--ink);
}

.page-admin textarea { resize: vertical; }

.page-admin .stack { display: grid; gap: 14px; margin-top: 8px; }

.page-admin .upload-box {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(140, 90, 52, 0.28);
}

.page-admin .hint { margin: 0; color: var(--admin-muted); font-size: 13px; }

.page-admin .btn {
  justify-self: start;
  border: 0;
  background: var(--admin-gold);
  color: #fff;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}

.page-admin .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(140, 90, 52, 0.28);
}

.page-admin .form-error { color: var(--danger); margin: 0; }

.page-admin .admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.page-admin .admin-card {
  position: relative;
  display: grid;
  gap: 8px;
  background: #fff;
  padding: 8px;
}

.page-admin .admin-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.page-admin .badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--admin-gold);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
}

.page-admin .card-actions { display: flex; gap: 6px; }

.page-admin .card-actions button {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(29, 26, 23, 0.12);
  padding: 8px 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink);
}

.page-admin .card-actions button:disabled { opacity: 0.35; cursor: default; }
.page-admin .card-actions .danger { color: var(--danger); }

@media (max-width: 860px) {
  .page-admin .admin-grid { grid-template-columns: 1fr 1fr; }
  .page-admin h1 { font-size: 48px; }
}

@media (max-width: 640px) {
  .page-admin .top { padding-left: 18px; padding-right: 18px; }
  .page-admin .admin-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
