:root {
  --primary: #854d0e;
  --secondary: #fffbeb;
  --accent: #0369a1;
  --text: #f5f5f5;
  --bg: #0f0f0f;
  --card-bg: #1a1a1a;
  --border: #333333;
}

/* Base Styles */
body {
  background: var(--bg);
  color: var(--text);
  font-size: clamp(14px, 4vw, 16px);
}

section {
  padding: 40px 0;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.btn {
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #a16207;
}

h1 {
  font-weight: 800;
  font-size: clamp(20px, 5vw, 32px);
}

h2 {
  font-size: clamp(18px, 4.5vw, 28px);
}

/* Gallery Engine Rules (Strictly CSS-based) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Perfect 1:1 Aspect Ratio */
  overflow: hidden;
  border-radius: 12px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery Selectors */
#img-1:checked ~ .gallery-main .slide-1,
#img-2:checked ~ .gallery-main .slide-2,
#img-3:checked ~ .gallery-main .slide-3,
#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

/* Thumbnail Active States */
#img-1:checked ~ .thumbnails label[for="img-1"],
#img-2:checked ~ .thumbnails label[for="img-2"],
#img-3:checked ~ .thumbnails label[for="img-3"],
#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--primary);
  opacity: 1;
  transform: scale(0.95);
}

.thumbnails label {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.thumbnails label:hover {
  opacity: 0.9;
}

/* Responsive Grid Overrides */
@media (min-width: 768px) {
  section {
    padding: 64px 0;
  }
}