/* ============================================================
   ALINA SZAPOCZNIKOW — Estate website wireframe
   Monospaced, minimalist, low-fi structural wireframe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg:        #faf9f7;   /* warm off-white, archival paper */
  --ink:       #1a1a1a;   /* near-black */
  --mut:       #8a8780;   /* muted grey text */
  --rule:      #d9d6cf;   /* hairline dividers */
  --ph:        #efece6;   /* placeholder fill */
  --ph-line:   #d2cec5;   /* placeholder hatch line */
  --ph-ink:    #9a958b;   /* placeholder label */
  --accent:    #4f5b8c;   /* wireframe annotation / interactive hint */
  --accent-bg: #eef0f6;
  --hover:     #3a3a3a;

  --maxw:      1100px;
  --measure:   66ch;
  --gap:       clamp(72px, 11vh, 150px);

  --fs-display: clamp(2.2rem, 5.5vw, 4.4rem);
  --fs-h2:      clamp(1.05rem, 2vw, 1.35rem);
  --fs-body:    0.95rem;
  --fs-meta:    0.78rem;

  --dens: 1;  /* density multiplier, driven by tweak */
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--hover); }

img { max-width: 100%; display: block; }

/* ---------- layout primitives ---------- */
.wrap   { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.section{ padding-block: calc(var(--gap) * var(--dens)); }
section[id], [id].section { scroll-margin-top: 64px; }
.measure{ max-width: var(--measure); }
.center { margin-inline: auto; }

/* ---------- section label ---------- */
.label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 clamp(28px, 4vw, 52px);
}
.label::before { content: "──"; color: var(--mut); letter-spacing: 0; }
.label::after  {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------- type ---------- */
.display {
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0;
}
.h2 { font-size: var(--fs-h2); font-weight: 500; line-height: 1.25; margin: 0; letter-spacing: 0.01em; }
.meta { font-size: var(--fs-meta); color: var(--mut); font-style: italic; line-height: 1.55; }
.body { font-size: var(--fs-body); line-height: 1.7; text-wrap: pretty; }
.dim  { color: var(--mut); }

/* ---------- image placeholder ---------- */
.ph {
  position: relative;
  background-color: var(--ph);
  border: 1px solid var(--ph-line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
/* corner crop marks to read as "image placeholder" */
.ph::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed var(--ph-line);
  pointer-events: none;
}
.ph > .ph-label {
  position: relative;
  background: var(--ph);
  color: var(--ph-ink);
  font-size: var(--fs-meta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  max-width: 82%;
  line-height: 1.4;
}
/* hatch variant (opt-in via tweak) */
body[data-ph="hatch"] .ph {
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 13px,
      var(--ph-line) 13px, var(--ph-line) 14px);
}
.cap { margin-top: 10px; }

/* ---------- annotation note ---------- */
.note {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  border: 1px dashed var(--accent);
  border-radius: 2px;
  padding: 2px 7px;
  display: inline-block;
  background: var(--accent-bg);
}
.arrow { color: var(--accent); }
.link-arrow {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
}
.link-arrow:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* annotations hidden via tweak */
body.no-notes .note { display: none !important; }

/* ---------- hairline rule ---------- */
.hr { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- hero gallery (static row, scroll horizontally) ---------- */
.hero-gallery {
  position: sticky;
  top: 53px;                 /* sits under the sticky nav */
  z-index: 20;
  height: 62vh;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: clamp(20px,3vh,40px);
  transition: height .38s cubic-bezier(.4,0,.2,1), padding-top .38s cubic-bezier(.4,0,.2,1);
}
.hero-gallery.shrunk { height: 15vh; min-height: 96px; padding-top: 0; }

.gallery-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: clamp(14px,2vw,28px);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 clamp(20px,5vw,64px) 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.gallery-row::-webkit-scrollbar { height: 8px; }
.gallery-row::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.gal-item {
  flex: 0 0 clamp(200px, 26vw, 320px);
  margin: 0;
  scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 10px;
  height: 100%;
  min-height: 0;
}
.gal-item .ph { flex: 1; min-height: 0; width: 100%; }
.gal-item figcaption { flex: 0 0 auto; font-style: italic; }
.gal-credit {
  flex: 0 0 auto;
  text-align: center; max-width: 70ch; margin: 0 auto;
  padding: 10px 24px 14px; font-style: italic;
}

/* collapsed strip: hide captions/credit, narrow the tiles */
.hero-gallery.shrunk .gal-item figcaption,
.hero-gallery.shrunk .gal-credit { display: none; }
.hero-gallery.shrunk .gallery-row { padding-bottom: 8px; }
.hero-gallery.shrunk .gal-item { flex-basis: clamp(150px, 20vw, 230px); }

.hero-text { padding-block: clamp(40px,7vh,90px) clamp(48px,8vh,100px); }

@media (max-width: 720px) {
  .hero-gallery { height: 52vh; }
  .gal-item { flex-basis: 64vw; }
  .hero-gallery.shrunk .gal-item { flex-basis: 40vw; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
}
.topbar .crumb { text-transform: uppercase; white-space: nowrap; }

/* ---------- top nav links ---------- */
.topnav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  position: relative;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--fs-meta);
  color: var(--mut);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.topnav a.sub { color: var(--accent); }
.topnav a.sub:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topnav .nav-sep { color: var(--rule); }

@media (max-width: 860px) {
  .topnav { justify-content: flex-start; }
  .topbar .crumb .crumb-full { display: none; }
}

/* ---------- lang toggle ---------- */
.lang { display: inline-flex; gap: 6px; letter-spacing: 0.05em; font-size: var(--fs-meta); }
.lang button {
  font: inherit; font-size: var(--fs-meta); background: none; border: 0; cursor: pointer;
  color: var(--mut); padding: 0; letter-spacing: 0.05em;
}
.lang button.on { color: var(--ink); font-weight: 600; }
.lang .sep { color: var(--rule); }

/* ---------- FAB + index panel ---------- */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  border: 0; cursor: pointer;
  font-family: inherit; font-size: 0.62rem; line-height: 1.1;
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  transition: transform .2s ease;
}
.fab:hover { transform: scale(1.06); }

.index-panel {
  position: fixed; right: 0; top: 0; bottom: 0; z-index: 70;
  width: min(340px, 86vw);
  background: color-mix(in srgb, var(--bg) 96%, #fff);
  border-left: 1px solid var(--rule);
  box-shadow: -8px 0 40px rgba(0,0,0,0.08);
  padding: 28px 26px;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: 20px;
  overflow-y: auto;
}
.index-panel.open { transform: translateX(0); }
.index-backdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(26,26,26,0.12);
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.index-backdrop.open { opacity: 1; pointer-events: auto; }
.index-panel .ip-title { font-size: var(--fs-meta); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.index-panel .ip-close { position: absolute; top: 22px; right: 22px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 1rem; color: var(--mut); }
.ip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ip-list a {
  display: flex; align-items: baseline; gap: 8px;
  font-size: var(--fs-meta); letter-spacing: 0.04em;
}
.ip-list a .dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translateY(-3px); }
.ip-list a .px { color: var(--mut); font-style: italic; }
.ip-list a.active { color: var(--ink); font-weight: 600; }
.ip-list a.active .num { text-decoration: underline; }
.ip-sub { display: flex; flex-direction: column; gap: 9px; }
.ip-sub a { font-size: var(--fs-meta); }

/* ---------- exhibition cards ---------- */
.exh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 48px); }
.exh-card { display: flex; flex-direction: column; gap: 12px; }
.exh-card .ph { aspect-ratio: 16 / 10; }
.exh-card .exh-title { font-size: 1rem; font-weight: 500; line-height: 1.3; }
.exh-card .exh-title.solo { font-weight: 600; }
.exh-card .exh-venue,
.exh-card .exh-dates { font-size: var(--fs-meta); color: var(--mut); font-style: italic; }

/* ---------- data tables (formation / collections / colophon) ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-body);
  align-items: baseline;
}
.row:first-child { border-top: 1px solid var(--rule); }
.row.c3 { grid-template-columns: 5.5rem 1fr auto; }
.row.coll { grid-template-columns: 1fr auto 3rem; }
.row .yr  { color: var(--mut); font-style: italic; }
.row .loc { color: var(--mut); font-style: italic; text-align: right; }
.row .cc  { color: var(--mut); font-style: italic; text-align: right; letter-spacing: 0.05em; }

/* ---------- quiet card / banner ---------- */
.card {
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 70%, #fff);
  padding: clamp(22px, 3vw, 34px);
}
.banner {
  border: 1px solid var(--rule);
  padding: clamp(24px, 3.5vw, 40px);
  display: flex; flex-direction: column; gap: 14px;
  align-items: flex-start;
}

/* ---------- catalogue schema list ---------- */
.schema-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.schema-list li::before { content: "── "; color: var(--mut); }
.schema-list li { font-size: var(--fs-body); }

/* ---------- catalog sample entry ---------- */
.cat-entry { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: start; }
.cat-entry .ph { aspect-ratio: 3 / 4; }
.cat-meta { display: flex; flex-direction: column; gap: 4px; }
.cat-meta .t  { font-style: italic; font-size: 1rem; }
.cat-meta .m  { font-size: var(--fs-meta); color: var(--mut); }
.cat-credit { margin-top: 14px; font-size: 0.7rem; color: var(--mut); line-height: 1.6; }

/* ---------- publication entry ---------- */
.pub-entry { display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: start; }
.pub-entry .ph { aspect-ratio: 22 / 28; }
.pub-meta { display: flex; flex-direction: column; gap: 6px; }
.pub-meta .t { font-size: 1.15rem; font-weight: 400; }
.pub-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 12px 0 0; font-size: var(--fs-meta); }
.pub-meta dt { color: var(--mut); font-style: italic; }
.pub-meta dd { margin: 0; }

