/* === Fonts (self-hosted, latin subsets from Google Fonts) === */
@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cinzel-decorative-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900; /* variable font */
  font-display: swap;
  src: url('/fonts/raleway-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === Variables === */
:root {
  --text: #272727;
  --text-secondary: #666;
  --bg: #fff;
  --accent-green: #61bb30;
  --font-body: 'Raleway', sans-serif;
  --font-title: 'Cinzel Decorative', serif;
  --max-width: 1200px;
}

/* === Typography === */
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--text); font-weight: 400; }

/* === Announcement Bar === */
.announcement-bar {
  background: var(--accent-green);
  color: #fff;
  text-align: center;
  padding: 10px 40px;
  position: relative;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.announcement-bar a {
  color: #fff;
  text-decoration: underline;
}
.announcement-bar .dismiss {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
/* === Header === */
.site-header {
  text-align: center;
  padding: 12px 20px 4px;
}
.site-title {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.site-title a { color: var(--text); }

/* === Navigation === */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 12px;
  padding: 0 0 4px;
  font-size: 14px;
  letter-spacing: 1px;
}
.pill-btn {
  display: inline-block;
  min-width: 150px;
  padding: 12px 32px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  transition: filter 0.2s, transform 0.1s;
}
.pill-btn:hover { filter: brightness(1.08); }
.pill-btn:active { transform: translateY(1px); }
.pill-etsy { background: #f7924e; }
.pill-redbubble { background: #d20000; }

/* === Social Icons (header & footer) === */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 2px 0;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.social-icons a:hover { opacity: 1; }
/* Header icons: larger, with breathing room (footer keeps its own) */
.nav-content .social-icons {
  padding: 6px 0 12px;
}
.nav-content .social-icons svg {
  width: 24px;
  height: 24px;
}
.social-icons svg {
  width: 20px;
  height: 20px;
  fill: var(--text);
}

/* === Shop Links === */
.shop-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 4px 0 16px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.shop-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.shop-links a:hover { color: var(--text); }

/* === Gallery Grid (justified) === */
.gallery {
  /* Full-bleed like the live site — the footer keeps --max-width */
  width: 100%;
  padding: 8px 18px 18px;
}
.gallery-grid {
  position: relative;
}
/* Fallback before JS runs */
.gallery-grid:not(.justified) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-grid:not(.justified)::after {
  content: '';
  flex-grow: 999;
}
.gallery-grid:not(.justified) a {
  display: block;
  overflow: hidden;
  height: 380px;
}
.gallery-grid:not(.justified) img {
  height: 100%;
  object-fit: cover;
}
/* Justified state (JS active) */
.gallery-grid.justified a {
  display: block;
  overflow: hidden;
}
.gallery-grid.justified img {
  width: 100%;
  height: 100%;
}
.gallery-grid img {
  transition: transform 0.3s ease, opacity 0.4s ease;
  opacity: 0;
}
.gallery-grid img.loaded {
  opacity: 1;
}
.gallery-grid a:hover img {
  transform: scale(1.03);
}

/* === Detail Overlay === */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-overlay[hidden] { display: none; }
.detail-image {
  max-width: calc(100% - 120px);
  max-height: calc(100% - 40px);
  object-fit: contain;
}
.detail-close, .detail-prev, .detail-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 28px;
  padding: 12px 16px;
  transition: color 0.2s;
  z-index: 1;
}
.detail-close:hover, .detail-prev:hover, .detail-next:hover {
  color: #fff;
}
.detail-close { top: 10px; right: 10px; font-size: 32px; }
.detail-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.detail-next { right: 10px; top: 50%; transform: translateY(-50%); }
.detail-etsy {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.detail-etsy a {
  color: #f7b27e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-etsy a:hover { color: #fff; }

/* === Art Detail Pages (/art/<slug>/) === */
.art-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px 30px;
  text-align: center;
}
.art-page img {
  margin: 0 auto;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
}
.art-shop {
  padding-top: 14px;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.art-shop a {
  color: #d2691e;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.art-shop a:hover { color: var(--text); }
.art-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 16px;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.art-nav a { color: var(--text-secondary); transition: color 0.2s; }
.art-nav a:hover { color: var(--text); }

/* === Book Page === */
.book-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  text-align: center;
}
.book-page h2 {
  font-size: 32px;
  margin-bottom: 6px;
}
.book-page p { margin-bottom: 12px; }
.book-tagline { font-size: 15px; }
.book-page p a {
  color: var(--accent-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.book-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
}
.book-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.book-art img { margin: 0 auto; }

/* === Footer === */
.site-footer {
  border-top: 1px solid #eee;
  margin-top: 40px;
  padding: 40px 20px 20px;
}
.footer-columns {
  display: flex;
  justify-content: center;
  gap: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}
.footer-col {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.footer-col h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.footer-col p, .footer-col a {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.footer-col a:hover { color: var(--text); }
.footer-col ul { display: flex; flex-direction: column; gap: 4px; }
.footer-col ul a { font-size: 13px; }
.footer-bottom {
  text-align: center;
  padding: 30px 0 10px;
  font-size: 12px;
  color: #999;
}
.footer-bottom .social-icons {
  margin-bottom: 12px;
}

/* === 404 Page === */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}
.page-404 h2 {
  font-size: 48px;
  margin-bottom: 16px;
}
.page-404 p {
  margin-bottom: 24px;
}
.page-404 a {
  color: var(--accent-green);
  text-decoration: underline;
}

.nav-wrapper {
  position: relative;
}

/* === Responsive === */
@media (max-width: 640px) {
  .gallery { padding: 6px; }
  /* Masonry columns so each whole thumbnail shows at its own aspect
     ratio — no cropping. JS clears its inline styles below 640px. */
  .gallery-grid {
    display: block !important;
    columns: 2;
    column-gap: 6px;
    height: auto !important;
    position: static !important;
  }
  .gallery-grid::after { display: none; }
  .gallery-grid a {
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 6px;
    width: auto !important;
    height: auto !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    overflow: hidden;
    border-radius: 2px;
  }
  .gallery-grid img,
  .gallery-grid:not(.justified) img {
    width: 100%;
    height: auto !important;
    object-fit: fill;
  }

  .main-nav { gap: 16px; }
  .pill-btn { min-width: 120px; padding: 10px 20px; }

  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    text-align: center;
  }
  .footer-col { min-width: unset; }

  .site-title { font-size: 28px; }

  .detail-image {
    max-width: calc(100% - 80px);
  }
}
