/* =============================================================
   ART & INVESTMENTS — Editorial / Museum-White Design System
   Role-based tokens. Mobile-first. WCAG AA.
   ============================================================= */

:root {
  /* ---- Color (warm museum white, ink, single claret accent) ---- */
  --paper:        #FBFAF7;   /* page background — warm museum white */
  --surface:      #FFFFFF;   /* cards / raised panels */
  --surface-sunk: #F3F1EB;   /* recessed wells, table zebra */

  --ink:          #16130F;   /* primary text — warm near-black */
  --ink-soft:     #4A453E;   /* secondary text */
  --ink-muted:    #837C70;   /* captions, metadata (AA on paper) */

  --hairline:     rgba(22,19,15,0.12);
  --hairline-strong: rgba(22,19,15,0.24);

  --accent:       #7A2E2A;   /* claret — auction-house red, used sparingly */
  --accent-soft:  #A14A40;
  --accent-wash:  rgba(122,46,42,0.06);

  --gold:         #8A6D3B;   /* antique brass — micro-accents only */

  --positive:     #2F6B4F;   /* value up */
  --negative:     #9A3B30;   /* value down */

  /* ---- Typography ---- */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text:    "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.78rem, 0.76rem + 0.10vw, 0.84rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.27rem, 1.18rem + 0.45vw, 1.62rem);
  --step-2:  clamp(1.60rem, 1.42rem + 0.90vw, 2.40rem);
  --step-3:  clamp(2.02rem, 1.68rem + 1.70vw, 3.60rem);
  --step-4:  clamp(2.55rem, 1.90rem + 3.20vw, 5.40rem);
  --step-5:  clamp(3.20rem, 2.00rem + 6.00vw, 7.50rem);

  /* ---- Space (4 / 8 rhythm) ---- */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-8: 3rem;    --sp-10: 4.5rem;
  --sp-12: 6rem;   --sp-16: 9rem;

  /* ---- Structure ---- */
  --measure: 68ch;
  --wrap:    1200px;
  --wrap-wide: 1480px;
  --radius:  3px;          /* editorial = barely-there radius */
  --radius-lg: 6px;

  --shadow-1: 0 1px 2px rgba(22,19,15,0.04), 0 2px 8px rgba(22,19,15,0.05);
  --shadow-2: 0 8px 24px rgba(22,19,15,0.08), 0 2px 6px rgba(22,19,15,0.05);

  --ease: cubic-bezier(0.23, 1, 0.32, 1);   /* strong easeOut (Kowalski) */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur:  200ms;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "liga" 1, "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- Type primitives ---- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 380; line-height: 1.08; letter-spacing: -0.012em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: var(--measure); }
.meta { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.02em; color: var(--ink-muted); }
.serif-italic { font-style: italic; }

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, var(--wrap-wide)); margin-inline: auto; }
.section { padding-block: var(--sp-12); }
.section--tight { padding-block: var(--sp-8); }
.rule { height: 1px; background: var(--hairline); border: 0; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header.is-stuck { border-color: var(--hairline); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: var(--sp-4); }
.brand { font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 0.55ch; }
.brand .amp { color: var(--accent); font-style: italic; }
.nav-links { display: flex; gap: var(--sp-6); align-items: center; font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.04em; }
.nav-links a { color: var(--ink-soft); white-space: nowrap; position: relative; padding-block: 2px; }
.nav-links a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:1px; background: var(--ink); transition: right var(--dur) var(--ease); }
.nav-links a:hover::after { right: 0; }

/* ---- Buttons ---- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  font-family: var(--font-ui); font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.04em; line-height: 1;
  display: inline-flex; align-items: center; gap: 0.6ch;
  padding: 0.85em 1.4em; min-height: 44px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bg); border-radius: var(--radius); cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: scale(0.97); transition-duration: 120ms; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
  .btn:active { transform: scale(0.97); }
}
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--hairline-strong); }
.btn--ghost:hover { --bg: var(--ink); --fg: var(--paper); }
.btn--accent { --bg: var(--accent); --fg: #fff; }
.lock-ico { width: 0.95em; height: 0.95em; }

/* ---- Hero ---- */
.hero { padding-top: var(--sp-12); padding-bottom: var(--sp-10); position: relative; }
.hero__eyebrow { margin-bottom: var(--sp-5); }
.hero__title { font-size: var(--step-5); max-width: 16ch; }
.hero__title em { font-style: italic; color: var(--accent); }
.hero__lede { margin-top: var(--sp-6); }
.hero__actions { margin-top: var(--sp-8); display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.hero__figure { margin-top: var(--sp-10); position: relative; aspect-ratio: 16/9; background: var(--surface-sunk); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }
.hero__figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .hero__figure:hover img { transform: scale(1.025); } }
.figcap { font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--sp-3); display: flex; gap: 1ch; }
.figcap b { color: var(--ink-soft); font-weight: 500; }

