/* ==========================================================================
   Santiago Villanueva — styles
   ========================================================================== */

:root {
  --bg: #f2efe9;
  --bg-2: #e9e5dd;
  --ink: #151413;
  --ink-2: #4a4641;
  --muted: #8b857c;
  --line: rgba(21, 20, 19, .14);
  --dark: #0f0f0e;
  --gold: #a8843f;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading, body.menu-open, body.lb-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em { font-style: italic; }

::selection { background: var(--ink); color: var(--bg); }

.section { padding: clamp(96px, 14vw, 200px) var(--gutter); }

.section__label {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: clamp(32px, 5vw, 64px);
}
.section__label span {
  font-family: var(--serif); font-style: italic; font-size: 18px;
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
.section__label::after { content: ""; flex: 0 0 48px; height: 1px; background: currentColor; opacity: .5; }
.section__label--light { color: rgba(255,255,255,.55); }
.section__label--light span { color: #fff; }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 9vw, 150px); line-height: .92; letter-spacing: -.02em;
  margin: 0 0 clamp(40px, 6vw, 96px);
}

/* ---------- Grain & cursor & progress ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-4%); } 60% { transform: translate(-4%,-1%); }
  80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); }
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 120; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background .3s;
}
.cursor__label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #000;
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .4s var(--ease);
}
.cursor.is-hover { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor.is-hover .cursor__label { opacity: 1; transform: none; }
.cursor.is-link { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 110;
  background: var(--gold); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--dark); color: #f2efe9;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--gutter);
  transition: clip-path 1.2s var(--ease-in-out);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__name { font-family: var(--serif); font-size: clamp(56px, 12vw, 200px); line-height: .9; margin-top: auto; }
.loader__line { display: block; overflow: hidden; padding: .1em .2em .16em; margin: -.1em -.2em -.16em; }
.loader__line > span { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; }
.loader__line:nth-child(2) > span { animation-delay: .12s; }
.loader__count { align-self: flex-end; font-family: var(--serif); font-size: clamp(32px, 5vw, 64px); font-style: italic; }
.loader__count::after { content: "%"; font-size: .5em; margin-left: 4px; }
@keyframes rise { to { transform: translateY(0); } }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.25);
  transition: transform .6s var(--ease), background-color .5s var(--ease), color .5s var(--ease), padding .5s var(--ease), box-shadow .5s;
}
.header.is-solid {
  color: var(--ink); text-shadow: none; padding-top: 16px; padding-bottom: 16px;
  background: rgba(242, 239, 233, .88); box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
body.menu-open .header { color: #f2efe9; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.menu-open .header__nav { visibility: hidden; }
.header.is-hidden { transform: translateY(-110%); }
.header__logo { font-family: var(--serif); font-size: 22px; letter-spacing: .01em; }
.header__nav { display: flex; gap: clamp(18px, 2.4vw, 40px); font-size: 14px; font-weight: 400; letter-spacing: .06em; }
.header__nav a { position: relative; padding: 4px 0; }
.header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .6s var(--ease);
}
.header__nav a:hover::after, .header__nav a.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.header__burger { display: none; width: 40px; height: 40px; position: relative; z-index: 2; }
.header__burger span {
  position: absolute; left: 8px; right: 8px; height: 1px; background: currentColor;
  transition: transform .6s var(--ease), top .6s var(--ease);
}
.header__burger span:first-child { top: 16px; }
.header__burger span:last-child { top: 24px; }
body.menu-open .header__burger span:first-child { top: 20px; transform: rotate(45deg); }
body.menu-open .header__burger span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .header__nav { display: none; }
  .header__burger { display: block; }
}

/* ---------- Menu ---------- */
.menu { position: fixed; inset: 0; z-index: 95; pointer-events: none; visibility: hidden; transition: visibility 0s 1s; }
.menu__bg {
  position: absolute; inset: 0; background: var(--dark);
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path 1s var(--ease-in-out);
}
.menu__links {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 80px var(--gutter); color: #f2efe9;
}
.menu__links a {
  display: flex; align-items: baseline; gap: 16px; overflow: hidden;
  font-family: var(--serif); font-size: clamp(36px, 9vw, 72px); line-height: 1.1;
}
.menu__links a small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.menu__links a span, .menu__links a small {
  display: inline-block; transform: translateY(110%); transition: transform .8s var(--ease);
}
body.menu-open .menu { pointer-events: auto; visibility: visible; transition: none; }
body.menu-open .menu__bg { clip-path: circle(150% at calc(100% - 40px) 40px); }
body.menu-open .menu__links a span, body.menu-open .menu__links a small { transform: none; }
.menu__links a:nth-child(1) * { transition-delay: .25s; }
.menu__links a:nth-child(2) * { transition-delay: .3s; }
.menu__links a:nth-child(3) * { transition-delay: .35s; }
.menu__links a:nth-child(4) * { transition-delay: .4s; }
.menu__links a:nth-child(5) * { transition-delay: .45s; }
.menu__links a:nth-child(6) * { transition-delay: .5s; }
.menu__links a:nth-child(7) * { transition-delay: .55s; }

/* ---------- Split text & reveals ---------- */
.split { display: inline-block; }
.split .char { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .2em .16em; margin: -.12em -.2em -.16em; }
.split .char > span { display: inline-block; transform: translateY(135%) rotate(6deg); transform-origin: 0 100%; transition: transform 1.2s var(--ease); }
.split.is-in .char > span { transform: none; }
.split--italic { font-style: italic; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal-up.is-in { opacity: 1; transform: none; }

/* clip on the child: IntersectionObserver skips targets that are fully clipped */
.reveal-clip { overflow: hidden; }
.reveal-clip img { clip-path: inset(100% 0 0 0); transform: scale(1.25); transition: clip-path 1.6s var(--ease-in-out), transform 2s var(--ease); }
.reveal-clip.is-in img { clip-path: inset(0 0 0 0); transform: scale(1); }

.words .w { opacity: .14; transition: opacity .4s linear; }
.words .w.on { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; color: #fff; background: #ddd;
}
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.25); filter: brightness(.88);
  transition: transform 3s var(--ease);
}
body.is-ready .hero__media img { transform: scale(1.05); }
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.12) 22%, rgba(0,0,0,0) 40%, rgba(0,0,0,.5) 100%);
}
.hero__content {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 9vh, 110px);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px;
}
.hero__kicker { grid-column: 1 / -1; margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.hero__title {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(64px, 15vw, 260px); line-height: .82; letter-spacing: -.03em;
}
.hero__title .split { display: block; }
.hero__title .split--italic { padding-left: .5em; }
.hero__quote {
  max-width: 300px; margin: 0 0 1.2em; font-family: var(--serif); font-size: 20px; line-height: 1.3;
  transition-delay: .6s;
}
.hero__quote cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.hero__scroll {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
}
.hero__scroll i { position: relative; width: 1px; height: 80px; background: rgba(255,255,255,.3); overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: drip 2.2s var(--ease-in-out) infinite; }
@keyframes drip { to { top: 100%; } }

@media (max-width: 900px) {
  .hero__content { grid-template-columns: 1fr; }
  .hero__quote { max-width: 340px; }
  .hero__scroll { display: none; }
}

/* ---------- Concept ---------- */
.concept__intro {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 110px); align-items: center;
  margin-bottom: clamp(80px, 12vw, 180px);
}
.concept__lead {
  font-family: var(--serif); font-size: clamp(32px, 5vw, 84px); line-height: 1.04; letter-spacing: -.015em;
  max-width: 16ch; margin: 0;
}
.concept__figure { margin: 0; }
.concept__media { aspect-ratio: 4 / 5; background: var(--bg-2); }
.concept__media img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%; }
.concept__figure figcaption {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 14px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.concept__figure figcaption span { font-family: var(--serif); font-style: italic; font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink); }
@media (max-width: 900px) {
  .concept__intro { grid-template-columns: 1fr; }
  .concept__media { aspect-ratio: 4 / 3; }
}
.concept__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 72px); }
.concept__item { border-top: 1px solid var(--line); padding-top: 28px; }
.concept__item:nth-child(2) { transition-delay: .12s; }
.concept__item:nth-child(3) { transition-delay: .24s; }
.concept__num { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); }
.concept__item h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; margin: 12px 0 20px; }
.concept__item p { margin: 0; color: var(--ink-2); max-width: 42ch; }
@media (max-width: 900px) { .concept__grid { grid-template-columns: 1fr; } }