/* ---------- footer ---------- */
.foot { padding-block: clamp(64px, 8vh, 110px) clamp(80px, 10vh, 140px); }
.foot-block { margin-bottom: 30px; }
.foot-block .ft-label { font-size: var(--fs-meta); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mut); margin-bottom: 10px; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .exh-grid { grid-template-columns: 1fr; }
  .cat-entry { grid-template-columns: 120px 1fr; gap: 18px; }
  .pub-entry { grid-template-columns: 110px 1fr; gap: 20px; }
  .row.c3 { grid-template-columns: 4rem 1fr; }
  .row.c3 .loc { grid-column: 2; text-align: left; }
  .row.coll { grid-template-columns: 1fr auto; }
  .row.coll .cc { display: none; }
}

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============ SUB-PAGE: chronologie ============ */
.subhead { padding-block: clamp(40px,6vw,72px) clamp(8px,2vw,20px); }
.subhead .display { font-size: clamp(1.5rem,3.4vw,2.4rem); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1; }

.year-nav {
  position: sticky; top: 53px; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-block: 1px solid var(--rule);
  margin-bottom: 0;
}
.year-nav .ynav-inner {
  display: flex; gap: 0; overflow-x: auto; padding: 12px clamp(20px,5vw,64px);
  scrollbar-width: thin;
}
.year-nav a {
  flex: 0 0 auto; font-size: var(--fs-meta); color: var(--mut);
  padding: 4px 10px; letter-spacing: 0.04em; white-space: nowrap;
  border-right: 1px solid var(--rule); cursor: pointer;
}
.year-nav a:first-child { padding-left: 0; }
.year-nav a:last-child { border-right: 0; }
.year-nav a.on { color: var(--ink); font-weight: 600; }
.year-nav .ynav-dim {
  flex: 0 0 auto; font-size: var(--fs-meta); color: var(--accent);
  padding: 4px 10px; letter-spacing: 0.04em; white-space: nowrap;
  border-right: 1px solid var(--rule); opacity: 0.5;
}