/* ---- Stat strip ---- */
.stats { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); border-top: 1px solid var(--hairline); padding-top: var(--sp-8); }
.stat__num { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.stat__num .unit { font-size: 0.5em; color: var(--ink-muted); }
.stat__label { margin-top: var(--sp-2); }

/* ---- Artist grid (editorial catalogue) ---- */
.artists { display: grid; grid-template-columns: 1fr; gap: var(--sp-8); align-items: start; }
.artist {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding-bottom: var(--sp-8); border-bottom: 1px solid var(--hairline);
}
.artist__media { aspect-ratio: 4/5; background: var(--surface-sunk); border-radius: var(--radius); overflow: hidden; position: relative; }
.artist__media img { width:100%; height:100%; object-fit: cover; transition: transform 600ms var(--ease); }
.artist__monogram .mono { transition: transform 400ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .artist:hover .artist__monogram .mono { transform: scale(1.08); }
  .artist:hover .artist__monogram::after { opacity: 1; }
}
.artist__no { font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-muted); letter-spacing: 0.1em; }
.artist__name { font-size: var(--step-2); }
.artist__name .dates { font-size: 0.5em; color: var(--ink-muted); font-style: italic; }
.artist__bio { color: var(--ink-soft); max-width: var(--measure); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.04em; color: var(--ink-soft); border: 1px solid var(--hairline); border-radius: 999px; padding: 0.3em 0.9em; }
.trend { font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; display: inline-flex; align-items: center; gap: 0.4ch; }
.trend--up { color: var(--positive); }
.trend--down { color: var(--negative); }

/* ---- Filter chips ---- */
.filter-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-8); }
.filter-chip { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.03em;
  padding: 0.45em 1em; min-height: 38px; background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--hairline-strong); border-radius: 999px; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.filter-chip:hover { border-color: var(--ink); }
.filter-chip:active { transform: scale(0.96); transition-duration: 110ms; }
.filter-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-chip .c { opacity: 0.6; font-variant-numeric: tabular-nums; }

/* ---- Tier badge + market line on artist cards ---- */
.badge-tier { display:inline-block; font-family: var(--font-ui); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25em 0.7em; border-radius: 999px;
  border: 1px solid var(--hairline-strong); color: var(--ink-soft); }
.badge-tier.t-blue-chip { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.badge-tier.t-etabliert { border-color: var(--gold); color: var(--gold); }
.badge-tier.t-after { border-color: var(--accent); color: var(--accent); }
.artist__head { display:flex; align-items:center; justify-content:space-between; gap: var(--sp-3); }
.artist__market { font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-soft);
  border-top: 1px solid var(--hairline); padding-top: var(--sp-3); margin-top: var(--sp-1); }
.artist__market b { color: var(--ink); font-weight: 600; }
.artist__market a { color: var(--accent); border-bottom: 1px solid transparent; }
.artist__market a:hover { border-color: var(--accent); }
.artist__market .none { color: var(--ink-muted); font-style: italic; }
.artist__works { font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-muted); }
/* compact typographic monogram (honest placeholder — no fake artist portraits) */
.artist__monogram { aspect-ratio: auto; height: 168px; display: grid; place-items: center;
  background: var(--surface-sunk); position: relative; overflow: hidden; }
.artist__monogram::after { content:""; position:absolute; inset:0;
  background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--tone) 8%, transparent), transparent 60%); }
.artist__monogram .mono { font-family: var(--font-display); font-size: var(--step-3); line-height: 1;
  color: var(--tone); opacity: 0.92; letter-spacing: 0.02em; z-index: 1; }
