:root {
  --bg: #f6f0e6;
  --ink: #1f1a17;
  --muted: #6e645b;
  --card: #fffaf2;
  --accent: #ffb84d;
  --shadow: 0 10px 30px rgba(31, 26, 23, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, #ffd99b 0%, rgba(255, 217, 155, 0) 60%),
    radial-gradient(900px 500px at 90% 10%, #dfe8ff 0%, rgba(223, 232, 255, 0) 70%),
    var(--bg);
  font-family: "Palatino", "Palatino Linotype", "Book Antiqua", serif;
  min-height: 100vh;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  z-index: 1;
}

.hero {
  position: relative;
  padding: 72px 6vw 36px;
  z-index: 2;
}

.hero-inner {
  max-width: 900px;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.2rem);
  margin: 0 0 16px;
}

.sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

main {
  padding: 0 6vw 64px;
  position: relative;
  z-index: 2;
}

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

.card {
  border: none;
  background: var(--card);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  font: inherit;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(31, 26, 23, 0.08);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(31, 26, 23, 0.18);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.card .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

.footer {
  padding: 16px 6vw 48px;
  color: var(--muted);
  z-index: 2;
  position: relative;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 15, 14, 0.6);
  backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  width: min(960px, 94vw);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 2;
}

.lightbox-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(31, 26, 23, 0.12);
  background: #fff;
}

.ghost {
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.ghost:hover {
  background: rgba(31, 26, 23, 0.08);
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.zoom-control input[type="range"] {
  accent-color: var(--accent);
}

.lightbox-stage {
  width: 100%;
  height: min(70vh, 700px);
  background: #faf7f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.lightbox-stage:active {
  cursor: grabbing;
}

.lightbox-stage img {
  max-width: 92%;
  max-height: 92%;
  transform-origin: center;
  user-select: none;
  pointer-events: none;
}

.lightbox-meta {
  padding: 10px 16px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .hero {
    padding-top: 48px;
  }

  .card img {
    height: 170px;
  }

  .lightbox-toolbar {
    flex-wrap: wrap;
  }

  .zoom-control {
    margin-left: 0;
  }
}

body.no-scroll {
  overflow: hidden;
}
