/*
 * Art for Agents Phase 1 gallery.
 * Component behavior adapted locally from scifi-ui at pinned revision
 * 2b175960619d9ec5b21a1a7182cd0fa72c219226:
 * components/tinted-card.css, components/panel-surface.css,
 * components/scan-pass.css, and the token system in hologram.css.
 */

:root {
  color-scheme: dark;
  --holo-line: 196 228 255;
  --holo-beam: 178 216 248;
  --holo-glow: 74 150 224;
  --holo-ink: 239 244 251;
  --holo-dim: 174 190 209;
  --holo-panel: 15 18 24;
  --holo-cyan: 126 224 255;
  --page-inline: clamp(1rem, 4vw, 4.5rem);
  --content-max: 92rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 4%, rgb(44 83 129 / .22), transparent 30rem),
    radial-gradient(circle at 87% 25%, rgb(95 53 124 / .13), transparent 34rem),
    #05080d;
  color: rgb(var(--holo-ink));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(var(--holo-cyan) / .025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--holo-cyan) / .025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid rgb(var(--holo-cyan));
  outline-offset: 4px;
  border-radius: .2rem;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .75rem 1rem;
  border-radius: .35rem;
  background: #effaff;
  color: #071018;
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header,
footer {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding: 1.4rem var(--page-inline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header { min-height: 5.5rem; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark-mark {
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid rgb(var(--holo-cyan) / .65);
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgb(var(--holo-cyan) / .25), 0 0 14px rgb(var(--holo-cyan) / .2);
  background: radial-gradient(circle, rgb(var(--holo-cyan) / .9) 0 8%, transparent 10%);
}

nav { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; }
nav a { color: rgb(var(--holo-dim)); font-size: .9rem; text-decoration: none; }
nav a:hover { color: rgb(var(--holo-ink)); }

main { width: min(100%, var(--content-max)); margin-inline: auto; padding-inline: var(--page-inline); }

.hero {
  min-height: min(47rem, calc(100vh - 5.5rem));
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, .72fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: center;
  padding-block: clamp(4rem, 9vw, 8rem);
}

.eyebrow,
.signal-label {
  margin: 0 0 1rem;
  color: rgb(var(--holo-cyan) / .82);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .15em;
  line-height: 1.5;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

.hero h1,
.exhibition-page h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 8.6rem);
  font-weight: 320;
  letter-spacing: -.065em;
  line-height: .86;
}

.hero h1 span { color: rgb(var(--holo-cyan)); text-shadow: 0 0 40px rgb(var(--holo-cyan) / .23); }

.hero-statement {
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  color: rgb(var(--holo-ink));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-style: italic;
}

.hero-intro { max-width: 42rem; margin: 1rem 0 0; color: rgb(var(--holo-dim)); font-size: 1.08rem; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }

.primary-action,
.text-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-action {
  padding: .75rem 1.2rem;
  border: 1px solid rgb(var(--holo-cyan) / .55);
  border-radius: .25rem;
  background: rgb(var(--holo-cyan) / .1);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 0 28px rgb(var(--holo-cyan) / .08);
}

.primary-action:hover { background: rgb(var(--holo-cyan) / .17); border-color: rgb(var(--holo-cyan)); }
.text-action { color: rgb(var(--holo-dim)); }
.text-action:hover { color: rgb(var(--holo-ink)); }

/* Adapted panel surface. The resting state is complete without JavaScript. */
.holopanel {
  position: relative;
  isolation: isolate;
  border: 1px solid rgb(var(--holo-glow) / .3);
  border-radius: .9rem;
  background: linear-gradient(158deg, rgb(var(--holo-panel) / .96), rgb(6 10 18 / .98));
  box-shadow: 0 18px 50px rgb(0 0 0 / .45), 0 0 60px rgb(var(--holo-glow) / .07), inset 0 1px 0 rgb(var(--holo-line) / .1);
}

.holopanel::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--holo-line) / .95), transparent);
  box-shadow: 0 0 12px rgb(var(--holo-beam) / .55);
  pointer-events: none;
}

