/* ============================================================
   ARTIST WEBSITE — shared stylesheet
   Palette:
     --white:   #FAFAF8  (background)
     --ink:     #1A1A18  (primary text)
     --mid:     #6B6B67  (secondary text, captions)
     --rule:    #E0DDD8  (dividers)
     --canvas:  #C8B89A  (accent — hover, links)
   Type:
     Display / name:  'Cormorant Garamond' (Google Fonts)
     Body / nav / UI: 'Inter' (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

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

/* ── Tokens ── */
:root {
  --white:  #FAFAF8;
  --ink:    #1A1A18;
  --mid:    #6B6B67;
  --rule:   #E0DDD8;
  --canvas: #C8B89A;
  --gap:    clamp(1rem, 2.5vw, 2.5rem);
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ── */
nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem var(--gap);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

/* ── Main content area ── */
main {
  flex: 1;
  padding: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--rule);
  padding: 1rem var(--gap);
  text-align: center;
  font-size: 0.78rem;
  color: var(--mid);
  letter-spacing: 0.04em;
}

/* ── Type helpers ── */
.display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
}

/* ── Buttons / links ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.btn:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-canvas {
  border-color: var(--canvas);
  color: var(--canvas);
}

.btn-canvas:hover {
  background: var(--canvas);
  color: var(--white);
}

/* ══════════════════════════════════════
   HOME PAGE
══════════════════════════════════════ */

/* Hero */
.hero {
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(3rem, 6vw, 6rem);
  position: relative;
  overflow: hidden;
  /* Height driven by content; filmstrip fills behind it */
}

/* ── Filmstrip: real images, correct aspect ratio, no stretching ── */
.hero-filmstrip-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

@keyframes filmstrip-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-filmstrip {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: max-content;
  animation: filmstrip-scroll 27s linear infinite;
}

.hero-filmstrip img {
  height: 100%;
  width: auto;         /* natural aspect ratio — no stretching */
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Scrim: dark on left (protects text), hazy transition in centre, clear on right */
.hero-filmstrip-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(26,26,24,0.72) 0%,      /* dark — covers text area */
    rgba(26,26,24,0.68) 35%,     /* still dark through most of text */
    rgba(26,26,24,0.35) 50%,     /* hazy midpoint transition */
    rgba(26,26,24,0.05) 65%,     /* nearly clear */
    rgba(26,26,24,0.0)  75%      /* full brightness — paintings show true */
  );
}

@media (prefers-reduced-motion: reduce) {
  .hero-filmstrip { animation: none; }
}

/* ── Hero text content sits above filmstrip ── */
.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 3rem);
  max-width: 600px;
}

/* Text colours for dark background */
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.55);
  margin-bottom: 0.6rem;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero-title em {
  font-style: italic;
  color: rgba(200,184,154,0.95);
}

.hero-body {
  max-width: 520px;
  color: rgba(250,250,248,0.75);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.hero .btn {
  border-color: rgba(250,250,248,0.5);
  color: var(--white);
}

.hero .btn:hover {
  background: var(--white);
  color: var(--ink);
}

/* Featured works grid on homepage */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.featured-item {
  overflow: hidden;
  background: var(--rule);
  aspect-ratio: 3/4;
  position: relative;
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-item:hover img {
  transform: scale(1.03);
}

.featured-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

/* Section label */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1rem;
}

.section-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* About strip */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 3rem);
  padding: clamp(1.5rem, 3vw, 3rem) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}

.about-strip h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.about-strip p {
  color: var(--mid);
  margin-bottom: 0.75rem;
}

/* ══════════════════════════════════════
   PAINTINGS PAGE
══════════════════════════════════════ */

.page-header {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.page-subtitle {
  color: var(--mid);
  font-size: 0.9rem;
}

/* In-page section nav (Paintings / Current Paintings / Exhibitions) */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.section-nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.section-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--canvas);
}

/* Paintings grid */
.paintings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

/* ── Single painting card ──
   TO ADD A NEW PAINTING: copy one .painting block in paintings.html
   and update the image src, title, year, medium, and dimensions.
   ── */
.painting {
  cursor: pointer;
}

.painting-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--rule);
  margin-bottom: 0.5rem;
  aspect-ratio: 3/4;    /* change to 4/3 for landscape paintings */
}

.painting-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0;
}

.painting-img-wrap img.loaded {
  opacity: 1;
}

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

.painting-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.painting-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 400;
}

.painting-details {
  font-size: 0.78rem;
  color: var(--mid);
  letter-spacing: 0.02em;
}

/* ── Currently Painting: one row per painting, stage photos laid out
   left → right within the row. On desktop the row divides its available
   width evenly between however many stage photos it has, so they all
   fit on one line. ── */
.progress-group {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.progress-row-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.progress-row {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.4rem, 1vw, 0.75rem);
}

.progress-row-img-wrap {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--rule);
  cursor: pointer;
}

.progress-row-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.progress-row-img-wrap img.loaded {
  opacity: 1;
}

.progress-row-img-wrap:hover img {
  transform: scale(1.04);
}

/* ── Exhibitions ── */
.exhibition-photo {
  cursor: pointer;
}

.exhibition-photo .painting-img-wrap {
  aspect-ratio: 4/3; /* exhibition/installation shots are usually landscape */
  margin-bottom: 0;  /* photos in a group share one title, no per-photo caption below */
}

.exhibition-group {
  border: 1px solid var(--ink);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.exhibition-group-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,24,0.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 1.5rem;
  overflow-y: auto;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 820px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lightbox-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-info {
  color: var(--white);
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.lightbox-info h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.lightbox-info p {
  font-size: 0.78rem;
  color: rgba(250,250,248,0.55);
  margin-bottom: 0;
  line-height: 1.7;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* Lightbox sequence navigation — shown only when stepping through a painting's
   progress stages (Currently Painting); hidden for single-image views. */
.lightbox-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  padding: 0.5rem;
  transition: opacity 0.2s;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox.has-sequence .lightbox-nav { display: block; }

/* ══════════════════════════════════════
   HOW TO BUY PAGE
══════════════════════════════════════ */

.buy-intro {
  max-width: 600px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.buy-intro p {
  color: var(--mid);
  margin-top: 1rem;
}

.buy-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.buy-option {
  padding: 1.25rem 1.5rem 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.buy-option-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.buy-option h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.buy-option p {
  font-size: 0.87rem;
  color: var(--mid);
  margin-bottom: 0.75rem;
  max-width: 320px;
}

.contact-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--rule);
}

.contact-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.contact-section p {
  color: var(--mid);
  max-width: 500px;
  margin-bottom: 1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.contact-details a {
  font-size: 0.9rem;
  color: var(--ink);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-details a:hover {
  color: var(--canvas);
}

.contact-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  width: 90px;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .hero-title { font-size: clamp(2.5rem, 14vw, 4rem); }

  .about-strip {
    grid-template-columns: 1fr;
  }

  /* Currently Painting: on small screens, stop forcing all stages onto
     one line — wrap instead, with each thumbnail at half the minimum
     width used by the Paintings grid (280px → 140px). */
  .progress-row {
    flex-wrap: wrap;
  }

  .progress-row-img-wrap {
    flex: 0 0 140px;
    width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .painting-img-wrap img,
  .progress-row-img-wrap img,
  .featured-item img { transition: none; }
}
