/* ─────────────────────────────────────────────────────
   Ben T Clarkson — Ceramicist
   ───────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }

/* Global img: cover by default, overridden where needed */
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Design tokens ── */
:root {
  --bg:          #EFEFEF;
  --nav-bg:      #ffffff;
  --green:       #4e6040;
  --green-light: #D2D8D2;
  --text:        #1a1a1a;
  --muted:       #8a8a8a;
  --gap:         10px;
  --pad:         28px;
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════
   NAV — white background
════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.nav-logo {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.5; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity 0.2s;
}
.nav-links a:hover  { opacity: 0.5; }
.nav-links a.active { opacity: 0.35; }

/* ════════════════════════════════════
   PAGE SECTION TITLE  (centered)
════════════════════════════════════ */
.page-section-title {
  text-align: center;
  padding: 36px var(--pad) 24px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ════════════════════════════════════
   MAIN
════════════════════════════════════ */
main { flex: 1; padding: 0 var(--pad) 56px; }

/* ════════════════════════════════════
   SCULPTURE PAGE — hero grid
   Natural / uncropped images
════════════════════════════════════ */
.sculpture-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
}

.sculpture-header-grid .hero-cell {
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  transition: opacity 0.18s;
}
.sculpture-header-grid .hero-cell:hover { opacity: 0.88; }

/* Let the image set its own height (no crop) */
.sculpture-header-grid .hero-cell img {
  width: 100%;
  height: auto;
  object-fit: initial;
  display: block;
}

/* ════════════════════════════════════
   SCULPTURE PAGE — manual carousel
════════════════════════════════════ */
.carousel-outer {
  position: relative;
  margin-top: var(--gap);
  /* extend edge-to-edge */
  width: calc(100% + var(--pad) * 2);
  margin-left: calc(-1 * var(--pad));
}

/* show arrows only on hover */
.carousel-outer:hover .carousel-arrow { opacity: 1; pointer-events: auto; }

.carousel-track-wrap {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: var(--gap);
  transition: transform 0.35s ease;
  will-change: transform;
}

/* Square cells */
.carousel-cell {
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  background: #dbd7d2;
  cursor: default;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.15s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }
.carousel-arrow:disabled { opacity: 0.2 !important; pointer-events: none; }

/* ════════════════════════════════════
   WORK PAGE — project groups
════════════════════════════════════ */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-name {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-grid {
  display: grid;
  gap: var(--gap);
}
.project-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.project-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.project-grid.cols-1 { grid-template-columns: 1fr; }

.project-grid .img-cell {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #dbd7d2;
  cursor: pointer;
  transition: opacity 0.18s;
}
.project-grid .img-cell:hover { opacity: 0.88; }

/* ════════════════════════════════════
   ABOUT PAGE
════════════════════════════════════ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.about-text-box {
  background: var(--green-light);
  padding: 40px 36px;
}
.about-text-box p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text);
}
.about-text-box p + p { margin-top: 1.1em; }
.about-text-box .contact-line {
  margin-top: 32px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.about-text-box .contact-line a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-photo {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #dbd7d2;
}

/* ════════════════════════════════════
   LIGHTBOX
════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lb-bg {
  position: absolute;
  inset: 0;
  background: rgba(8,8,8,0.93);
  cursor: pointer;
}
.lb-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px;
  max-width: 92vw;
  max-height: 92vh;
}
.lb-img-wrap {
  max-width: 82vw;
  max-height: 84vh;
  overflow: hidden;
}
.lb-img-wrap img {
  max-width: 82vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.lb-btn:hover { color: #fff; }
.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 26px;
}
.lb-caption {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  background: var(--green);
  color: rgba(255,255,255,0.88);
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}
.footer-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  overflow: hidden;
}
.footer-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.footer-text { font-size: 11px; letter-spacing: 0.04em; }
.footer-text strong {
  font-weight: 500;
  display: block;
  color: #fff;
  letter-spacing: 0.03em;
}

/* ════════════════════════════════════
   RESPONSIVE — everything stacks
════════════════════════════════════ */
@media (max-width: 800px) {
  :root { --pad: 16px; }

  .sculpture-header-grid { grid-template-columns: 1fr 1fr; }
  .project-grid.cols-3   { grid-template-columns: 1fr 1fr; }
  .about-layout          { grid-template-columns: 1fr; }
  .about-photo           { aspect-ratio: 4/3; }
  .nav-links             { gap: 18px; }
}

@media (max-width: 540px) {
  :root { --pad: 14px; }

  /* Nav: stack if needed */
  .site-nav     { padding: 14px var(--pad); flex-wrap: wrap; gap: 10px; }
  .nav-links    { gap: 14px; }
  .nav-links a  { font-size: 10px; letter-spacing: 0.08em; }

  /* All grids → single column */
  .sculpture-header-grid { grid-template-columns: 1fr; }
  .project-grid.cols-3   { grid-template-columns: 1fr; }
  .project-grid.cols-2   { grid-template-columns: 1fr; }

  /* About */
  .about-layout { grid-template-columns: 1fr; }
  .about-text-box { padding: 28px 20px; }

  /* Carousel cells a bit smaller on phone */
  .carousel-cell { width: 160px; height: 160px; }
}
