/* ==========================================================================
   Tria — Three Generations of Art
   ========================================================================== */

:root {
  --bg: #ffffff;
  --paper: #f4efe8;
  --ink: #1d1b19;
  --ink-soft: #3a3632;
  --muted: #7a746d;
  --line: #dcd6ce;
  --accent: #b9542b;

  --dot-1: #d8bda7;
  --dot-2: #b36a3b;
  --dot-3: #8c847b;

  --serif: "EB Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  /* Logo "Tria" */
  --script: "Mrs Saint Delafield", "Allura", cursive;
  /* Line under the logo */
  --display: "Playfair Display", "EB Garamond", Georgia, serif;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 48px);
  --track: 0.22em;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type helpers ---------- */

.caps {
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-weight: 400;
}

.rule {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--accent);
  border: 0;
  margin: 18px 0 0;
}
.rule--center { margin-left: auto; margin-right: auto; }

.section-title {
  text-align: center;
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--ink);
  transition: color .2s ease;
}
.link-arrow::after {
  content: "";
  width: 18px;
  height: 9px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 9'%3E%3Cpath d='M0 4.5h16.5M13 1l3.5 3.5L13 8' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 9'%3E%3Cpath d='M0 4.5h16.5M13 1l3.5 3.5L13 8' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform .25s ease;
}
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow--accent { color: var(--accent); }

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  color: var(--ink);
}
.logo__row { display: inline-flex; align-items: center; }
.logo__script {
  font-family: var(--script);
  font-size: 64px;
  line-height: .9;
  padding: 0 6px 0 2px;
  transform: translateY(4px);
}
.logo__tag {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 4px 0 0 18px;
  color: var(--ink-soft);
}

.dots { display: inline-flex; gap: 5px; align-items: center; }
.dots i {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dot-1);
}
.dots i:nth-child(2) { background: var(--dot-2); }
.dots i:nth-child(3) { background: var(--dot-3); }

.logo--hero { align-items: center; }
.logo--hero .logo__script { font-size: clamp(120px, 20vw, 220px); padding-right: 16px; }
.logo--hero .dots { gap: 12px; transform: translateY(18px); }
.logo--hero .dots i { width: clamp(16px, 2.2vw, 24px); height: clamp(16px, 2.2vw, 24px); }
.logo--hero .logo__tag { font-size: clamp(11px, 1.4vw, 16px); letter-spacing: .34em; margin: 0; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.wordmark .dots i { width: 8px; height: 8px; }

/* ---------- Header ---------- */

.site-header { padding: 22px 0 10px; }
/* The header stays at the top of every page while it scrolls (the virtual room has its own bar, and the
   home page fits one screen); a hairline appears under it once the page has moved. */
body:not([data-page="room"]):not([data-page="home"]) #site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); }
@supports (animation-timeline: scroll()) {
  body:not([data-page="room"]) #site-header { animation: head-line linear both; animation-timeline: scroll(); animation-range: 0 24px; }
}
@keyframes head-line { from { box-shadow: 0 1px 0 transparent; } to { box-shadow: 0 1px 0 var(--line); } }
.site-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.site-header--home .site-header__inner { justify-content: flex-end; }
.site-header__tag { display: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-top: 18px;
}
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  position: relative;
  font-size: 12px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  padding-bottom: 10px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { width: 100%; }

.util { display: flex; align-items: center; gap: 18px; }
.util__sep { width: 1px; height: 22px; background: var(--accent); opacity: .6; }

.social { display: flex; align-items: center; gap: 18px; }
.social a { display: grid; place-items: center; width: 22px; height: 22px; }
.social svg { width: 20px; height: 20px; }

.lang { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .18em; }
.lang button { color: var(--muted); transition: color .2s; }
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button:hover { color: var(--accent); }
.lang span { width: 1px; height: 11px; background: var(--accent); }

.burger {
  display: none;
  width: 28px; height: 22px;
  position: relative;
  margin-top: 14px;
}
.burger span, .burger::before, .burger::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 1.5px;
  background: var(--accent);
}
.burger::before { top: 2px; }
.burger span { top: 10px; }
.burger::after { top: 18px; }
.site-header--home .burger { display: block; }

