/* =====================================================================
   Conscious Wood - Wessel Gresse
   Earthy "kiln" palette: Autumn Kiln, Kiln Ember, Worn Pottery.
   Plain CSS, mobile-first, no framework.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette */
  --kiln:        #7D4F25;   /* Autumn Kiln - primary brand, buttons, icons, accents */
  --kiln-deep:   #5C3819;   /* deeper autumn - links, hover step toward ember */
  --kiln-light:  #D8B98F;   /* warm highlight for text on dark surfaces */
  --ember:       #371305;   /* Kiln Ember - headings, strong text, footer, overlays */
  --pottery:     #C5AD8E;   /* Worn Pottery - primary page + section background */
  --pottery-alt: #CDB99B;   /* alternating sections (slightly lighter, airy) */
  --pottery-raised: #E3D5BE;/* cards / raised surfaces (clearly lighter) */
  --pottery-soft:#D8C8AC;   /* inputs, subtle surfaces */
  --pottery-line:#B39A76;   /* borders / dividers */
  --cream:       #F5ECDD;   /* light text / fills on dark or kiln surfaces */

  /* Text (darkened Kiln Ember at reduced opacity for body) */
  --text:        rgba(55, 19, 5, 0.88);
  --text-soft:   rgba(55, 19, 5, 0.78);

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 18px 44px -24px rgba(55, 19, 5, 0.50);
  --shadow-sm: 0 8px 22px -14px rgba(55, 19, 5, 0.42);

  --grad-warm: linear-gradient(135deg, var(--kiln) 0%, var(--ember) 100%);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Warm light design - opt out of browser auto/forced dark mode */
  color-scheme: light dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--pottery);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--kiln-deep); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--ember); }
:focus-visible { outline: 2px solid var(--kiln); outline-offset: 3px; border-radius: 2px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; color: var(--ember); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p { max-width: 65ch; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kiln-deep);
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--sand { background: var(--pottery-alt); }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--text-soft); max-width: 60ch; }
.center { text-align: center; margin-inline: auto; }
.stack > * + * { margin-top: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.8rem; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
/* Primary: Autumn Kiln bg, light text; hover deepens toward ember */
.btn--primary { background: var(--kiln); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--ember); color: var(--cream); }
/* Contact CTA - moss green. Reserved for WhatsApp / "commission" / "get in touch" actions. */
.btn--contact { background: #3f633b; background: oklch(0.46 0.075 142); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn--contact:hover { background: #203e1d; background: oklch(0.33 0.065 142); color: var(--cream); }
/* Secondary: Worn Pottery surface, Kiln Ember border + text; hover fills ember */
.btn--ghost { background: transparent; border-color: var(--ember); color: var(--ember); }
.btn--ghost:hover { background: var(--ember); color: var(--cream); }
/* Light: for use on dark/photographic surfaces */
.btn--light { border-color: rgba(245,236,221,0.7); color: var(--cream); }
.btn--light:hover { background: var(--cream); color: var(--ember); }
.btn svg { width: 1.15em; height: 1.15em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: var(--pottery);
  box-shadow: 0 1px 0 var(--pottery-line), 0 10px 30px -24px rgba(55,19,5,0.6);
  padding-block: 0.65rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-size: 1.3rem; color: var(--ember); letter-spacing: 0.01em; }
/* Fluid logo: floors at 34px (unchanged on mobile/tablet), grows to 48px on wide screens.
   3.2vw hits the 34px floor at ~1060px and the 48px ceiling at 1500px. */
.brand img, .brand__logo { height: clamp(34px, 3.2vw, 48px); width: auto; transition: height 0.35s var(--ease); }
/* Shrink slightly once the sticky bar condenses, so header height stays compact. */
.site-header.is-scrolled .brand img,
.site-header.is-scrolled .brand__logo { height: clamp(32px, 2.7vw, 40px); }
.brand__logo--light { display: none; }
.site-header.at-top .brand__logo--dark { display: none; }
.site-header.at-top .brand__logo--light { display: block; }
.brand span { font-weight: 500; }
.site-header.at-top .brand,
.site-header.at-top .nav-links a,
.site-header.at-top .nav-toggle { color: var(--cream); }
.site-header.at-top .brand { text-shadow: 0 1px 14px rgba(0,0,0,0.45); }

.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { font-family: var(--font-body); font-weight: 500; font-size: 0.98rem; color: var(--ember); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1.5px; background: var(--kiln); transition: width 0.3s var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.site-header.at-top .nav-links a::after { background: var(--kiln-light); }
.nav-links .btn { padding: 0.6rem 1.2rem; }
.site-header.at-top .nav-links .btn--primary { background: var(--kiln); color: var(--cream); border-color: var(--kiln); }
.nav-links .btn--primary, .nav-links .btn--contact { color: var(--cream) !important; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ember); cursor: pointer; padding: 0.4rem; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 340px); z-index: 101;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem; padding: 2rem 2.5rem;
    background: var(--pottery-raised); box-shadow: var(--shadow);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { color: var(--ember) !important; font-size: 1.3rem; font-family: var(--font-display); }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(55,19,5,0.5); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease); z-index: 99; }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--cream); }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(55,19,5,0.55) 0%, rgba(55,19,5,0.18) 38%, rgba(55,19,5,0.80) 100%); }
