/* Esterio Segura — site stylesheet
   Restrained gallery palette: warm cream, near-black ink, bronze/oxide accent. */

:root {
  --cream: #f6f3ee;
  --cream-deep: #efe9df;
  --ink: #1b1815;
  --ink-soft: #4a453e;
  --line: #ddd5c7;
  --bronze: #9c5b34;
  --bronze-deep: #7c4527;
  --white: #ffffff;
  --max: 1180px;
  --gap: clamp(1rem, 2vw, 2rem);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 460; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1.1em; color: var(--ink-soft); }
a { color: var(--bronze-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bronze-deep);
  margin: 0 0 0.6em;
  display: block;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}
.brand-logo-link { display: inline-flex; align-items: center; }
.brand-logo-link:hover { text-decoration: none; }
/* Sized inline per Site Settings' Logo box width/height — this just
   centers whatever's inside (real logo or placeholder) within that box. */
.brand-logo { display: inline-flex; align-items: center; justify-content: center; }
.brand-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.brand-logo-placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--cream-deep);
  color: var(--ink-soft);
  font-family: "Fraunces", serif;
  font-size: 0.85rem;
  font-style: italic;
}

nav.main-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
nav.main-nav a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active {
  color: var(--bronze-deep);
  text-decoration: none;
  border-bottom-color: var(--bronze);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  nav.main-nav.open { max-height: 420px; }
  nav.main-nav a { width: 100%; padding: 0.85rem clamp(1.1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
  .site-header { position: sticky; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,17,14,0.05) 0%, rgba(15,12,10,0.78) 92%);
}
.hero .wrap { position: relative; z-index: 1; padding-top: 3rem; padding-bottom: clamp(2.2rem, 6vw, 4rem); }
.hero h1 { color: var(--white); margin-left: -200px; }
.hero .eyebrow { color: #e8b58a; }
.hero p.lede { color: rgba(255,255,255,0.9); max-width: 42em; font-size: clamp(1rem, 1.6vw, 1.2rem); margin-left: -200px; }
.hero .cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.2rem; margin-left: -200px; }
@media (max-width: 720px) {
  .hero h1, .hero p.lede, .hero .cta-row { margin-left: 0; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--bronze); color: var(--white); }
.btn-primary:hover { background: var(--bronze-deep); }
.btn-outline { border-color: rgba(255,255,255,0.7); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-ink { border-color: var(--ink); color: var(--ink); }
.btn-outline-ink:hover { background: var(--ink); color: var(--white); }

/* ---- Sections ---- */
section { padding: clamp(2.6rem, 6vw, 5rem) 0; }
section.tight { padding: clamp(1.6rem, 4vw, 3rem) 0; }
section.alt { background: var(--cream-deep); }
.section-head { max-width: 46em; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }

/* ---- Card grids ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-deep); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card .body { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { margin-bottom: 0.25em; }
.card .meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.6em; }
.card p { font-size: 0.94rem; margin-bottom: 0.4em; }

/* Caption line under a picture (title of the piece/work it belongs to).
   Standalone default; .card overrides align it with the card's own padding. */
.img-caption { font-size: 0.8rem; color: var(--ink-soft); font-style: italic; margin: 0.5rem 0 0; }
.card .img-caption { padding: 0.6rem 1.2rem 0; margin: 0; }
.card-link-wrap { text-decoration: none; color: inherit; display: block; }
.card-link-wrap:hover { text-decoration: none; }

/* ---- Piece page ---- */
.piece-top { padding-top: clamp(1.6rem, 4vw, 2.6rem); padding-bottom: 0.4rem; }
.piece-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem 1.6rem;
  margin: 1.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.piece-meta-grid .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); display: block; margin-bottom: 0.15em; }
.piece-meta-grid .v { font-size: 0.98rem; color: var(--ink); }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.6rem 0;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.6rem;
  color: rgba(255,255,255,0.92);
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(15,12,10,0.35) 0%, rgba(12,10,8,0.68) 100%);
}
.video-placeholder .icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.video-placeholder small { color: rgba(255,255,255,0.6); font-size: 0.8rem; max-width: 30em; }

.video-frame-clickable { cursor: pointer; }
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15,12,10,0.15) 0%, rgba(12,10,8,0.5) 100%);
}
.video-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bronze);
  color: var(--white);
  border: none;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
}
.video-frame-clickable:hover .video-play-btn,
.video-play-btn:hover,
.video-play-btn:focus-visible { background: var(--bronze-deep); }
.video-play-btn .play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  font-size: 0.75rem;
}
.video-play-btn:disabled {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  cursor: default;
}
.video-play-btn:disabled .play-icon { border-color: rgba(255,255,255,0.55); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  margin: 1.4rem 0;
}
.gallery-grid figure { margin: 0; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; cursor: zoom-in; }
.gallery-grid figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.4em; }

/* Lightbox: click any gallery image to view it full-size/full-screen. */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,8,6,0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius);
  touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  cursor: zoom-in; transform-origin: center center; will-change: transform;
}
/* Zoomed state: the cursor becomes a grab handle and the image is draggable.
   Set on the container so the nav arrows can dim out of the way too. */
