/* Exhibition Spac.es — v2 draft: ruled grid, black & white */

@font-face { font-family: "AG Reg"; src: url("../fonts/AkzidenzGroteskBQ-Reg.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "AG Bold"; src: url("../fonts/AkzidenzGroteskBQ-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "AG BoldExt"; src: url("../fonts/AkzidenzGroteskBQ-BoldExt.woff2") format("woff2"); font-display: swap; }

:root {
  --paper: #f3f3f1;
  --paper-2: #e9e9e6;
  --ink: #0b0b0b;
  --muted: #6d6d69;
  --rule: #cfcfca;
  --gutter: clamp(12px, 1.6vw, 24px);
  --pad: clamp(16px, 2vw, 32px);
  --head-h: 60px;
  --sans: "AG Reg", "Helvetica Neue", Arial, sans-serif;
  --bold: "AG Bold", "Helvetica Neue", Arial, sans-serif;
  --ext: "AG BoldExt", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}
.dark {
  --paper: #0b0b0b;
  --paper-2: #161616;
  --ink: #f3f3f1;
  --muted: #8a8a85;
  --rule: rgba(243, 243, 241, .16);
  background-color: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip, not hidden: hidden would make body a scroll container and unstick the header when the menu locks scrolling */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; font-weight: 400; }
ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 200; top: 8px; left: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; }

.muted { color: var(--muted); }

/* ---------- Ruled frame ----------
   The page is one ruled column: every .frame has side rules, every .cell rules its right/bottom edge. */