/* ---------- Menu overlay ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(29, 27, 25, .08);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu__panel {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.25);
  padding: 30px 0 36px;
  transform: translateY(-16px);
  transition: transform .35s ease;
}
.menu.is-open .menu__panel { transform: none; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__close { width: 28px; height: 28px; position: relative; }
.menu__close::before, .menu__close::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%;
  height: 1.3px; background: var(--ink);
}
.menu__close::before { transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu__links { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 18px; }
.menu__links a {
  font-size: 20px;
  letter-spacing: .26em;
  text-transform: uppercase;
  transition: color .2s;
}
.menu__links a:hover { color: var(--accent); }
.menu__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

/* ---------- Footer ---------- */

.site-footer { margin-top: 56px; }
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
}

/* ---------- Image placeholders ---------- */

.ph {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar, 4 / 3);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 20%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(90% 80% at 85% 90%, rgba(185, 84, 43, .10), transparent 60%),
    linear-gradient(160deg, #efe6db 0%, #e6d8c9 55%, #ddcdbd 100%);
  display: grid;
  place-items: center;
  color: #8e7c6c;
}
.ph::before {
  /* thin inner frame, like a mat */
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(142, 124, 108, .22);
  pointer-events: none;
}
.ph__inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 16px;
}
.ph__icon { width: 34px; height: 34px; opacity: .7; }
.ph__label {
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.ph__ratio { font-size: 12px; font-style: italic; opacity: .75; letter-spacing: .04em; }

.ph--portrait {
  --ar: 1 / 1;
  border-radius: 50%;   /* painters' portraits are round, like the dots in the logo */
  color: #6f6b67;
  background:
    radial-gradient(70% 60% at 50% 38%, rgba(255,255,255,.5), transparent 70%),
    linear-gradient(170deg, #dedbd7 0%, #c9c5c0 60%, #b9b4ae 100%);
}
.ph--wide { --ar: 12 / 5; }
.ph--square { --ar: 1 / 1.02; }

.ph--img::before { display: none; }
.ph--portrait.ph--img img { filter: grayscale(1) contrast(1.05); }

.media { display: block; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }
a.media .ph, a.media img { transition: transform .6s ease; }
a.media:hover .ph, a.media:hover img { transform: scale(1.02); }

/* ---------- Home ---------- */

.hero { text-align: center; padding-bottom: 12px; }
.hero__intro {
  max-width: 34em;
  margin: 32px auto 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  letter-spacing: .02em;
  color: var(--ink-soft);
}

.artists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 34px);
  margin-top: 44px;
}
.artist-card { text-align: center; position: relative; }
/* the "View artist" link covers the whole card, so the painting and the name open the painter too */
.artist-card__go::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.artist-card .ph, .artist-card .media img { transition: transform .6s ease; }
.artist-card:hover .ph, .artist-card:hover .media img { transform: scale(1.02); }
.artist-card__name { transition: color .2s; }
.artist-card:hover .artist-card__name { color: var(--accent); }
.artist-card:hover .link-arrow::after { transform: translateX(4px); }
.artist-card:has(.artist-card__go:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
.artist-card__go:focus-visible { outline: none; }
.artist-card .rule { margin-top: 18px; }
.artist-card__name {
  margin: 18px 0 10px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.artist-card .link-arrow { font-size: 11px; }

.room-cta { text-align: center; margin-top: 46px; }
.room-cta .rule { margin-bottom: 22px; }

/* ---------- Artist page ---------- */

.works { padding-top: clamp(48px, 10vh, 110px); }   /* the painter's portrait, quote and biography (artist.css) run above */

.tabs {
  display: flex;
  justify-content: center;
  margin: 26px 0 0;
}
.tabs button {
  padding: 0 34px 12px;
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color .2s, border-color .2s;
}
.tabs button[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px clamp(20px, 2.6vw, 30px);
  margin-top: 30px;
}
.work .ph { --ar: 16 / 10.5; }
.work a.media { cursor: zoom-in; }

/* ---------- painting viewer (main.js): one painting large on white paper ---------- */

html.viewer-open { overflow: hidden; }
.viewer {
  border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  background: var(--bg); color: var(--ink);
}
.viewer::backdrop { background: var(--bg); }
.viewer[open] { display: grid; animation: viewer-in .3s ease; }
@keyframes viewer-in { from { opacity: 0; } to { opacity: 1; } }
.viewer__fig {
  margin: 0; min-height: 0; box-sizing: border-box; height: 100%;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 18px;
  padding: 64px 96px 54px;
}
.viewer__img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 60px -40px rgba(0,0,0,.4); }
.viewer figcaption { text-align: center; }
.viewer__title { font-style: italic; font-size: 21px; }
.viewer__meta { margin-top: 4px; }
.viewer__close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; display: grid; place-items: center;
}
.viewer__close::before, .viewer__close::after { content: ""; position: absolute; width: 22px; height: 1px; background: var(--ink); transform: rotate(45deg); }
.viewer__close::after { transform: rotate(-45deg); }
.viewer__close:hover::before, .viewer__close:hover::after { background: var(--accent); }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; }
.viewer__nav .arrow { width: 30px; height: 14px; }
.viewer__prev { left: 16px; }
.viewer__next { right: 16px; }
.viewer__nav:hover .arrow { background: var(--ink); }
.viewer__count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.viewer button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) {
  .viewer__fig { padding: 64px 16px 72px; }
  .viewer__nav { top: auto; bottom: 6px; transform: none; }
  .viewer__count { bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) { .viewer[open] { animation: none; } }
.work__title { margin: 12px 0 0; font-style: italic; font-size: 17px; line-height: 1.3; font-weight: 400; }
.work__meta {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.work__meta em { font-style: italic; }
.work__meta .bar { color: var(--accent); margin: 0 8px; }


.arrow {
  width: 20px; height: 10px; flex: none;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5h18.5M14.5 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0 5h18.5M14.5 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
}
.arrow--left { transform: scaleX(-1); }

/* ---------- Exhibitions ---------- */

.page-head { text-align: center; padding: 14px 0 6px; }
.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.page-head p { margin: 26px 0 0; font-size: 17px; letter-spacing: .06em; color: var(--ink-soft); }

.exhibits { margin-top: 32px; display: grid; }
.exhibit {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.exhibit:last-child { border-bottom: 0; }
.exhibit .ph { --ar: 12 / 5; }
.exhibit__when { font-size: 14px; letter-spacing: .14em; color: var(--ink-soft); }
.exhibit__when .sep { color: var(--accent); margin: 0 12px; }
.exhibit__title {
  margin: 14px 0 12px;
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .02em;
}
.exhibit__who { margin: 0; font-size: 16px; letter-spacing: .04em; color: var(--ink-soft); }
.exhibit .rule { margin: 26px 0 16px; width: 36px; }
.exhibit .link-arrow { font-size: 12px; }
.exhibit a.media { cursor: zoom-in; }
.exhibit__count { color: var(--muted); letter-spacing: .08em; }

/* ---------- exhibition page (/exhibitions/<key>): photos on the left, the exhibition's text on the right ---------- */

.expage__back { display: inline-flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-soft); }
.expage__back:hover { color: var(--accent); }
.expage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; margin: 22px 0 clamp(40px, 8vh, 90px); }
.expage__stage {
  position: relative; display: grid; place-items: center; background: var(--paper);
  height: min(74vh, 720px); padding: 36px 64px 44px; box-sizing: border-box; touch-action: pan-y;
}
.expage__img { max-width: 100%; max-height: calc(min(74vh, 720px) - 80px); object-fit: contain; box-shadow: 0 30px 60px -40px rgba(0,0,0,.4); user-select: none; -webkit-user-drag: none; }
.expage__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; }
.expage__nav .arrow { width: 30px; height: 14px; }
.expage__prev { left: 6px; }
.expage__next { right: 6px; }
.expage__nav:hover .arrow { background: var(--ink); }
.expage__count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.expage__text { font-size: 17.5px; line-height: 1.65; color: var(--ink-soft); }
.expage__text p { margin: 0 0 1em; max-width: 34em; }
.exview__title { margin: 12px 0 0; font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; color: var(--ink); }
.exview__detail { margin-top: 10px !important; font-size: 15px; letter-spacing: .04em; color: var(--muted); }
.expage .rule { display: block; margin: 22px 0 24px; width: 36px; }
.exview__who { margin-top: 1.6em !important; font-size: 15px; letter-spacing: .06em; color: var(--muted); }
.expage button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .expage { grid-template-columns: 1fr; gap: 20px; margin-top: 14px; }
  .expage__stage { height: 46vh; height: 46svh; padding: 14px 12px 40px; margin: 0 calc(-1 * var(--gutter)); }
  .expage__img { max-height: calc(46vh - 54px); max-height: calc(46svh - 54px); cursor: zoom-in; }   /* a tap opens it full screen */
  .expage__nav { top: auto; bottom: 0; transform: none; width: 48px; height: 44px; }
  .expage__count { bottom: 14px; }
  .expage__text { font-size: 16.5px; }
}