/* ---------- Works ---------- */
.works { background: var(--bg); }
.works__intro { padding-bottom: clamp(48px, 6vw, 96px); }
.works__index { display: flex; flex-wrap: wrap; gap: 10px; }
.works__index a {
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px;
  font-size: 13px; color: var(--ink-2);
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s;
}
.works__index a b { font-weight: 500; color: var(--ink); transition: color .5s; }
.works__index a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.works__index a:hover b { color: var(--bg); }

.series {
  display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; gap: clamp(32px, 5vw, 96px);
  padding: clamp(64px, 8vw, 140px) var(--gutter);
  border-top: 1px solid var(--line);
}
.series--reverse { grid-template-columns: 8fr minmax(280px, 4fr); }
.series--reverse .series__aside { order: 2; }
.series__sticky { position: sticky; top: 110px; }
.series__year {
  display: block; font-family: var(--serif); font-size: clamp(72px, 9vw, 150px); line-height: .85; letter-spacing: -.03em;
  margin-bottom: 32px;
}
.series__year em { color: var(--muted); }
.series__name { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 34px; margin: 0 0 18px; }
.series__text { color: var(--ink-2); margin: 0 0 18px; max-width: 44ch; }
.series__text--small { font-size: 14px; color: var(--muted); }

.gallery { columns: 2; column-gap: clamp(12px, 1.6vw, 24px); }
.gallery .tile { margin-bottom: clamp(12px, 1.6vw, 24px); break-inside: avoid; }
@media (max-width: 900px) {
  .series, .series--reverse { grid-template-columns: 1fr; }
  .series--reverse .series__aside { order: 0; }
  .series__sticky { position: static; }
}
@media (max-width: 520px) { .gallery { column-gap: 8px; } .gallery .tile { margin-bottom: 8px; } }

