/* CSS Custom Variables for Theme */
:root {
  --primary: #8b5cf6;
  --secondary: #f5f3ff;
  --accent: #ec4899;
  --text: #f5f5f5;
  --bg: #0f0f0f;
}

/* Base Styles */
body {
  background-color: var(--bg);
  color: var(--text);
}

/* Responsive typography via clamp() */
h1 {
  font-size: clamp(20px, 4vw, 32px);
}
h2 {
  font-size: clamp(18px, 3.5vw, 28px);
}
p, span, li, a {
  font-size: clamp(14px, 2.5vw, 16px);
}

/* Utility to completely hide elements while remaining accessible to screen readers */
.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;
}

/* CSS-Only Interactive Gallery */
.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Forces 1:1 Aspect Ratio */
  overflow: hidden;
  background-color: #1a1a1a;
  border-radius: 8px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Show slide based on checked radio input */
#img-1:checked ~ .gallery-main .slide-1 {
  opacity: 1;
  z-index: 10;
}
#img-2:checked ~ .gallery-main .slide-2 {
  opacity: 1;
  z-index: 10;
}
#img-3:checked ~ .gallery-main .slide-3 {
  opacity: 1;
  z-index: 10;
}
#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

/* Thumbnail Layout */
.thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.thumbnails label {
  cursor: pointer;
  border: 2px solid #333;
  border-radius: 6px;
  overflow: hidden;
  width: 25%;
  padding-bottom: 25%; /* Square thumbnails */
  position: relative;
  transition: border-color 0.2s ease-in-out;
}

.thumbnails label img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Highlight Active Thumbnail */
#img-1:checked ~ .thumbnails label[for="img-1"] {
  border-color: var(--primary);
}
#img-2:checked ~ .thumbnails label[for="img-2"] {
  border-color: var(--primary);
}
#img-3:checked ~ .thumbnails label[for="img-3"] {
  border-color: var(--primary);
}
#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--primary);
}

/* CTA Focus Styling */
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}