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

:root {
  --cream:      #f7f4ef;
  --ink:        #1c1a17;
  --ink-light:  #6b6560;
  --red:        #c0392b;
  --red-muted:  #e8cfc9;
  --border:     #e2ddd7;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Karla', system-ui, sans-serif;
  --max-w:      1200px;
  --gap:        2rem;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ───────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 2rem;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.wordmark .tomato   { color: var(--ink); }
.wordmark .divider  { color: var(--ink-light); margin: 0 0.2em; font-style: italic; }
.wordmark .tomahto  { color: var(--red); font-style: italic; }

nav { display: flex; gap: 2rem; }

nav a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s;
}

nav a:hover { color: var(--red); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-light);
  max-width: 2000px;
  line-height: 1.4;
}

/* ── Gallery ──────────────────────────────────────────────────── */
.gallery-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 2rem 6rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}

.painting {
  cursor: pointer;
}

.painting .img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--red-muted);
  aspect-ratio: 4 / 5;
}

/* Actual image */
.painting .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s;
}

/* Placeholder shown when image is missing */
.painting .img-wrap .placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.painting .img-wrap.placeholder img     { opacity: 0; }
.painting .img-wrap.placeholder .placeholder-inner { opacity: 1; }

.painting:hover .img-wrap img {
  transform: scale(1.03);
}

figcaption {
  padding: 0.85rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.painting .title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
}

.painting .meta {
  font-size: 0.78rem;
  color: var(--ink-light);
  letter-spacing: 0.04em;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(28, 26, 23, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  max-width: min(90vw, 800px);
  max-height: 90vh;
}

#lb-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
}

.lb-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

#lb-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--cream);
}

#lb-meta {
  font-size: 0.78rem;
  color: rgba(247,244,239,0.5);
  letter-spacing: 0.06em;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(247,244,239,0.6);
  cursor: pointer;
  font-size: 1.5rem;
  transition: color 0.2s;
  padding: 0.5rem;
  line-height: 1;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--cream); }

.lb-close { top: 1.5rem; right: 1.5rem; font-size: 2rem; }
.lb-prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lb-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }

/* ── About ────────────────────────────────────────────────────── */
.about-section {
  border-top: 1px solid var(--border);
  padding: 5rem 2rem;
}

.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--ink-light);
  margin-bottom: 1rem;
}

.contact-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red-muted);
  padding-bottom: 0.1rem;
  transition: border-color 0.2s;
}

.contact-link:hover { border-color: var(--red); }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  max-width: 100%;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about-inner { grid-template-columns: 1fr; gap: 2rem; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .hero { padding: 3rem 1.25rem 2rem; }
  header { padding: 1rem 1.25rem; }
  .gallery-section { padding: 1rem 1.25rem 4rem; }
}