.tile { position: relative; margin: 0; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.tile img {
  width: 100%; height: auto; transform: scale(1.15);
  transition: transform 1.6s var(--ease), filter .8s var(--ease);
}
.tile::after {
  content: ""; position: absolute; inset: 0; background: var(--bg);
  transform-origin: 50% 0; transition: transform 1.3s var(--ease-in-out);
}
.tile.is-in::after { transform: scaleY(0); }
.tile.is-in img { transform: scale(1); }
.tile:hover img { transform: scale(1.04); }

/* interlude */
.interlude {
  background: var(--dark); color: #f2efe9; text-align: center;
  padding: clamp(120px, 16vw, 260px) var(--gutter);
}
.interlude__year { display: inline-block; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 40px; }
.interlude__quote {
  font-family: var(--serif); font-size: clamp(28px, 4.2vw, 64px); line-height: 1.1; letter-spacing: -.01em;
  max-width: 22ch; margin: 0 auto 56px;
}
.interlude__quote .w { opacity: .18; }
.interlude__text { max-width: 56ch; margin: 0 auto; color: rgba(242,239,233,.6); }

/* ---------- Horizontal scroll ---------- */
.hscroll { position: relative; background: var(--dark); color: #fff; }
.hscroll__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hscroll__head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--gutter); margin-bottom: 32px; }
.hscroll__head .section__label { margin: 0; }
.hscroll__hint { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.hscroll__hint i { width: 48px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.hscroll__track { display: flex; gap: clamp(16px, 2vw, 32px); padding: 0 var(--gutter); will-change: transform; }
.hscroll__track .tile { flex: 0 0 auto; height: min(64vh, 680px); background: #1c1c1a; }
.hscroll__track .tile::after { background: var(--dark); transform-origin: 0 50%; }
.hscroll__track .tile.is-in::after { transform: scaleX(0); }
.hscroll__track .tile img { height: 100%; width: auto; }
.hscroll__track .tile figcaption {
  position: absolute; left: 14px; bottom: 12px; font-family: var(--serif); font-style: italic; font-size: 18px;
  opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--ease);
}
.hscroll__track .tile:hover figcaption { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hscroll { height: auto !important; }
  .hscroll__pin { position: relative; height: auto; padding: 96px 0; }
  .hscroll__track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .hscroll__track .tile { height: 56vh; scroll-snap-align: center; }
}

/* ---------- Museums ---------- */
.museums__tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-bottom: clamp(32px, 4vw, 56px); }
.museums__tabs button {
  position: relative; text-align: left; padding: 28px 24px 28px 0;
  color: var(--muted); transition: color .5s var(--ease);
}
.museums__tabs button::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--ease);
}
.museums__tabs button[aria-selected="true"] { color: var(--ink); }
.museums__tabs button[aria-selected="true"]::before { transform: scaleX(1); }
.museums__tabs button:hover { color: var(--ink); }
.museums__name { display: block; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 52px); line-height: 1; margin-bottom: 10px; }
.museums__meta { font-size: 13px; letter-spacing: .04em; }
@media (max-width: 760px) {
  .museums__tabs { grid-template-columns: 1fr; }
  .museums__tabs button { padding: 20px 0; border-bottom: 1px solid var(--line); }
}