.hero__inner { padding-bottom: clamp(3rem, 8vh, 6rem); padding-top: 7rem; max-width: 60rem; }
.hero h1 { color: var(--cream); text-shadow: 0 2px 30px rgba(0,0,0,0.4); }
.hero .eyebrow { color: var(--kiln-light); }
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.4rem); color: rgba(245,236,221,0.92); max-width: 46ch; margin-top: 1.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero__scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); color: rgba(245,236,221,0.82); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hero__scroll svg { width: 20px; height: 20px; animation: bob 2s var(--ease) infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ---------- Section heading block ---------- */
.section-head { max-width: 52rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { display: block; margin-bottom: 1rem; }
.section-head.center { margin-inline: auto; }

/* ---------- Featured / intro split ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split--reverse .split__media { order: 2; } }
.split__media { position: relative; }
.split__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; }
.split__media--portrait img { aspect-ratio: 4/5; }
.split__media .tag { position: absolute; bottom: 1rem; left: 1rem; background: var(--cream); color: var(--ember); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.5rem 0.9rem; border-radius: 8px; box-shadow: var(--shadow-sm); }

/* ---------- Gallery (masonry via CSS columns) ---------- */
.gallery { columns: 3 280px; column-gap: 1.25rem; }
.gallery__item {
  break-inside: avoid; margin-bottom: 1.25rem; position: relative;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--pottery-raised); display: block; width: 100%; border: 0; padding: 0; text-align: left;
  box-shadow: var(--shadow-sm);
}
.gallery__item img { width: 100%; transition: transform 0.7s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(180deg, rgba(55,19,5,0) 45%, rgba(55,19,5,0.78) 100%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.gallery__item:hover .gallery__overlay, .gallery__item:focus-visible .gallery__overlay { opacity: 1; }
.gallery__title { color: var(--cream); font-family: var(--font-display); font-size: 1.2rem; }
.gallery__hint { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; opacity: 0; transform: scale(0.8); transition: all 0.4s var(--ease); }
.gallery__hint svg { width: 18px; height: 18px; color: var(--kiln); }
.gallery__item:hover .gallery__hint { opacity: 1; transform: scale(1); }

/* ---------- Lightbox ---------- */
/* (removed legacy .lightbox stub - lightbox is now created & styled by main.js) */
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { max-width: 1100px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lightbox__img { max-height: 80vh; width: auto; max-width: 100%; border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8); transform: scale(0.96); transition: transform 0.35s var(--ease); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__caption { color: var(--cream); font-family: var(--font-display); font-size: 1.4rem; }
.lightbox__count { color: rgba(245,236,221,0.6); font-size: 0.85rem; letter-spacing: 0.1em; }
.lightbox__btn { position: absolute; background: rgba(245,236,221,0.12); border: 1px solid rgba(245,236,221,0.28); color: var(--cream); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background 0.25s var(--ease); }
.lightbox__btn:hover { background: rgba(245,236,221,0.28); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__close { top: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem); }
.lightbox__prev { left: clamp(0.5rem,2vw,2rem); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(0.5rem,2vw,2rem); top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox__prev { left: 0.5rem; } .lightbox__next { right: 0.5rem; } .lightbox__btn { width: 44px; height: 44px; } }

/* ---------- Values / feature row ---------- */
.features { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature { background: var(--pottery-raised); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.feature__icon { width: 46px; height: 46px; color: var(--kiln); margin-bottom: 1rem; }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--text-soft); font-size: 1rem; }

/* ---------- Quote / band ---------- */
.band { background: var(--grad-warm); color: var(--cream); text-align: center; }
.band .quote { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.6rem); line-height: 1.3; max-width: 24ch; margin-inline: auto; color: var(--cream); }
.band .quote span { color: var(--kiln-light); }

/* ---------- About story ---------- */
.prose h2 { margin-top: 2.5rem; margin-bottom: 0.8rem; }
.prose p { margin-bottom: 1.2rem; color: var(--text); }
.prose .lead { margin-bottom: 1.8rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-card { background: var(--pottery-raised); border: 1px solid var(--pottery-line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm); }
.contact-card .btn { width: 100%; justify-content: center; }
.contact-list { list-style: none; display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; color: var(--text); }
.contact-list svg { width: 22px; height: 22px; color: var(--kiln); flex: none; }
.contact-list a { color: var(--ember); }
.contact-list a:hover { color: var(--kiln); }
.map-embed { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--pottery-alt); border: 1px solid var(--pottery-line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; cursor: pointer; background: var(--pottery-alt); color: var(--ember); }
.map-poster svg { width: 42px; height: 42px; color: var(--kiln); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ember); color: rgba(245,236,221,0.74); padding-block: clamp(3rem, 6vw, 4.5rem); }
.site-footer a { color: rgba(245,236,221,0.74); }
.site-footer a:hover { color: var(--kiln-light); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-family: var(--font-display); font-size: 1.5rem; color: var(--cream); }
.footer-logo { height: 42px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.92; }
.footer h4 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--kiln-light); margin-bottom: 1rem; font-weight: 600; }
.footer ul { list-style: none; display: grid; gap: 0.6rem; }
.socials { display: flex; gap: 0.8rem; margin-top: 1.2rem; }
.socials a { width: 42px; height: 42px; border: 1px solid rgba(245,236,221,0.24); border-radius: 50%; display: grid; place-items: center; transition: all 0.25s var(--ease); }
.socials a:hover { background: var(--kiln); border-color: var(--kiln); }
.socials svg { width: 20px; height: 20px; }
/* Dark icons on a light surface (e.g. the contact card) */
.socials--ink a { color: var(--ember); border-color: var(--pottery-line); }
.socials--ink a:hover { color: var(--cream); }
.footer-bottom { border-top: 1px solid rgba(245,236,221,0.14); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---------- Page intro (interior pages) ---------- */
.page-intro { padding-top: clamp(8rem, 16vh, 11rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); background: var(--pottery-alt); text-align: center; }
.page-intro .eyebrow { display: block; margin-bottom: 1rem; }
.page-intro p { margin-inline: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3rem; background: var(--kiln); color: var(--cream); padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 300; transition: top 0.25s var(--ease); }
.skip-link:focus { top: 1rem; color: var(--cream); }

/* ---------- Portfolio filter tabs ---------- */
.filter-tabs {
  display: flex; gap: 0.3rem; width: max-content; max-width: 100%;
  margin: 0 auto clamp(2rem, 4vw, 3rem); padding: 0.35rem;
  background: var(--pottery-raised); border: 1px solid var(--pottery-line);
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.filter-tab {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: var(--text-soft); padding: 0.6rem 1.4rem; border-radius: 999px;
  white-space: nowrap; transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.filter-tab:hover { color: var(--ember); }
.filter-tab.is-active { background: var(--kiln); color: var(--cream); }
@media (max-width: 440px) { .filter-tab { padding: 0.55rem 0.9rem; font-size: 0.85rem; } }

/* Card meta (type badge + title) shown on hover/focus over the gradient */
.gallery__meta { display: flex; flex-direction: column; gap: 0.3rem; }
.gallery__badge { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--kiln-light); }

/* Empty state (e.g. no custom work yet) */
.gallery-empty { text-align: center; max-width: 40ch; margin: 1rem auto 0; color: var(--text-soft); }
.gallery-empty a { color: var(--kiln-deep); text-decoration: underline; text-underline-offset: 3px; }
.gallery-empty a:hover { color: var(--ember); }

/* ---------- Item detail page ---------- */
.item-section { padding-top: clamp(6.5rem, 12vh, 9rem); }
.item-loading, .item-missing { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.item-missing .eyebrow { display: block; margin-bottom: 1rem; }
.item-missing .lead { margin: 1rem auto 2rem; }

.item__back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; font-size: 0.9rem; color: var(--kiln-deep);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.item__back:hover { color: var(--ember); }
.item__back svg { width: 18px; height: 18px; }

.item { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 900px) {
  .item { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .item__body { position: sticky; top: 90px; }
}
.item__body h1 { margin: 0.5rem 0 1.25rem; }
.item__body .eyebrow { display: block; }
.item__desc { color: var(--text); font-size: 1.08rem; }
.item__desc p + p { margin-top: 1.1rem; }
.item__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Image slider ---------- */
.slider {
  position: relative; aspect-ratio: 4 / 3; max-height: 78vh;
  background: var(--pottery-raised); border: 1px solid var(--pottery-line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.slider__track {
  display: flex; height: 100%; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; }
.slider__slide picture, .slider__slide img, .slider__slide video { display: block; width: 100%; height: 100%; }
.slider__slide img, .slider__slide video { object-fit: contain; }
.slider__slide video { background: #000; }
.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--cream);
  background: rgba(28,9,2,0.55); border: 1px solid rgba(245,236,221,0.35);
  transition: background 0.25s var(--ease);
}
.slider__btn:hover { background: rgba(28,9,2,0.8); }
.slider__btn svg { width: 22px; height: 22px; }
.slider__prev { left: 0.8rem; }
.slider__next { right: 0.8rem; }
.slider__dots {
  position: absolute; left: 0; right: 0; bottom: 0.9rem;
  display: flex; justify-content: center; gap: 0.5rem;
}
.slider__dot {
  width: 9px; height: 9px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 1px solid rgba(245,236,221,0.7); background: rgba(28,9,2,0.35);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.slider__dot.is-active { background: var(--cream); transform: scale(1.25); }
.slider--single { aspect-ratio: auto; }
.slider--single .slider__slide img { object-fit: cover; }
@media (max-width: 560px) { .slider__btn { width: 40px; height: 40px; } }

/* Zoom affordance on clickable slider images */
.slider__slide.is-zoomable { cursor: zoom-in; }

/* =====================================================================
   Lightbox
   ===================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 0.5rem; padding: clamp(0.75rem, 3vw, 2rem);
  background: var(--pottery-raised);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: lbFade 0.2s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
body.lb-open { overflow: hidden; }
.lightbox__stage {
  grid-column: 2; margin: 0; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__stage picture, .lightbox__stage img {
  display: block; max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.lightbox__nav, .lightbox__close {
  display: grid; place-items: center; cursor: pointer;
  border: none; border-radius: 50%; color: var(--cream);
  background: rgba(28, 9, 2, 0.55);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.lightbox__nav { width: 52px; height: 52px; }
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__prev { grid-column: 1; }
.lightbox__next { grid-column: 3; }
.lightbox__nav:hover, .lightbox__close:hover { background: rgba(28, 9, 2, 0.85); transform: scale(1.06); }
.lightbox__close {
  position: absolute; top: clamp(0.75rem, 3vw, 1.5rem); right: clamp(0.75rem, 3vw, 1.5rem);
  width: 46px; height: 46px; z-index: 2;
}
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(0.85rem, 3vw, 1.4rem) clamp(1rem, 4vw, 2.5rem);
  background: none;
  color: var(--cream); pointer-events: none;
}
.lightbox__bar > * { pointer-events: auto; }
.lightbox__title { font-family: var(--font-display); font-size: 1.05rem; }
.lightbox__count { color: var(--kiln-light); font-size: 0.85rem; letter-spacing: 0.08em; white-space: nowrap; }
.lightbox__link { color: var(--cream); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.lightbox__link:hover { color: var(--kiln-light); }
.lightbox__nav[hidden], .lightbox__count[hidden], .lightbox__link[hidden] { display: none; }
@media (max-width: 560px) {
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav svg { width: 20px; height: 20px; }
}

/* =====================================================================
   Scroll-to-top button
   ===================================================================== */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 900; width: 46px; height: 46px; display: grid; place-items: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--kiln); color: var(--cream); box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.25s var(--ease), visibility 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--kiln-deep); }
.to-top svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: opacity 0.2s, visibility 0.2s; } }

/* Guard against horizontal overflow from long, unbroken strings (e.g. email) */
.contact-list li { min-width: 0; }
.contact-list li > a, .contact-list li > span { min-width: 0; overflow-wrap: anywhere; }

/* Hero CTAs: on phones, stack full-width so they read as a tidy pair, and add
   extra bottom padding so the buttons clear the "Scroll" cue below them. */
@media (max-width: 640px) {
  .hero__cta { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__inner { padding-bottom: 6rem; }
  .hero__scroll { bottom: 1.4rem; }
}

/* ============================  DARK THEME  ============================
   The site is a warm LIGHT design. When the OS/browser is in dark mode we
   supply our own warm dark palette. Shipping a real dark theme also stops
   browsers (Chrome / Samsung Internet) from force-inverting the page into an
   unreadable murk - they use these styles instead. */
@media (prefers-color-scheme: dark) {
  :root {
    --pottery:        #3A2413;  /* page background - warm dark brown */
    --pottery-alt:    #47301D;  /* alternating sections (clearly lighter) */
    --pottery-raised: #523A26;  /* cards / raised surfaces */
    --pottery-soft:   #4A3320;  /* subtle surfaces */
    --pottery-line:   #74543A;  /* borders / dividers (visible) */

    --kiln-deep:      #E3C6A0;  /* links, eyebrows, accents → light on dark */
    --kiln-light:     #E8CDA6;

    --text:      rgba(245, 236, 221, 0.90);
    --text-soft: rgba(245, 236, 221, 0.72);

    --shadow:    0 18px 44px -24px rgba(0, 0, 0, 0.65);
    --shadow-sm: 0 8px 22px -14px rgba(0, 0, 0, 0.55);
  }

  /* Headings & header controls use near-black --ember in light mode; make them
     legible on dark surfaces. */
  h1, h2, h3, h4 { color: var(--cream); }
  .brand, .nav-toggle, .nav-links a { color: var(--cream); }
  a:hover,
  .filter-tab:hover,
  .item__back:hover,
  .gallery-empty a:hover { color: var(--cream); }
  .contact-list a,
  .socials--ink a { color: var(--kiln-light); }
  .socials--ink a { border-color: var(--pottery-line); }
  .map-poster { color: var(--cream); }
  .btn--ghost { border-color: var(--kiln-light); color: var(--kiln-light); }
  .btn--ghost:hover { background: var(--kiln); border-color: var(--kiln); color: var(--cream); }

  /* Mobile slide-out menu sits on a dark panel - force light links. */
  @media (max-width: 860px) { .nav-links a { color: var(--cream) !important; } }

  /* Keep the logo legible on dark header surfaces (both scroll states). */
  .brand__logo--dark  { display: none !important; }
  .brand__logo--light { display: block !important; }
  .brand img:only-child { filter: brightness(0) invert(1); opacity: 0.92; }
}