/* ---------- framing page ---------- */

.framing { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; max-width: 1040px; margin: 40px auto 0; }
.ph--framing { --ar: 3 / 4; }
.framing__heading { margin: 0; font-weight: 400; font-size: clamp(26px, 3vw, 36px); letter-spacing: .04em; }
.framing__lead { margin: 10px 0 26px; font-style: italic; font-size: 21px; color: var(--ink); }
.framing__text p { font-size: 18px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 1em; max-width: 34em; }
.framing__contact { margin-top: 1.6em !important; }
.phone { color: var(--accent); font-size: 21px; letter-spacing: .06em; white-space: nowrap; }
.phone:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) { .framing { grid-template-columns: 1fr; margin-top: 24px; } .framing__img { max-width: 420px; } }

/* The framing page fits one screen, like the home page: no scrolling; the photo takes the height that is left.
   Very short screens (phones held sideways) scroll as usual. */
@media (min-height: 560px) {
  body[data-page="framing"] { height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
  body[data-page="framing"] #site-header { position: static; animation: none; }
  body[data-page="framing"] main { flex: 1; min-height: 0; display: flex; }
  body[data-page="framing"] main > .wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body[data-page="framing"] .page-head { padding-top: clamp(4px, 2vh, 24px); }
  body[data-page="framing"] .page-head h1 { font-size: clamp(26px, 5vh, 46px); }
  body[data-page="framing"] .framing { flex: 1; min-height: 0; margin: clamp(10px, 3vh, 36px) auto clamp(10px, 3vh, 32px); width: 100%;
    grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; }
  body[data-page="framing"] .framing__img { height: 100%; min-height: 0; aspect-ratio: 3 / 4; max-width: 46vw; justify-self: end; }
  body[data-page="framing"] .framing__img .ph { height: 100%; aspect-ratio: auto; }
  body[data-page="framing"] .framing__text p { font-size: clamp(15px, 2.1vh, 18px); line-height: 1.55; margin-bottom: .8em; }
  body[data-page="framing"] .framing__lead { margin: 6px 0 clamp(10px, 2.2vh, 26px); font-size: clamp(17px, 2.5vh, 21px); }
  body[data-page="framing"] .site-footer { margin-top: 0; }
  body[data-page="framing"] .site-footer__inner { padding: clamp(10px, 2vh, 26px) 0; }
}
@media (min-height: 560px) and (max-width: 900px) {
  /* phones: a smaller photo on top and the whole text below, still one screen */
  body[data-page="framing"] .page-head h1 { font-size: clamp(24px, 4vh, 34px); }
  body[data-page="framing"] .page-head .rule { margin-top: 8px; }
  body[data-page="framing"] .framing { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; margin: 10px auto 8px; }
  body[data-page="framing"] .framing__img { justify-self: stretch; width: 100%; max-width: none; aspect-ratio: auto; height: 100%; }
  body[data-page="framing"] .framing__img .ph img { object-position: 50% 45%; }
  body[data-page="framing"] .framing__heading { font-size: clamp(18px, 2.7vh, 22px); }
  body[data-page="framing"] .framing__lead { font-size: clamp(14px, 2vh, 16px); margin: 2px 0 8px; }
  body[data-page="framing"] .framing__text p { font-size: clamp(12.5px, 1.85vh, 15px); line-height: 1.42; margin-bottom: .45em; }
  body[data-page="framing"] .framing__contact { margin-top: .7em !important; }
  body[data-page="framing"] .phone { font-size: clamp(16px, 2.4vh, 19px); }
  body[data-page="framing"] .site-footer__inner { padding: 8px 0; }
}
}