.museums__stage { position: relative; }
.museums__panel { display: none; }
.museums__panel.is-active { display: block; animation: fadeIn .8s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(80px, 9vw, 150px); gap: clamp(8px, 1.2vw, 18px); }
.mosaic .tile { grid-column: span 4; grid-row: span 2; }
.mosaic .tile img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .tile:nth-child(7n+1) { grid-column: span 7; grid-row: span 4; }
.mosaic .tile:nth-child(7n+2) { grid-column: span 5; grid-row: span 2; }
.mosaic .tile:nth-child(7n+3) { grid-column: span 5; grid-row: span 2; }
.mosaic .tile:nth-child(7n+4), .mosaic .tile:nth-child(7n+5), .mosaic .tile:nth-child(7n+6) { grid-column: span 4; grid-row: span 3; }
.mosaic .tile:nth-child(7n+7) { grid-column: span 12; grid-row: span 4; }
.mosaic .tile:last-child:nth-child(7n+2) { grid-column: span 5; grid-row: span 4; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; }
  .mosaic .tile, .mosaic .tile:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .mosaic .tile:nth-child(3n+1) { grid-column: span 2; grid-row: span 1; }
}

/* ---------- Exhibitions ---------- */
.expos { position: relative; }
.expos__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.expo {
  position: relative; display: grid; grid-template-columns: 90px 1.4fr 1fr 1fr; gap: 24px; align-items: baseline;
  padding: clamp(18px, 2vw, 28px) 0; border-bottom: 1px solid var(--line);
  transition: padding .6s var(--ease), color .4s;
  cursor: default;
}
.expo::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); z-index: -1;
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease);
}
.expo__year { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); transition: color .4s; }
.expo__title { font-family: var(--serif); font-size: clamp(26px, 3.2vw, 48px); line-height: 1.05; }
.expo__venue, .expo__place { font-size: 14px; color: var(--ink-2); transition: color .4s; }
.expo__thumb { display: none; }
.expos__list.has-hover .expo { color: var(--muted); }
.expos__list.has-hover .expo:hover { color: var(--ink); }

@media (hover: hover) and (min-width: 901px) {
  .expo:hover { padding-left: 24px; padding-right: 24px; color: var(--bg) !important; }
  .expo:hover::before { transform: scaleY(1); transform-origin: 50% 0; }
  .expo:hover .expo__year, .expo:hover .expo__venue, .expo:hover .expo__place { color: rgba(242,239,233,.7); }
}
.expos__list { position: relative; z-index: 1; isolation: isolate; }

.expos__preview {
  position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none;
  width: clamp(220px, 22vw, 340px); aspect-ratio: 4 / 5; overflow: hidden;
  opacity: 0; transition: opacity .4s;
}
.expos__preview.is-visible { opacity: 1; }
.expos__preview img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .expo { grid-template-columns: 64px 1fr; gap: 6px 16px; }
  .expo__venue, .expo__place { grid-column: 2; }
  .expo__thumb { display: block; grid-column: 2; margin-top: 12px; aspect-ratio: 16 / 10; overflow: hidden; }
  .expo__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .expos__preview { display: none; }
}