.year-section { padding-block: clamp(36px,5vw,64px); scroll-margin-top: 120px; }
.year-head {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(1.4rem,3vw,2rem); font-weight: 300; letter-spacing: 0.04em;
  margin: 0 0 clamp(22px,3vw,36px);
}
.year-head::before { content: "──"; color: var(--mut); font-size: 1rem; }
.year-head .y-sub { font-size: var(--fs-meta); color: var(--mut); font-style: italic; letter-spacing: 0; }

.img-1 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.img-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.img-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.img-row { margin-bottom: clamp(22px,3vw,34px); }
.img-row .ph { aspect-ratio: 4/3; }
.img-wide .ph { aspect-ratio: 16/8; }

/* ---------- chronologie horizontal slider ---------- */
.chrono-track-wrap { position: relative; }
.chrono-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  height: clamp(440px, 64vh, 760px);
  scrollbar-width: none;
}
.chrono-track::-webkit-scrollbar { display: none; }
.chrono-track .year-section {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scroll-snap-align: start;
  padding-block: clamp(30px,5vh,56px) clamp(40px,7vh,72px);
  padding-inline: max(clamp(20px,5vw,40px), calc((100% - 940px) / 2));
  scroll-margin-top: 0;
}
.chrono-track .year-section::-webkit-scrollbar { width: 8px; }
.chrono-track .year-section::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }

