/* ————————————————————————————————————————————————————————————
   Echo Arts Exhibitions — site stylesheet
   Contemporary gallery: white-forward, artwork-centric, playful.
   Sister practice to Echo Arts Advisory.
   ———————————————————————————————————————————————————————————— */

:root {
  /* — Base palette: gallery white + ink black — */
  --bg:          oklch(98.8% 0.003 80);   /* paper white */
  --bg-soft:     oklch(96.5% 0.005 80);   /* lifted card */
  --bg-deeper:   oklch(92% 0.006 75);
  --bg-deep:     oklch(13% 0.005 60);     /* near black */
  --bg-paper:    oklch(94% 0.008 75);     /* warm cream — text on dark */
  --ink:         oklch(16% 0.006 60);
  --ink-soft:    oklch(36% 0.008 60);
  --ink-mute:    oklch(58% 0.008 60);
  --rule:        oklch(88% 0.006 75);

  /* — Per-exhibition accent (overridable via [data-show]) — */
  --accent:      oklch(52% 0.16 38);   /* Marlatt: clay terracotta */
  --accent-deep: oklch(36% 0.14 38);
  --accent-soft: oklch(92% 0.04 38);
  --accent-ink:  #fff;                 /* readable on accent */

  --maxw: 1560px;
  --gutter: clamp(20px, 4vw, 56px);

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
}

/* — Per-show accent themes — */
[data-show="marlatt"] {
  --accent:      oklch(54% 0.17 36);   /* clay/terracotta — pulled from her papier-mâché */
  --accent-deep: oklch(36% 0.14 36);
  --accent-soft: oklch(94% 0.035 36);
}
[data-show="moss"] {
  --accent:      oklch(48% 0.10 145);  /* moss green */
  --accent-deep: oklch(32% 0.09 145);
  --accent-soft: oklch(94% 0.03 145);
}
[data-show="dusk"] {
  --accent:      oklch(46% 0.14 280);  /* dusk violet */
  --accent-deep: oklch(30% 0.12 280);
  --accent-soft: oklch(94% 0.03 280);
}
[data-show="ember"] {
  --accent:      oklch(58% 0.18 55);   /* ember orange */
  --accent-deep: oklch(38% 0.16 55);
  --accent-soft: oklch(95% 0.04 55);
}

.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;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ————————————— Typography ————————————— */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.eyebrow .line {
  display: inline-block;
  width: 36px; height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  line-height: 1.5;
}