/* ---------- contact page ---------- */

.contact { display: grid; gap: 28px; justify-items: center; text-align: center; margin: 44px auto 0; padding-bottom: clamp(40px, 12vh, 140px); }
.contact__item { display: grid; gap: 8px; justify-items: center; }
.contact__label { font-family: var(--display); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.contact__item a:not(.phone) { font-size: 18px; letter-spacing: .04em; color: var(--ink-soft); }
.contact__item a:not(.phone):hover { color: var(--accent); }
.contact .phone { font-size: 28px; }

.archive { margin-top: 40px; }
.archive__list { list-style: none; margin: 28px 0 0; padding: 0; }
.archive__list li {
  display: grid;
  grid-template-columns: 136px 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}
.archive__year { font-size: 22px; letter-spacing: .14em; }
.archive__title { font-size: 15.5px; line-height: 1.35; }
.archive__place { display: block; color: var(--muted); font-size: 15px; }

/* ---------- About ---------- */

.page-head .about__lead { font-style: italic; font-size: clamp(18px, 2vw, 22px); letter-spacing: .02em; color: var(--ink); }
.about__body {
  max-width: 36em;
  margin: 40px auto 0;
  font-size: 18.5px;
  line-height: 1.65;
  letter-spacing: .02em;
  color: var(--ink-soft);
}
.about__body p { margin: 0 0 1.1em; }
.about__body p:first-child::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: .85;
  padding: .06em .1em 0 0;
  color: var(--accent);
}
.about__artists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 3vw, 34px);
  max-width: 880px;
  margin: 56px auto 0;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