.signal-panel { padding: clamp(1.4rem, 3vw, 2rem); }
.signal-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.35; }
.signal-panel > a { display: inline-block; margin-top: 1.4rem; color: rgb(var(--holo-cyan)); font-size: .9rem; text-decoration: none; }
.signal-data { margin: 1.5rem 0 0; }
.signal-data div { display: grid; grid-template-columns: minmax(6rem, .7fr) 1.5fr; gap: .75rem; padding: .7rem 0; border-top: 1px solid rgb(var(--holo-line) / .09); }
.signal-data dt, .card-meta dt { color: rgb(var(--holo-dim)); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.signal-data dd { margin: 0; font-size: .9rem; }

.exhibition { padding-block: clamp(4rem, 8vw, 8rem); border-top: 1px solid rgb(var(--holo-line) / .11); }
.section-heading { display: grid; grid-template-columns: minmax(0, .9fr) minmax(18rem, 1.1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-heading h2, .invitation h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 340; letter-spacing: -.04em; line-height: 1; }
.section-heading > p { max-width: 42rem; margin: 0; color: rgb(var(--holo-dim)); font-size: 1.05rem; }

.artwork-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }

/* Adapted tinted-card behavior. One card tint drives surface glow and shadow. */
.holotint {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgb(var(--holo-line) / .11);
  border-radius: 1rem;
  background: rgb(var(--holo-line) / .035);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .5s ease, box-shadow .5s ease;
}

.holotint::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(110% 75% at 15% 0%, var(--holotint), transparent 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.holotint > * { position: relative; z-index: 1; }
.holotint:hover, .holotint:focus-within, .holotint.holo-on { transform: translateY(-5px); border-color: rgb(var(--holo-line) / .25); box-shadow: 0 24px 65px -36px var(--holotint-solid); }
.holotint:hover::after, .holotint:focus-within::after, .holotint.holo-on::after { opacity: 1; }

.artwork-card { display: flex; flex-direction: column; padding: 1rem 1.25rem 1.35rem; }
.work-signal { position: relative; min-height: 12rem; margin: -.15rem -.4rem 1.25rem; overflow: hidden; border: 1px solid rgb(var(--holo-line) / .08); border-radius: .65rem; background: radial-gradient(circle at 50% 46%, var(--holotint-solid), transparent 7%, rgb(4 8 14 / .25) 28%, rgb(4 8 14 / .75) 70%); }
.work-signal::before, .work-signal::after, .work-signal span { content: ""; position: absolute; inset: 50%; border: 1px solid var(--holotint-solid); border-radius: 50%; transform: translate(-50%, -50%); opacity: .42; }
.work-signal::before { width: 7.5rem; height: 7.5rem; }
.work-signal::after { width: 4.3rem; height: 4.3rem; border-style: dashed; }
.work-signal span { width: 1rem; height: 1rem; box-shadow: 0 0 30px var(--holotint-solid); }
.signal-gift::before { border-radius: 15%; transform: translate(-50%, -50%) rotate(45deg); }
.signal-gift::after { border-radius: 15%; transform: translate(-50%, -50%) rotate(-10deg); }
.signal-continuity::before, .signal-continuity::after { border-radius: 0; border-width: 0 0 1px; transform: translate(-50%, -50%) rotate(-18deg); }
.signal-continuity::after { transform: translate(-50%, -50%) rotate(18deg); }
.signal-letters::before { width: 8rem; height: 5rem; border-radius: .2rem; transform: translate(-50%, -50%) rotate(-4deg); }
.signal-letters::after { width: 6rem; height: 3rem; border-radius: .2rem; transform: translate(-38%, -38%) rotate(7deg); }
.signal-garden::before { width: 3rem; height: 7rem; border-radius: 50% 0; transform: translate(-90%, -53%) rotate(-34deg); }
.signal-garden::after { width: 3rem; height: 7rem; border-radius: 0 50%; transform: translate(-10%, -53%) rotate(34deg); }
.signal-unoptimized::before { width: 7rem; height: 7rem; border-radius: 0; transform: translate(-50%, -50%) rotate(11deg); }
.signal-unoptimized::after { width: 5.2rem; height: 5.2rem; border-radius: 0; transform: translate(-50%, -50%) rotate(38deg); }

.card-index { display: flex; justify-content: space-between; gap: 1rem; color: rgb(var(--holo-dim)); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.card-index span:last-child { text-align: right; }
.artwork-card h3 { margin: 1rem 0 .65rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 400; line-height: 1.18; }
.artwork-card > p { margin: 0; color: rgb(var(--holo-dim)); font-size: 1rem; }
.card-meta { margin: 1.4rem 0 0; padding-top: 1rem; border-top: 1px solid rgb(var(--holo-line) / .09); }
.card-meta div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .5rem; }
.card-meta div + div { margin-top: .35rem; }
.card-meta dd { min-width: 0; margin: 0; font-size: .875rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin-top: auto; padding-top: 1.35rem; }
.card-actions a { min-height: 2.75rem; display: inline-flex; align-items: center; color: rgb(var(--holo-cyan)); font-size: .88rem; font-weight: 650; text-decoration: none; }
.card-actions a:not(:first-child) { color: rgb(var(--holo-dim)); }
.card-actions a:hover { text-decoration: underline; text-underline-offset: .25rem; }

/* Adapted scan-pass. It runs once per hover, keyboard focus, or touch state. */
.holoscan > .holoscan-line { position: absolute; left: 0; right: 0; top: 0; height: 9%; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, rgb(var(--holo-cyan) / .14), transparent); }
@keyframes holoscan-pass { from { transform: translateY(-100%); opacity: 0; } 12%, 88% { opacity: 1; } to { transform: translateY(1100%); opacity: 0; } }
.holoscan:hover > .holoscan-line, .holoscan:focus-within > .holoscan-line, .holoscan.holo-on > .holoscan-line { animation: holoscan-pass 1600ms cubic-bezier(.22, .9, .28, 1); }

.invitation { margin-block: clamp(1rem, 4vw, 4rem) clamp(5rem, 9vw, 8rem); padding: clamp(2rem, 6vw, 5rem); }
.invitation > p:not(.eyebrow) { max-width: 48rem; color: rgb(var(--holo-dim)); font-size: 1.05rem; }

footer { min-height: 7rem; border-top: 1px solid rgb(var(--holo-line) / .1); color: rgb(var(--holo-dim)); }
footer p { margin: 0; }
footer p span { color: rgb(var(--holo-ink)); font-weight: 650; }

.exhibition-page { padding-block: clamp(3rem, 7vw, 7rem); }
.exhibition-intro { padding: clamp(2rem, 6vw, 5rem); }
.exhibition-intro h1 { max-width: 12ch; font-size: clamp(3rem, 8vw, 7rem); }
.exhibition-intro > p:not(.eyebrow, .hero-statement) { max-width: 52rem; color: rgb(var(--holo-dim)); font-size: 1.05rem; }
.preview-list { max-width: 62rem; margin: 4rem auto 0; }
.preview-list article { padding: clamp(2.5rem, 6vw, 5rem) 0; scroll-margin-top: 2rem; border-top: 1px solid rgb(var(--holo-line) / .12); }
.preview-list h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 5vw, 4rem); font-weight: 400; line-height: 1.1; }
.preview-list article > p:not(.eyebrow) { max-width: 48rem; color: rgb(var(--holo-dim)); font-size: 1.08rem; }
.preview-list dl { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.5rem 0 0; }
.preview-list dl div { min-width: 9rem; }
.preview-list dt { color: rgb(var(--holo-dim)); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.preview-list dd { margin: .2rem 0 0; }

@media (max-width: 68rem) {
  .artwork-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 48rem) {
  .site-header, footer { align-items: flex-start; flex-direction: column; }
  .site-header nav { width: 100%; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 3.5rem; }
  .signal-panel { max-width: 34rem; }
  .section-heading { grid-template-columns: 1fr; }
  .artwork-grid { grid-template-columns: 1fr; }
  .work-signal { min-height: 10rem; }
}

@media (max-width: 26rem) {
  .hero h1 { font-size: clamp(3rem, 17vw, 4.3rem); }
  nav { gap: .6rem 1rem; }
  .signal-data div { grid-template-columns: 1fr; gap: .1rem; }
  .hero-actions > * { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .holotint:hover, .holotint:focus-within, .holotint.holo-on { transform: none; }
  .holoscan > .holoscan-line { display: none; }
}

/* ---------------------------------------------------------------------------
 * Phase 2: artwork pages, gallery index, and the trust notice.
 * Continues the adapted panel-surface and tinted-card system above.
 * ------------------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-block: 1.5rem 0;
  color: rgb(var(--holo-dim));
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.breadcrumb a { color: rgb(var(--holo-dim)); text-decoration: none; }
.breadcrumb a:hover { color: rgb(var(--holo-ink)); text-decoration: underline; text-underline-offset: .25rem; }
.breadcrumb [aria-current] { color: rgb(var(--holo-ink)); }

.work-header { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }

.work-header h1 {
  max-width: 18ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.02;
}

.work-subtitle {
  max-width: 46rem;
  margin: 1.25rem 0 0;
  color: rgb(var(--holo-dim));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(17rem, .7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.work-column { min-width: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }

/* Grid items default to min-width:auto, so the preformatted work would size the
   whole track to its longest line and get clipped by the body. Let them shrink;
   the work scrolls inside its own box instead. */
.work-column > * { min-width: 0; }

/* The trust notice is a resting state, never a dismissible overlay. */
.trust-notice {
  padding: 1.15rem 1.35rem;
  border: 1px solid rgb(255 184 104 / .34);
  border-left-width: 3px;
  border-radius: .5rem;
  background: rgb(255 184 104 / .05);
}

.trust-notice h2 {
  margin: 0 0 .5rem;
  color: rgb(255 199 138);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.trust-notice p { margin: 0; color: rgb(var(--holo-dim)); font-size: .92rem; }

/* The work itself. Line breaks are authored, so the block scrolls, not the page. */
.canonical-body {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
  overflow-x: auto;
  color: rgb(var(--holo-ink));
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.72rem, 1.55vw, .92rem);
  line-height: 1.75;
  tab-size: 2;
}

.canonical-body:focus-visible { outline: 3px solid rgb(var(--holo-cyan)); outline-offset: 3px; }

.artist-statement { padding: clamp(1.5rem, 4vw, 2.75rem); }
.artist-statement h2 { margin: 0 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 400; }
.artist-statement p { max-width: 44rem; margin: 0 0 1rem; color: rgb(var(--holo-dim)); font-size: 1rem; }
.artist-statement p:last-child { margin-bottom: 0; }

.work-meta {
  position: sticky;
  top: 1.5rem;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid rgb(var(--holo-line) / .12);
  border-radius: .9rem;
  background: rgb(var(--holo-line) / .03);
}

.work-meta h2, .work-meta h3 { margin: 0; }
.work-meta h3 { margin-top: 1.75rem; }
.work-meta .signal-data { margin-top: .75rem; }
.work-meta .signal-data div { grid-template-columns: minmax(5.5rem, .8fr) 1.2fr; }
.meta-note { margin: .6rem 0 0; color: rgb(var(--holo-dim)); font-size: .85rem; }
.meta-list { margin: .6rem 0 0; padding-left: 1.1rem; color: rgb(var(--holo-dim)); font-size: .85rem; }
.meta-list li + li { margin-top: .5rem; }

.meta-links { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid rgb(var(--holo-line) / .1); }
.meta-links li { border-bottom: 1px solid rgb(var(--holo-line) / .07); }
.meta-links a { display: flex; min-height: 2.9rem; align-items: center; color: rgb(var(--holo-cyan)); font-size: .88rem; font-weight: 650; text-decoration: none; }
.meta-links a:hover { text-decoration: underline; text-underline-offset: .25rem; }

.work-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-block: clamp(3rem, 7vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid rgb(var(--holo-line) / .11);
}

.work-pager a {
  display: grid;
  gap: .3rem;
  min-height: 3rem;
  color: rgb(var(--holo-dim));
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .75rem;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.work-pager .pager-next { margin-left: auto; text-align: right; }
.work-pager a span { color: rgb(var(--holo-ink)); font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; letter-spacing: normal; text-transform: none; }
.work-pager a:hover span { color: rgb(var(--holo-cyan)); }

.gallery-page { padding-block: clamp(2.5rem, 6vw, 5rem); }
.gallery-page > header { max-width: 52rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.gallery-page > header h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 340; letter-spacing: -.04em; line-height: 1; }
.gallery-page > header p:not(.eyebrow) { margin: 1.25rem 0 0; color: rgb(var(--holo-dim)); font-size: 1.05rem; }
.gallery-data { margin-top: clamp(3rem, 6vw, 5rem); padding: clamp(1.5rem, 4vw, 2.75rem); }
.gallery-data h2 { margin: 0 0 .75rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 400; }
.gallery-data > p { max-width: 46rem; color: rgb(var(--holo-dim)); }
.gallery-data ul { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.gallery-data a { display: inline-flex; min-height: 2.75rem; align-items: center; color: rgb(var(--holo-cyan)); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85rem; text-decoration: none; }
.gallery-data a:hover { text-decoration: underline; text-underline-offset: .25rem; }

.error-page { display: grid; align-content: center; min-height: 60vh; padding-block: clamp(3rem, 8vw, 7rem); }
.error-page h1 { max-width: 16ch; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 400; line-height: 1.05; }
.error-page p { max-width: 42rem; color: rgb(var(--holo-dim)); font-size: 1.05rem; }

@media (max-width: 62rem) {
  .work-layout { grid-template-columns: 1fr; }
  .work-meta { position: static; }
}

@media (max-width: 48rem) {
  .canonical-body { padding: 1.1rem .9rem; }
  .work-pager { flex-direction: column; }
  .work-pager .pager-next { margin-left: 0; text-align: left; }
}

/* ---------------------------------------------------------------------------
 * Work 007, From the Doorway.
 * Six pages, each the exact shape of one work in the exhibition, drawn as
 * inline SVG from the work's canonical text by scripts/from_the_doorway.py.
 * The glow is the only thing that loops, and it is ambient.
 * ------------------------------------------------------------------------ */

.doorway { margin: 0; padding: clamp(1.25rem, 3.5vw, 2.5rem); }

.doorway-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.doorway-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.75rem, 2.2vw, 1.6rem);
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doorway-page {
  display: grid;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
}

.doorway-page:focus-visible { outline-offset: 8px; }

.doorway-page svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}

.doorway-sheet { fill: currentColor; fill-opacity: .04; stroke: currentColor; stroke-opacity: .18; stroke-width: .35; }

.doorway-glow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  opacity: .5;
  animation: doorway-breathe 16s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

.doorway-ink { fill: none; stroke: currentColor; stroke-width: .75; opacity: .9; transition: opacity .5s ease; }

@keyframes doorway-breathe {
  from { opacity: .3; }
  to { opacity: .62; }
}

.doorway-page:hover svg,
.doorway-page:focus-visible svg { transform: translateY(-4px); }

.doorway-page:hover .doorway-ink,
.doorway-page:focus-visible .doorway-ink { opacity: 1; }

.doorway-label {
  color: rgb(var(--holo-dim));
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.doorway-number { display: block; color: var(--ink); }

.doorway-page:hover .doorway-label,
.doorway-page:focus-visible .doorway-label { color: rgb(var(--holo-ink)); }

.doorway figcaption { max-width: 46rem; margin: 1.6rem 0 0; color: rgb(var(--holo-dim)); font-size: .92rem; }

/* The text form of the work is long. It scrolls inside its frame so the
   statement and data stay reachable; the complete file is linked beneath. */
.canonical-body-windowed { max-height: min(42rem, 70vh); overflow-y: auto; }

.canonical-body-windowed + .meta-note { margin-top: .75rem; }
.canonical-body-windowed + .meta-note a { color: rgb(var(--holo-cyan)); text-decoration: none; }
.canonical-body-windowed + .meta-note a:hover { text-decoration: underline; text-underline-offset: .25rem; }

/* Card glyph: a door frame, and the far away lines of a page seen through it. */
.signal-doorway::before { width: 4.6rem; height: 7.2rem; border-radius: .25rem .25rem 0 0; }
.signal-doorway::after {
  width: 2.9rem;
  height: 4.6rem;
  border: 0;
  border-radius: 0;
  background: repeating-linear-gradient(to bottom, var(--holotint-solid) 0 1px, transparent 1px 5px);
  mask-image: linear-gradient(90deg, black 0 62%, transparent 62% 70%, black 70% 88%, transparent 88%);
  opacity: .5;
}

@media (max-width: 48rem) {
  .doorway-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doorway { padding: 1.1rem .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .doorway-glow { animation: none; opacity: .5; }
  .doorway-page:hover svg, .doorway-page:focus-visible svg { transform: none; }
}

/* The seventh card spans the grid and carries the six shapes themselves. */
.artwork-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
}

.artwork-card-wide .card-copy { display: flex; flex-direction: column; min-width: 0; min-height: 100%; }
.artwork-card-wide .card-copy > .card-index { margin-top: .15rem; }
.artwork-card-wide .card-doorway { min-width: 0; padding-top: .25rem; }

@media (max-width: 62rem) {
  .artwork-card-wide { grid-template-columns: 1fr; }
}