.artist__monogram .mono-med { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-muted); z-index: 1; }
table.coll td a { color: var(--accent); }
table.coll td a:hover { border-bottom: 1px solid var(--accent); }

/* ---- Shared data table (market on index, collection in vault) ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
table.coll { border-collapse: collapse; width: 100%; font-family: var(--font-ui); font-size: var(--step--1); }
table.coll th, table.coll td { text-align: left; padding: 0.85em 1em; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.coll thead th { position: sticky; top: 0; background: var(--surface-sunk); font-weight: 600; letter-spacing: 0.03em; }
table.coll tbody tr:nth-child(even) { background: var(--surface-sunk); }
table.coll tbody tr:hover { background: var(--accent-wash); }
table.coll td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Artwork thumbnail (matted, real photo) ---- */
.artist__photo { aspect-ratio: auto; height: 240px; background: var(--surface-sunk);
  display: grid; place-items: center; overflow: hidden; cursor: zoom-in; position: relative; }
.artist__photo img { max-width: 78%; max-height: 80%; width: auto; height: auto; object-fit: contain;
  box-shadow: 0 6px 18px rgba(22,19,15,0.14); background: #fff; transition: transform 400ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .artist__photo:hover img { transform: scale(1.03); } }
.artist__photo .zoom-ico { position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px;
  color: var(--ink); opacity: 0; transition: opacity var(--dur) var(--ease); }
.artist__photo:hover .zoom-ico { opacity: 0.7; }

/* ---- Reference-image badge (researched, not the verified collection piece) ---- */
.ref-badge { position: absolute; top: 8px; left: 8px; z-index: 3;
  font-family: var(--font-ui); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(122,46,42,0.92); color: #fff; padding: 0.25em 0.6em; border-radius: 3px; pointer-events: none; }
.pw-thumb { position: relative; }
.coll .thumb-cell { position: relative; }
.coll .thumb-cell.is-ref::after { content: "REF"; position: absolute; top: 4px; left: 6px;
  font-family: var(--font-ui); font-size: 0.5rem; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(122,46,42,0.92); color: #fff; padding: 1px 4px; border-radius: 2px; }

/* ---- Vault thumbnail cell ---- */
.coll .thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 2px; cursor: zoom-in;
  background: var(--surface-sunk); display: block; transition: transform var(--dur) var(--ease); }
.coll .thumb:hover { transform: scale(1.12); }
.coll td.thumb-cell { padding: 0.4em 0.6em; }

/* ---- Clickable artist name ---- */
.link-artist { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-align: left; border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.link-artist:hover { border-color: var(--accent); color: var(--accent); }
.artist__name .link-artist:hover { color: var(--accent); }

/* ---- Artist profile drawer ---- */
.profile { position: fixed; inset: 0; z-index: 90; display: none; }
.profile.is-open { display: block; }
.profile__backdrop { position: absolute; inset: 0; background: rgba(22,19,15,0.5);
  opacity: 0; transition: opacity 250ms var(--ease); }
.profile.is-open .profile__backdrop { opacity: 1; }
.profile__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(540px, 94vw);
  background: var(--paper); box-shadow: -24px 0 70px rgba(22,19,15,0.22); overflow-y: auto;
  transform: translateX(100%); transition: transform 320ms cubic-bezier(0.32,0.72,0,1);
  padding: var(--sp-8) var(--sp-6) var(--sp-10); }
.profile.is-open .profile__panel { transform: translateX(0); }
.profile__close { position: sticky; top: 0; float: right; width: 40px; height: 40px; margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-2)) 0 0;
  font-size: 26px; line-height: 1; color: var(--ink); background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 50%; cursor: pointer; z-index: 2; transition: background var(--dur) var(--ease); }
.profile__close:hover { background: var(--surface-sunk); }
.profile__panel h2 { font-size: var(--step-2); margin-top: var(--sp-2); }
.profile__panel h2 .dates { font-size: 0.5em; color: var(--ink-muted); font-style: italic; }
.profile__vita { color: var(--ink-soft); margin-top: var(--sp-4); }
.profile__facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-5);
  font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-soft); }
