/* Peter Cordy Gallery */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --fg: #111111;
  --fg-secondary: #555555;
  --muted: #888888;
  --border: #e4e4e4;
  --accent: #c41a0a;
  --accent-hover: #a01508;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ===== NAV ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background: #111111;
  color: #fff;
}
.site-nav .brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.site-nav .nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.site-nav .nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.site-nav .nav-links a:hover {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

/* ===== HOME PAGE BACKGROUND (clouds) ===== */
body.home {
  background: linear-gradient(180deg, #9bc6e8 0%, #cfe3f3 55%, #eef5fb 100%);
  background-image: url('/images/clouds2.jpeg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.home .hero { margin-top: auto; }
body.home .category-cards { margin-bottom: auto; }

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 48px 40px 32px;
  background: transparent;
  color: #111111;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.hero p {
  font-size: 18px;
  color: #2a2a2a;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

/* ===== CATEGORY CARDS (Home) ===== */
.category-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 24px 40px 60px;
  max-width: 100%;
}
.category-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.category-card:hover img {
  transform: scale(1.05);
  filter: brightness(0.85);
}
.category-card .overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 36px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  transition: padding-bottom 0.3s var(--ease);
}
.category-card:hover .overlay { padding-bottom: 48px; }
.category-card h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.category-card .card-subtitle {
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.category-card:hover .card-subtitle {
  opacity: 0.9;
  transform: translateY(0);
}

/* ===== SECTION HEADER ===== */
.section-header {
  padding: 56px 40px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.8px;
}
.section-header p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 15px;
}
.section-header a {
  text-decoration: none;
  font-weight: 500;
}

/* ===== SET GRID ===== */
.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding: 0 40px 80px;
  max-width: 1280px;
  margin: 0 auto;
}
.set-card {
  text-decoration: none;
  color: var(--fg);
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.set-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.set-card .img-wrap {
  overflow: hidden;
}
.set-card img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease);
}
.set-card:hover img {
  transform: scale(1.04);
}
.set-card .set-info {
  padding: 16px 20px 20px;
}
.set-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}
.set-card .set-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ===== MAP ===== */
.map-container {
  width: 100%;
  height: calc(100vh - 56px - 48px);
  min-height: 500px;
}
.map-filters {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.map-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.map-filter input { cursor: pointer; accent-color: var(--accent); }
.filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.filter-dot.wildlife { background: #c41a0a; }
.filter-dot.people { background: #1565c0; }
.filter-dot.places { background: #2e7d32; }
.photo-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  padding: 28px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.photo-nav-link {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 6px 4px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.photo-nav-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 600px) {
  .photo-nav { gap: 24px; padding: 20px; }
  .photo-nav-link { font-size: 18px; }
}

/* ===== VIEWER ===== */
.viewer {
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.viewer-header a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.viewer-header a:hover { color: #fff; }
.viewer-header h1 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.viewer-header .counter {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  font-variant-numeric: tabular-nums;
}
.viewer-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 60px;
}
.viewer-main img#viewer-image {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 2px;
  transition: opacity 0.25s var(--ease);
}
.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.viewer-nav:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }
.viewer-label {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  letter-spacing: 0.3px;
}
.viewer-strip {
  display: flex;
  gap: 3px;
  padding: 10px 28px;
  overflow-x: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.4);
}
.viewer-strip::-webkit-scrollbar { height: 4px; }
.viewer-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.viewer-strip img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.35;
  border-radius: 2px;
  border: 2px solid transparent;
  transition: opacity 0.2s var(--ease), border-color 0.2s var(--ease);
}
.viewer-strip img:hover { opacity: 0.7; }
.viewer-strip img.active {
  opacity: 1;
  border-color: var(--accent);
}

/* ===== TIMELINE ===== */
.timeline {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 80px;
}
.timeline-year {
  margin-bottom: 48px;
}
.timeline-year h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 32px 40px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  background: #111111;
}
.site-footer a { color: rgba(255,255,255,0.4); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .category-cards { grid-template-columns: 1fr; gap: 20px; padding: 16px 20px 40px; }
  .category-card { aspect-ratio: 16/9; }
}
@media (max-width: 768px) {
  .hero { padding: 64px 24px 48px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero p { font-size: 16px; }
  .section-header { padding: 40px 20px 24px; }
  .section-header h1 { font-size: 28px; }
  .set-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding: 0 20px 60px; }
  .site-nav {
    padding: 0 20px;
    height: 50px;
  }
  .site-nav .nav-links { gap: 16px; }
  .site-nav .nav-links a { font-size: 11px; letter-spacing: 1px; }
  .map-filters { padding: 10px 20px; gap: 12px; }
  .viewer-main { padding: 16px; }
  .viewer-nav { width: 40px; height: 60px; font-size: 22px; }
  .viewer-nav.prev { left: 8px; }
  .viewer-nav.next { right: 8px; }
  .viewer-strip { padding: 8px 16px; }
  .category-card .overlay { padding: 24px 20px; }
  .category-card h2 { font-size: 22px; }
  .category-card .card-subtitle { opacity: 0.85; transform: none; }
}

/* Set description */
.set-description {
    color: var(--fg-secondary);
    font-size: 15px;
    line-height: 1.6;
    max-width: 640px;
    margin-top: 8px;
}

/* Image caption in viewer */
.viewer-caption {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
    text-align: center;
    max-width: 60%;
    pointer-events: none;
}