.about__artist { display: grid; justify-items: center; text-align: center; }
.about__artist .media { width: 100%; }
.about__name {
  margin-top: 16px;
  font-size: 15px;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: color .2s;
}
.about__artist:hover .about__name { color: var(--accent); }
.about__role { margin-top: 4px; font-size: 15px; font-style: italic; color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav__links, .site-header .util { display: none; }
  .burger { display: block; }

  /* a slimmer bar: Tria · tagline · menu on one line */
  .site-header { padding: 14px 0 10px; }
  .site-header__inner { align-items: center; gap: 14px; }
  .site-header .logo__tag { display: none; }
  .site-header__tag {
    display: block; flex: 1; min-width: 0; text-align: center; text-wrap: balance;
    font-family: var(--display); font-size: 9px; line-height: 1.6; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft);
  }
  .site-header .burger { margin-top: 0; }

  .artists { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .artist-card .ph { --ar: 16 / 7.5; }
  .artist-card .rule { display: none; }
  .artist-card__name { margin-top: 12px; }


  .grid { grid-template-columns: 1fr; gap: 18px; }
  .work .ph { --ar: 4 / 3; }
  .work__meta { font-size: 12.5px; }

  .exhibit { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; border-bottom: 0; }
  .exhibit .ph { --ar: 16 / 7; }
  .exhibit .rule { display: none; }
  .exhibit .link-arrow { margin-top: 12px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .about__body { font-size: 16.5px; margin-top: 28px; }
  .about__name { font-size: 11px; letter-spacing: .14em; margin-top: 10px; }
  .about__role { font-size: 12.5px; }
  .logo__script { font-size: 50px; }
  .logo--hero .logo__script { font-size: 108px; }

  .tabs button { padding: 0 14px 10px; font-size: 12px; letter-spacing: .08em; }


  .site-footer__inner { flex-wrap: wrap; }
  .site-footer .wordmark { font-size: 17px; }
  .site-footer .social { gap: 14px; }

  .archive__list li { grid-template-columns: 70px 1fr; padding: 10px 4px; }
  .archive__year { font-size: 17px; }

  .menu__links a { font-size: 16px; }
  .menu__foot { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Home: one fixed screen, no scrolling ---------- */

body[data-page="home"] {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body[data-page="home"] #site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
body[data-page="home"] main { flex: 1; min-height: 0; display: flex; }
body[data-page="home"] .hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(8px, 3vh, 40px);
  padding-bottom: 0;
}
body[data-page="home"] .logo--hero .logo__script { font-size: clamp(64px, min(20vw, 17vh), 220px); }
/* The top of the script "T" lines up with the menu button (36px down; 14px on phones and tablets, where
   the header bar is slimmer): its flourish rises about .15em above the text box, so the space above
   grows with the logo's size. */
body[data-page="home"] { --menu-top: 36px; }
@media (max-width: 900px) { body[data-page="home"] { --menu-top: 14px; } }
body[data-page="home"] .hero { padding-top: calc(var(--menu-top) + .15 * clamp(64px, min(20vw, 17vh), 220px)); }
body[data-page="home"] .logo--hero .logo__tag { font-size: clamp(9px, min(1.4vw, 1.7vh), 16px); }
body[data-page="home"] .hero > .rule { margin-top: clamp(8px, 1.8vh, 18px); }
body[data-page="home"] .hero__intro {
  margin-top: clamp(8px, 2.4vh, 32px);
  font-size: clamp(14px, min(1.6vw, 2.2vh), 20px);
}
body[data-page="home"] .artists {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin-top: clamp(12px, 3.2vh, 44px);
  grid-template-rows: minmax(0, 1fr);
}
body[data-page="home"] .artist-card { display: flex; flex-direction: column; min-height: 0; }
body[data-page="home"] .artist-card .media { flex: 1; min-height: 0; }
body[data-page="home"] .artist-card .ph { aspect-ratio: auto; height: 100%; }
body[data-page="home"] .artist-card .link-arrow { align-self: center; }
body[data-page="home"] .artist-card .rule { margin-top: clamp(8px, 1.6vh, 18px); }
body[data-page="home"] .artist-card__name {
  margin: clamp(6px, 1.4vh, 18px) 0 clamp(2px, .8vh, 10px);
  font-size: clamp(14px, 2.1vh, 18px);
}
body[data-page="home"] .room-cta { margin-top: clamp(10px, 2.6vh, 40px); }
body[data-page="home"] .room-cta .rule { margin-bottom: clamp(8px, 1.6vh, 22px); }
body[data-page="home"] .site-footer { margin-top: clamp(8px, 2vh, 24px); }
body[data-page="home"] .site-footer__inner { padding: clamp(10px, 2vh, 26px) 0; }

/* phones: the three artists become compact rows, image left and name right */
@media (max-width: 900px) {
  body[data-page="home"] .artists {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 1.6vh, 16px);
  }
  body[data-page="home"] .artist-card {
    display: grid;
    grid-template-columns: 44% 1fr;
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 18px;
    text-align: left;
  }
  body[data-page="home"] .artist-card .media { grid-row: 1 / -1; }
  body[data-page="home"] .artist-card__name { grid-row: 2; margin: 0 0 6px; font-size: 15px; letter-spacing: .2em; }
  body[data-page="home"] .artist-card .link-arrow { grid-row: 3; justify-self: start; }
  body[data-page="home"] .site-footer .social { gap: 12px; }
  body[data-page="home"] .site-footer__inner { flex-wrap: nowrap; gap: 12px; }
}
@media (max-width: 380px) {
  body[data-page="home"] .site-footer .social { display: none; }
}

/* screens too short to fit everything (e.g. phones in landscape) scroll as before */
@media (max-height: 520px) {
  body[data-page="home"] { height: auto; overflow: visible; display: block; }
  body[data-page="home"] #site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); }   /* short screens scroll the home page */
  body[data-page="home"] main { display: block; }
  body[data-page="home"] .hero { display: block; }
  body[data-page="home"] .artists { grid-template-rows: none; }
  body[data-page="home"] .artist-card .ph { aspect-ratio: var(--ar, 1 / 1.02); height: auto; }
}