.profile__facts b { color: var(--ink); font-weight: 600; }
.profile__sec-title { font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-muted); margin: var(--sp-8) 0 var(--sp-4); }
.profile__works { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.pw-thumb { aspect-ratio: 1; background: var(--surface-sunk); display: grid; place-items: center; overflow: hidden;
  cursor: zoom-in; border-radius: 2px; }
.pw-thumb img { max-width: 86%; max-height: 86%; object-fit: contain; background: #fff;
  box-shadow: 0 3px 10px rgba(22,19,15,0.12); transition: transform 300ms var(--ease); }
.pw-thumb:hover img { transform: scale(1.05); }
.profile__auctions { font-family: var(--font-ui); font-size: var(--step--1); }
.profile__auctions li { padding: var(--sp-3) 0; border-bottom: 1px solid var(--hairline); list-style: none; }
.profile__auctions .pa-top { display: flex; justify-content: space-between; gap: var(--sp-3); }
.profile__auctions .pa-price { font-weight: 600; color: var(--ink); white-space: nowrap; }
.profile__auctions .pa-src { color: var(--accent); }
.profile__none { color: var(--ink-muted); font-style: italic; font-family: var(--font-ui); font-size: var(--step--1); }

/* ---- Lightbox ---- */
.lb { position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(22,19,15,0.78); backdrop-filter: blur(6px); padding: var(--sp-5);
  opacity: 0; transition: opacity 200ms var(--ease); }
.lb.is-open { display: grid; opacity: 1; }
.lb__fig { margin: 0; display: grid; justify-items: center; gap: var(--sp-4);
  transform: scale(0.97); transition: transform 220ms var(--ease); }
.lb.is-open .lb__fig { transform: scale(1); }
.lb__img { display: block; background: #fff; padding: 10px; border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); image-rendering: auto; }
.lb__cap { font-family: var(--font-ui); font-size: var(--step--1); color: rgba(251,250,247,0.85);
  text-align: center; max-width: 560px; }
.lb__close { position: fixed; top: 18px; right: 22px; width: 44px; height: 44px;
  font-size: 28px; line-height: 1; color: var(--paper); background: transparent; border: 0;
  cursor: pointer; border-radius: 50%; transition: background var(--dur) var(--ease); }
.lb__close:hover { background: rgba(251,250,247,0.12); }
@media (prefers-reduced-motion: reduce) { .lb, .lb__fig { transition: none; } }

/* ---- Network section ---- */
.network { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: var(--sp-10) var(--sp-6); }
.network .eyebrow { color: rgba(251,250,247,0.55); }
.network h2 { color: var(--paper); }
.network__canvas { margin-top: var(--sp-8); aspect-ratio: 16/10; width: 100%; display: block; touch-action: pan-y; }
.net-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center;
  margin-top: var(--sp-5); font-family: var(--font-ui); font-size: var(--step--1); color: rgba(251,250,247,0.7); }
.net-key { display: inline-flex; align-items: center; gap: 0.5ch; }
.net-key i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.net-hint { color: rgba(251,250,247,0.5); font-style: italic; margin-right: auto; }
@media (max-width: 719px) { .network { padding: var(--sp-8) var(--sp-5); } .net-hint { width: 100%; } }

/* ---- Vault teaser ---- */
.vault {
  display: grid; gap: var(--sp-6);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--shadow-1);
}
.vault__lock { width: 40px; height: 40px; color: var(--accent); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--hairline); padding-block: var(--sp-8); margin-top: var(--sp-12); }
.foot-grid { display: grid; gap: var(--sp-6); }
.foot-fine { font-family: var(--font-ui); font-size: var(--step--1); color: var(--ink-muted); }

/* ---- Reveal-on-scroll ---- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* =====================  RESPONSIVE  ===================== */
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
  .artists { grid-template-columns: repeat(2, 1fr); gap: var(--sp-10) var(--sp-8); }
  .artist { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .hero__title { max-width: 18ch; }
  .artists { grid-template-columns: repeat(3, 1fr); }
  .vault { grid-template-columns: 48px 1fr auto; align-items: center; }
}

/* ---- Mobile nav fallback ---- */
@media (max-width: 719px) {
  .brand { font-size: var(--step-0); }
  .nav-links { gap: var(--sp-3); }
  /* drop inline text links on mobile; keep the key Collection CTA */
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn { padding: 0.7em 1em; }
}