/* ————————————— Nav ————————————— */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1;
  white-space: nowrap;
}
.nav-brand .mark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.nav-brand .divider {
  width: 1px;
  height: 13px;
  background: currentColor;
  opacity: 0.35;
  align-self: center;
}
.nav-brand .voice {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0;
  opacity: 0.92;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-self: center;
}
.nav-links a {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 6px 0;
  font-family: var(--sans);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(.2,.6,.2,1);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.nav-side {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.nav-side .sister {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.nav-side .sister:hover { color: var(--accent); }
.nav-side .sister .arrow { font-size: 11px; }
.nav-side .visit {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid currentColor;
  transition: background 0.3s, color 0.3s;
}
.nav-side .visit:hover { background: var(--ink); color: var(--bg); }

/* ————————————— Buttons ————————————— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  transition: all 0.3s cubic-bezier(.2,.6,.2,1);
  cursor: pointer;
}
.btn .arrow { transition: transform 0.3s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover .arrow { transform: translateX(5px); }
.btn.accent { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.accent:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.outline-accent { color: var(--ink); border-color: var(--ink); }
.btn.outline-accent:hover { background: var(--ink); color: var(--bg); }

/* ————————————— Reveal ————————————— */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s cubic-bezier(.2,.6,.2,1), transform 1.1s cubic-bezier(.2,.6,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
body { animation: pageIn 0.7s ease both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* ————————————— Footer ————————————— */
.footer {
  background: var(--bg-deep);
  color: oklch(85% 0.006 70);
  padding: 100px var(--gutter) 36px;
  margin-top: 100px;
}
.footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer .foot-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  color: rgba(255,255,255,0.42);
  margin-bottom: 22px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer .foot-lede {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.018em;
  font-weight: 300;
  max-width: 16ch;
}
.footer .foot-lede em { color: var(--accent); font-style: italic; font-weight: 300; }
.footer .foot-bot {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 12px;
}
.footer .sister-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0;
  text-transform: none;
}
.footer .sister-line a { color: rgba(255,255,255,0.85); border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 1px; }
.footer .sister-line a:hover { color: #fff; border-bottom-color: #fff; }

@media (max-width: 900px) {
  .footer .foot-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer .foot-lede { grid-column: span 2; }
}

/* ————————————— Marquee (current dates) ————————————— */
.marquee {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--bg);
  padding: 14px 0;
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: inline-flex;
  gap: 56px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  letter-spacing: -0.01em;
  font-weight: 400;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 56px; }
.marquee-track .star {
  font-family: var(--sans);
  color: var(--accent);
  font-size: 1.1em;
  font-style: normal;
}
.marquee-track em { font-style: italic; color: var(--accent); font-weight: 300; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ————————————— Tweaks panel ————————————— */
.tweaks {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 0 10px 40px rgba(0,0,0,0.10);
  padding: 18px;
  font-family: var(--sans);
  font-size: 13px;
  display: none;
}
body.tweaks-on .tweaks { display: block; }
body.tweaks-on .tweaks.collapsed { padding: 10px 14px; }
body.tweaks-on .tweaks.collapsed > *:not(.tweaks-header) { display: none; }
.tweaks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.tweaks.collapsed .tweaks-header { border: 0; padding: 0; margin: 0; }
.tweaks-header .ttl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.tweaks-header button.collapse {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
}
.t-group { margin-bottom: 14px; }
.t-group:last-child { margin: 0; }
.t-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.t-options { display: flex; gap: 6px; flex-wrap: wrap; }
.t-options button {
  flex: 1;
  padding: 8px 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  transition: all 0.2s;
}
.t-options button:hover { border-color: var(--ink); }
.t-options button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ————————————— Lightbox ————————————— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(248, 246, 240, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.18);
}
.lightbox .lb-caption {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  max-width: 70ch;
  text-transform: uppercase;
}
.lightbox .lb-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}
.lightbox .lb-close:hover { background: var(--ink); color: var(--bg); }

/* — Mobile navigation — */
.nav-toggle { display: none; }
.nav-menu { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-side { display: none; }
  .nav { grid-template-columns: 1fr auto; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
  }
  .nav-toggle span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: var(--ink);
    transition: opacity 0.2s;
  }
  .nav-toggle:hover span { opacity: 0.5; }

  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: color-mix(in oklab, var(--bg) 94%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .nav-menu.open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu-close {
    position: absolute;
    top: 20px;
    right: var(--gutter);
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
  }
  .nav-menu-close:hover { background: var(--ink); color: var(--bg); }
  .nav-menu-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
  .nav-menu-items a {
    font-family: var(--mono);
    font-size: 16px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink);
    transition: color 0.2s;
  }
  .nav-menu-items a:hover { color: var(--accent); }
  .nav-menu-items a.active { color: var(--accent); }
  .nav-menu-items a.secondary {
    font-size: 12px;
    color: var(--ink-mute);
    margin-top: 12px;
  }
  .nav-menu-items a.secondary:hover { color: var(--accent); }
}

/* — Site footer (Visit band, mounted from shared.js) — */
.site-footer {
  background: var(--bg-deep);
  color: var(--bg-paper);
  padding: clamp(100px, 14vh, 140px) var(--gutter) clamp(60px, 8vh, 80px);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
@media (max-width: 900px) { .site-footer .inner { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.site-footer h2 em { font-style: italic; color: var(--accent); }
.site-footer .blurb {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
  line-height: 1.4;
  color: oklch(80% 0.005 60);
  margin-top: 32px;
  max-width: 50ch;
}
.visit-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}
.visit-info .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: oklch(70% 0.005 60);
  margin-bottom: 8px;
}
.visit-info .v {
  font-family: var(--display);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.4;
}
.visit-info .v a { color: inherit; border-bottom: 1px solid oklch(40% 0.005 60); transition: border-color 0.3s, color 0.3s; }
.visit-info .v a:hover { color: var(--accent); border-color: var(--accent); }
.visit-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.visit-actions a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--bg-paper);
  border-radius: 100px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.visit-actions a:hover { background: var(--accent); border-color: var(--accent); color: var(--bg-paper); }
.visit-actions a.solid { background: var(--accent); border-color: var(--accent); }
.visit-actions a.solid:hover { background: var(--bg-paper); color: var(--bg-deep); border-color: var(--bg-paper); }

.visit-foot {
  max-width: var(--maxw);
  margin: clamp(80px, 12vh, 120px) auto 0;
  padding-top: 30px;
  border-top: 1px solid oklch(30% 0.005 60);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(70% 0.005 60);
}
.visit-foot a { color: oklch(85% 0.005 60); }
.visit-foot a:hover { color: var(--accent); }
.visit-foot .sister {
  color: oklch(85% 0.005 60);
  border: 1px solid oklch(40% 0.005 60);
  padding: 10px 16px;
  border-radius: 100px;
  transition: all 0.3s;
}
.visit-foot .sister:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

@media (max-width: 700px) {
  .visit-foot { grid-template-columns: 1fr; gap: 16px; }
}