/* ---------- Workshop ---------- */
.workshop { background: var(--bg-2); padding-bottom: clamp(96px, 12vw, 180px); overflow: hidden; }
.workshop > .section { padding-bottom: clamp(48px, 6vw, 96px); }
.workshop__lead { font-family: var(--serif); font-size: clamp(30px, 4.6vw, 72px); line-height: 1.06; max-width: 20ch; margin: 0; }
.workshop__note { max-width: 62ch; padding-top: clamp(48px, 6vw, 96px); padding-bottom: 0; color: var(--ink-2); }

.marquee { display: flex; width: max-content; gap: 16px; margin-bottom: 16px; }
.marquee__inner { display: flex; gap: 16px; animation: marquee var(--dur, 70s) linear infinite; }
.marquee--reverse .marquee__inner { animation-direction: reverse; }
.marquee:hover .marquee__inner { animation-play-state: paused; }
.marquee .tile { height: clamp(180px, 24vw, 340px); flex: 0 0 auto; }
.marquee .tile::after { display: none; }
.marquee .tile img { height: 100%; width: auto; transform: none; }
.marquee .tile:hover img { transform: scale(1.05); }
@keyframes marquee { to { transform: translateX(calc(-100% - 16px)); } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.contact__media { aspect-ratio: 2 / 3; overflow: hidden; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact .display { font-size: clamp(48px, 7vw, 120px); }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .contact__media { max-width: 420px; }
}

.form { display: grid; gap: 28px; max-width: 640px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 18px; color: var(--ink); padding: 26px 0 12px; outline: none; resize: vertical;
  border-radius: 0;
}
.field span {
  position: absolute; left: 0; top: 26px; color: var(--muted); pointer-events: none;
  transform-origin: 0 0; transition: transform .5s var(--ease), color .3s;
}
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span {
  transform: translateY(-24px) scale(.72); color: var(--ink);
}
.field.is-invalid::after { background: #b4432f; transform: scaleX(1); }

.btn {
  justify-self: start; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px; border-radius: 999px; border: 1px solid var(--ink);
  font-size: 14px; letter-spacing: .06em; transition: color .6s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); border-radius: inherit;
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.btn > * { position: relative; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform .6s var(--ease); }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn:hover svg { transform: translateX(4px); }
.form__status { margin: 0; min-height: 1.6em; font-size: 14px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #f2efe9; overflow: hidden; padding-top: clamp(64px, 8vw, 120px); }
.footer__marquee { white-space: nowrap; font-family: var(--serif); font-size: clamp(64px, 14vw, 240px); line-height: 1; }
.footer__marquee > div { display: inline-flex; animation: marquee 40s linear infinite; }
.footer__marquee span { padding-right: .3em; }
.footer__marquee em { color: var(--gold); }
.footer__bar {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 40px var(--gutter); margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(242,239,233,.6);
}
.footer__top:hover { color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150; background: rgba(15,15,14,.96); color: #f2efe9;
  display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__figure { margin: 0; height: 100vh; height: 100svh; display: grid; place-items: center; padding: 72px 0; }
.lightbox__figure img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  transform: scale(.94); opacity: 0; transition: transform .8s var(--ease), opacity .5s;
}
.lightbox__figure img.is-loaded { transform: none; opacity: 1; }
.lightbox__close { position: absolute; top: 22px; right: var(--gutter); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; z-index: 2; }
.lightbox__nav { height: 100%; font-size: 28px; font-family: var(--serif); opacity: .6; transition: opacity .3s; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-family: var(--serif); font-style: italic; font-size: 18px; opacity: .7; }
@media (max-width: 760px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 8px; height: 56px; width: 56px; z-index: 2; }
  .lightbox__nav--prev { left: 8px; } .lightbox__nav--next { right: 8px; }
  .lightbox__figure { padding: 64px 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