.lightbox.zoomed img { cursor: grab; }
.lightbox.zoomed img:active { cursor: grabbing; }
.lightbox.zoomed .lightbox-vnav,
.lightbox.zoomed .lightbox-caption,
.lightbox.zoomed .lightbox-head { opacity: .22; transition: opacity .2s ease; }
.lightbox.zoomed .lightbox-vnav:hover { opacity: 1; }
/* Discoverability: a short-lived nudge the first time the viewer opens an
   image, since a zoom gesture is invisible until someone tries it. */
.lightbox-hint {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(3.2rem + env(safe-area-inset-bottom, 0px));
  margin: 0; padding: 0.35rem 0.85rem; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: rgba(255,255,255,0.92);
  font-size: 0.78rem; letter-spacing: 0.01em;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.lightbox-hint.show { opacity: 1; }
.lightbox.zoomed .lightbox-hint { opacity: 0; }
.lightbox-close, .lightbox-vnav button {
  position: absolute;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close {
  top: calc(clamp(0.8rem, 3vw, 1.6rem) + env(safe-area-inset-top, 0px));
  right: calc(clamp(0.8rem, 3vw, 1.6rem) + env(safe-area-inset-right, 0px));
}
.lightbox-close:hover, .lightbox-vnav button:hover { background: rgba(255,255,255,0.22); }

/* Step to the next/previous image, in page order — crossing from one
   series' last image into the next series' first is just another step,
   which is what updates the title above. Stacked bottom-right; swipe is
   the primary way to use this, these buttons are the fallback for
   mouse/keyboard and a visible cue that there's more to see. */
.lightbox-vnav {
  position: absolute;
  right: calc(clamp(0.8rem, 3vw, 1.6rem) + env(safe-area-inset-right, 0px));
  bottom: calc(clamp(3.6rem, 12vw, 5rem) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 0.5rem;
}
.lightbox-vnav button { position: static; width: 2.2rem; height: 2.2rem; font-size: 1.15rem; }

.lightbox-caption {
  position: absolute; left: 0; right: 0;
  bottom: calc(clamp(0.8rem, 3vw, 1.6rem) + env(safe-area-inset-bottom, 0px));
  text-align: center; color: rgba(255,255,255,0.85); font-size: 0.88rem; padding: 0 3rem;
}
.lightbox-head {
  position: absolute; left: 0; right: 0;
  top: calc(clamp(0.8rem, 3vw, 1.6rem) + env(safe-area-inset-top, 0px));
  text-align: center; padding: 0 3.4rem; pointer-events: none;
}
/* Each is its own pill, sized to its text and centered — width:fit-content
   (rather than inline-block) so they still stack title-then-counter on
   separate lines instead of running together side by side. */
.lightbox-title, .lightbox-counter {
  width: fit-content; margin: 0 auto;
  background: rgba(0,0,0,0.4); border-radius: 999px;
}
.lightbox-title {
  color: #fff; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.3rem 0.9rem;
}
.lightbox-counter { margin-top: 0.35rem; color: rgba(255,255,255,0.85); font-size: 0.75rem; padding: 0.15rem 0.7rem; }

/* Full width site-wide (was capped at 44em) — same text wraps into
   fewer/shorter lines, so following content (galleries, credits, etc.)
   sits higher on the page. */
.statement { max-width: none; }
.tbd { color: var(--bronze-deep); font-style: italic; }

/* ---- Press list ---- */
.press-list { border-top: 1px solid var(--line); }
.press-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.press-row .yr { font-family: "Fraunces", serif; color: var(--bronze-deep); font-size: 1rem; }
.press-row .cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 0.15em; display: block; }
@media (max-width: 560px) {
  .press-row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---- About ---- */
.about-layout { display: grid; grid-template-columns: 280px 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
@media (max-width: 560px) { .about-layout { grid-template-columns: 1fr; } }
.portrait-frame { aspect-ratio: 3/4; background: var(--cream-deep); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder { color: var(--ink-soft); text-align: center; padding: 1.5rem; font-size: 0.85rem; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line); font-size: 0.94rem; color: var(--ink-soft); }

/* ---- Contact ---- */
form.contact-form { max-width: 34em; }
form.contact-form label { display: block; font-size: 0.85rem; font-weight: 600; margin: 1rem 0 0.35rem; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
}
form.contact-form textarea { min-height: 140px; resize: vertical; }
form.contact-form button { margin-top: 1.3rem; }

.contact-direct { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* ---- Footer ---- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
  background: var(--cream-deep);
}
footer.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
footer.site-footer p { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }
footer.site-footer .foot-links { display: flex; gap: 1.2rem; font-size: 0.85rem; }

/* ---- Home featured strip ---- */
.home-cta {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
}

.qr-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-top: 1.8rem;
}
.qr-note .icon { font-size: 1.4rem; line-height: 1; }
.qr-note p { margin: 0; font-size: 0.9rem; }