.chrono-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 8;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--rule); border-radius: 50%;
  font-family: inherit; font-size: 1.3rem; line-height: 1; color: var(--ink);
  cursor: pointer;
  transition: background .2s, transform .2s, opacity .2s;
}
.chrono-arrow:hover { background: var(--bg); transform: translateY(-50%) scale(1.08); }
.chrono-arrow.prev { left: clamp(8px,1.5vw,20px); }
.chrono-arrow.next { right: clamp(8px,1.5vw,20px); }
.chrono-arrow[disabled] { opacity: 0.25; pointer-events: none; }

/* progress hint under the nav */
.chrono-progress {
  height: 2px; background: var(--rule); position: relative; overflow: hidden;
}
.chrono-progress span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  transform-origin: left;
}

@media (max-width: 720px) {
  .chrono-track { height: 72vh; }
  .chrono-arrow { width: 36px; height: 36px; font-size: 1.1rem; }
}

.bquote {
  border-left: 2px solid var(--ink);
  margin: clamp(24px,3.5vw,40px) 0;
  padding: 4px 0 4px 24px;
  max-width: 60ch;
  margin-left: clamp(0px, 4vw, 56px);
}
.bquote p { font-style: italic; font-size: 1.02rem; line-height: 1.6; margin: 0; }
.bquote cite { display: block; margin-top: 12px; font-size: var(--fs-meta); color: var(--mut); font-style: italic; }

.exh-list { margin-top: clamp(22px,3vw,32px); }
.exh-list .el-label { font-size: var(--fs-meta); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mut); margin-bottom: 10px; }
.exh-list .el-item { font-size: var(--fs-meta); padding: 6px 0; border-top: 1px solid var(--rule); }
.exh-list .el-item .em-type { color: var(--accent); font-style: normal; }

@media (max-width: 720px) {
  .img-2, .img-3 { grid-template-columns: 1fr; }
  .bquote { margin-left: 0; }
}

/* ============ SUB-PAGE: actualites ============ */
.filter-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: clamp(36px,5vw,60px); }
.filter-row button {
  font: inherit; font-size: var(--fs-meta); background: none; border: 0; cursor: pointer;
  color: var(--mut); padding: 0 0 4px; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
.filter-row button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.exh-card.hide { display: none; }
.time-group { margin-bottom: clamp(48px,7vw,90px); }
.past-list .row { grid-template-columns: 1fr auto; }
.past-list .row.solo span:first-child { font-weight: 600; }