.frame { position: relative; margin: 0 var(--gutter); border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.cell { padding: var(--pad); border-bottom: 1px solid var(--rule); }
.grow { flex: 1; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.3); backdrop-filter: blur(50px); -webkit-backdrop-filter: blur(50px); border-bottom: 1px solid var(--rule); }
.header-row { position: relative; display: flex; height: var(--head-h); }
.header-row .cell { display: flex; align-items: center; padding: 0 var(--pad); border-bottom: 0; border-right: 1px solid var(--rule); text-decoration: none; }
.header-row .menu-toggle { display: flex; flex: 1; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background: none; border: 0; cursor: pointer; color: inherit; }
.menu-toggle span { display: block; width: 54px; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Overlay menu (small screens) ---------- */
/* Menu panel drops out of the top bar and stays inside the ruled column (no dot grid) */
.overlay-menu { position: fixed; top: calc(var(--head-h) + 1px); left: var(--gutter); right: var(--gutter); z-index: 55;
  padding: clamp(32px, 5vw, 64px) var(--pad);
  --paper: #0b0b0b; --ink: #f3f3f1; --muted: #8a8a85; --rule: rgba(243,243,241,.16);
  background: var(--paper); color: var(--ink);
  /* heavy shadow in a near-black navy with a hint of green; side/bottom insets are negative so the clip doesn't cut it off */
  box-shadow: 0 60px 140px -20px rgba(5, 20, 24, .72), 0 24px 48px -12px rgba(5, 20, 24, .5);
  clip-path: inset(0 -260px 100% -260px); visibility: hidden;
  transition: clip-path .55s var(--ease-io), visibility 0s .55s; }
.menu-open .overlay-menu { clip-path: inset(0 -260px -260px -260px); visibility: visible; transition: clip-path .7s var(--ease-io); }
.menu-open .header-row { background: #0b0b0b; color: #f3f3f1; --rule: rgba(243,243,241,.16); transition: background .3s; }

.overlay-menu ul { position: relative; }
.overlay-menu li { overflow: hidden; }
.overlay-menu a { display: flex; justify-content: center; align-items: baseline; gap: 14px; padding: 10px 0; font-size: min(13vw, 96px); line-height: 1.05; letter-spacing: -.02em; text-decoration: none; }
.overlay-menu a { color: var(--muted); transition: color .3s; }
.overlay-menu a:hover, .overlay-menu a:focus-visible, .overlay-menu a[aria-current="page"] { color: var(--ink); }
.motion .overlay-menu a { transform: translateY(100%); transition: transform .4s var(--ease); }
.motion.menu-open .overlay-menu a { transform: none; transition: transform .9s var(--ease); }
.motion.menu-open .overlay-menu li:nth-child(2) a { transition-delay: .06s; }
.motion.menu-open .overlay-menu li:nth-child(3) a { transition-delay: .12s; }

/* ---------- Shared rows ---------- */
.meta-row, .fig-bar { display: flex; }
.meta-row .cell, .fig-bar .cell { padding-top: 14px; padding-bottom: 14px; border-right: 1px solid var(--rule); }
.meta-row .cell:last-child, .fig-bar .cell:last-child { border-right: 0; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split > .cell:first-child { border-right: 1px solid var(--rule); }
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > * { display: block; }

/* ---------- Hero ---------- */
.wordmark { display: block; padding: clamp(14px, 1.6vw, 26px) var(--pad); border-bottom: 1px solid var(--rule); overflow: hidden; }
.wordmark img { width: 100%; }
/* sized to the cell: "ART SPACES" in BoldExt is ~7.9em wide */
.hero .lead { container-type: inline-size; }
.display { white-space: nowrap; font-size: 12.2cqi; line-height: .95; letter-spacing: -.02em; text-transform: uppercase; }
.display b { font-family: var(--ext); font-weight: 400; letter-spacing: -.01em; }
.hero .lead { display: flex; flex-direction: column; }
.hero .side { display: flex; flex-direction: column; gap: 56px; }
.hero .side > p { max-width: 560px; font-size: clamp(18px, 1.5vw, 22px); }

/* ---------- Tiles (Universe-style action blocks) ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: flex; justify-content: space-between; align-items: flex-end; min-height: 108px; padding: 18px; border-radius: 6px;
  font-family: var(--bold); font-size: 17px; text-decoration: none; overflow: hidden; isolation: isolate; }
.tile-solid { background: var(--ink); color: var(--paper); }
.tile-ghost { background: var(--paper-2); color: var(--ink); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #3a3a3a; transform: translateY(101%); transition: transform .6s var(--ease); }
.tile:hover::before, .tile:focus-visible::before { transform: none; }
.tile-ghost::before { background: var(--ink); }
.tile:hover, .tile:focus-visible { color: var(--paper); }
.tile-solid:hover, .tile-solid:focus-visible { color: var(--paper); }
.arr { width: 12px; height: 12px; flex: none; transition: transform .45s var(--ease); }
a:hover > .arr { transform: translate(3px, -3px); }
.tile .arr { width: 16px; height: 16px; }

/* ---------- Figure / compare ---------- */
.compare { position: relative; overflow: hidden; user-select: none; touch-action: pan-y; aspect-ratio: 1800 / 1286; cursor: ew-resize; --pos: 50%; border-bottom: 1px solid var(--rule); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: #fff; pointer-events: none; box-shadow: 0 0 0 .5px rgba(0,0,0,.08); }
.compare .knob { font-family: var(--sans); font-size: 12px; line-height: 1.4; letter-spacing: .04em; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 64px; height: 30px; border-radius: 99px;
  background: #fff; color: #0b0b0b; font-size: 16px; letter-spacing: .3em; padding-left: .3em; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:focus-within .knob { outline: 2px solid #0b0b0b; outline-offset: 2px; }

/* ---------- Stats ---------- */

/* ---------- Who it's for ---------- */
.who h2 { font-family: var(--ext); font-size: clamp(28px, 3vw, 46px); line-height: 1.08; letter-spacing: -.01em; }
.who .copy { padding-top: var(--pad); }
.who .copy p { max-width: 620px; }
.who .copy p + p { margin-top: 1.2em; }

/* ---------- Thumbnail strip (marquee) ---------- */
.strip { overflow: hidden; border-bottom: 1px solid var(--rule); padding: var(--pad) 0; }
.strip-track { display: flex; width: max-content; will-change: transform; }
.strip-track img { width: max(1400px, 120vw); padding-right: 18px; }

/* ---------- Big CTA ---------- */


/* ---------- Inner pages ---------- */
.page-head .meta-row { border-bottom: 0; }
.slug-title { font-size: clamp(48px, 7.4vw, 128px); line-height: .95; letter-spacing: -.03em; }
/* Bold extended, a step smaller — matches "ART SPACES" on the home page */
.slug-title-bold { font-family: var(--ext); font-size: clamp(30px, 4.4vw, 76px); line-height: 1; letter-spacing: -.02em; }
.big-copy { font-size: clamp(22px, 2.1vw, 34px); line-height: 1.35; max-width: 30em; }
.statement .tiles { margin-top: 48px; max-width: 640px; }
.plate { border-bottom: 1px solid var(--rule); }
.parallax-frame { overflow: hidden; border-bottom: 1px solid var(--rule); aspect-ratio: 2400 / 1300; }
.parallax-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 0; overflow: hidden; }
.site-footer .frame { border-color: var(--rule); }
.footer-mark { padding: clamp(16px, 2vw, 32px) var(--pad); border-bottom: 1px solid var(--rule); overflow: hidden; }
.footer-mark img { width: 100%; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.footer-grid .cell { border-right: 1px solid var(--rule); min-height: 200px; }
.footer-grid .cell:last-child { border-right: 0; }
.footer-contact { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.footer-cta .tiles { grid-template-columns: 1fr; }
.dark .tile-solid::before { background: #cfcfca; }
.dark .tile:hover, .dark .tile:focus-visible { color: var(--paper); }
.footer-nav a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Motion (html.motion, i.e. not reduced-motion) ---------- */
@keyframes es-draw-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes es-rise   { from { transform: translateY(105%); } to { transform: none; } }
@keyframes es-fade   { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes es-in     { from { opacity: 0; } to { opacity: 1; } }

.motion { --shift: 0s; }
.motion.seen { --shift: -.45s; }
.motion .site-header { animation: es-in .8s ease calc(.2s + var(--shift)) both; }
.motion .hero .display .line > * { animation: es-rise 1.3s var(--ease) calc(.75s + var(--shift)) both; }
.motion .hero .display .line + .line > * { animation-delay: calc(.85s + var(--shift)); }
.motion .slug-title .line > * { animation: es-rise 1.3s var(--ease) calc(.3s + var(--shift)) both; }
.motion .intro-fade { animation: es-fade 1.2s var(--ease) calc(1s + var(--d, 0s) + var(--shift)) both; }
.motion .statement .intro-fade { animation-delay: calc(var(--d, 0s) + var(--shift)); }
.motion .meta-row, .motion .hero .split { position: relative; }

.motion .reveal { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 1s ease, filter 1s ease, transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.motion .reveal.in { opacity: 1; transform: none; filter: none; }
.motion .reveal-lines .line > * { transform: translateY(105%); transition: transform 1.3s var(--ease) var(--d, 0s); }
.motion .reveal-lines.in .line > * { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  :root { --head-h: 56px; }
  body { font-size: 17px; }
  .hide-sm { display: none !important; }
  .split { grid-template-columns: 1fr; }
  .split > .cell:first-child { border-right: 0; }
  .meta-row { flex-wrap: wrap; }
  .meta-row .grow { order: 3; flex-basis: 100%; border-top: 1px solid var(--rule); border-right: 0; }
  .meta-row .cell:first-child { flex: 1; }
  .hero .lead { min-height: 0; gap: 60px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 84px; }
  .who .copy { padding-top: var(--pad); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid .cell { border-right: 0; min-height: 0; }
    .parallax-frame { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .led.blink { animation: none; }
}
