/* ─────────────────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────────────────── */
:root {
  --serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:   'Inter', system-ui, -apple-system, sans-serif;

  --bg:     #fafaf8;
  --fg:     #1a1a18;
  --muted:  #78786e;
  --accent: #b8956a;
  --border: #e6e2d8;
}

/* ─────────────────────────────────────────────────────────
   Reset & base
   ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ─────────────────────────────────────────────────────────
   Navigation
   ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  transition: color 0.2s;
}

.site-title:hover {
  color: var(--accent);
}

.site-nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.site-nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav-links a:hover,
.site-nav-links a.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* ─────────────────────────────────────────────────────────
   Home — hero
   ───────────────────────────────────────────────────────── */
.home-hero {
  text-align: center;
  padding: 8rem 2rem 5rem;
}

.home-hero__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.05;
  color: var(--fg);
}

.home-hero__subtitle {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ─────────────────────────────────────────────────────────
   Home — collection cards
   ───────────────────────────────────────────────────────── */
.home-collections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  max-width: 1400px;
  margin: 0 auto 8rem;
  padding: 0 4rem;
}

.collection-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 6 / 7;
  display: block;
  background: var(--fg);
  color: white;
}

.collection-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter  0.4s ease;
}

.collection-card:hover .collection-card__bg {
  transform: scale(1.05);
  filter: brightness(0.45);
}

.collection-card__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
}

.collection-card__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.collection-card__meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.75;
}

/* ─────────────────────────────────────────────────────────
   Gallery pages — page header
   ───────────────────────────────────────────────────────── */
.page-header {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
}

.page-header__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.page-header__description {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────────────────────
   Gallery pages — section subheadings
   ───────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  padding: 3rem 2rem 1.5rem;
}

.section-header__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4rem 6rem 0;
}

/* ─────────────────────────────────────────────────────────
   Gallery grid
   ───────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3px;
  max-width: 1600px;
  margin: 1.5rem auto 6rem;
  padding: 0;
}

/* Wider columns for landscape / multi-panel compilations */
.gallery-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

/* Tighter grid for small square drawings */
.gallery-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ─────────────────────────────────────────────────────────
   Gallery item
   ───────────────────────────────────────────────────────── */
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
  background: var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter  0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.82);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Week compilation items are landscape */
.gallery-grid--wide .gallery-item {
  aspect-ratio: 4 / 3;
}

/* ─────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav {
    padding: 1.25rem 2rem;
  }

  .home-collections {
    padding: 0 2rem;
  }

  .collection-card {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 600px) {
  .site-nav {
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .site-nav-links {
    gap: 1.5rem;
  }

  .home-hero {
    padding: 5rem 1.5rem 3rem;
  }

  .home-collections {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
    gap: 3px;
  }

  .gallery-grid,
  .gallery-grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 2px;
  }

  .gallery-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .section-divider {
    margin-left: 2rem;
    margin-right: 2rem;
  }
}
