/* Dana Wilcher Art: her Gallery, the walk through the years. css/site.css comes first.
   From her confirmed mockup, docs/mockups/telify-web/dana-wilcher/gallery.html. */

/* Her bar stays at the top on every page but this one: the walk fills the screen (Gabriel 2026-10-21: "i want the nav
   bar to stay there as you scroll. except for the gallery experience") */
.topbar { position: relative; }

/* ---------- the heading and the filter ---------- */
.g-head { padding: 28px 0 34px; }
.g-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.g-head h1 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(60px, 7.4vw, 108px); line-height: 0.95; letter-spacing: -0.015em; }
.g-head .lede { margin: 18px 0 0; font-family: var(--serif); font-size: clamp(21px, 1.9vw, 26px); line-height: 1.45; color: var(--ink-2); max-width: 30em; }
.g-tools { display: grid; gap: 14px; justify-items: end; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid rgba(230, 212, 166, 0.3); background: rgba(30, 24, 20, 0.35); }
.seg button { height: 38px; padding: 0 18px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); font-size: 14px; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: rgba(230, 212, 166, 0.14); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(230, 212, 166, 0.5); }
.seg button .n { color: var(--ink-3); margin-left: 6px; font-variant-numeric: tabular-nums; }

/* ---------- a painting in its frame: the detail, and the drawn walk where WebGL is missing ---------- */
.frame { position: absolute; padding: 0; border: 0; cursor: pointer; background: #0a0605; box-shadow: 0 26px 50px rgba(6, 3, 2, 0.62), 0 4px 10px rgba(6, 3, 2, 0.5); transition: opacity .5s, filter .5s; }
/* a light pool on the wall above each painting, fading out well inside its box so no edge shows */
.frame::before { content: ""; position: absolute; left: -45%; right: -45%; top: -240px; bottom: -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 42% 38% at 50% 32%, rgba(255, 226, 170, 0.17), rgba(255, 226, 170, 0.05) 55%, transparent 72%); }
.frame img { position: absolute; inset: var(--fw); width: calc(100% - 2 * var(--fw)); height: calc(100% - 2 * var(--fw)); object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 2px 4px 8px rgba(0, 0, 0, 0.75); pointer-events: none; }
.frame .lip { position: absolute; inset: 0; border: calc(var(--fw) * 0.56) solid; border-color: #93593d #6b3f2a #4c2c1d #7c4a33; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }

/* ---------- the walk through the years ---------- */
.walk { position: relative; border-top: 1px solid rgba(187, 148, 104, 0.18); }
/* the hall is as tall as the screen with the browser's bars put away (lvh), so no strip of page shows under it when a
   phone's bars slide away; what sits along its bottom keeps clear of the bars while they show (--bars) (Gabriel
   2026-11-02: "the bottom panel in Safari drops out. But then it leaves a big blank brown space where it was") */
.walk-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; --bars: calc(100lvh - 100svh); overflow: hidden; background: #120A09; }
/* the whole hall (walls, paintings on them, spotlights, plaques, the polished floor) is drawn on one canvas */
.room { position: absolute; inset: 0; width: 100%; height: 100%; }
.room.over-art { cursor: pointer; }
/* each painting is also a real button, for keyboards and screen readers */
.sr-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sr-list button:focus { position: fixed; left: 16px; top: 16px; width: auto; height: auto; clip-path: none; z-index: 5; }
.hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 28px calc(28px + var(--bars, 0px)); display: flex; justify-content: space-between; align-items: end; gap: 20px; pointer-events: none; z-index: 2;
  background: linear-gradient(0deg, rgba(14, 9, 8, 0.75), transparent); padding-top: 80px; }
.hud .now { pointer-events: auto; }
.hud .now i { display: block; font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; color: var(--ink); }
.hud .now span { font-size: 14px; letter-spacing: 0.06em; color: var(--ink-3); }
.hud .now button { margin-top: 12px; }
.years { position: absolute; right: 22px; top: 50%; translate: 0 -50%; display: grid; gap: 2px; z-index: 2; }
.years button { border: 0; background: none; color: var(--ink-3); font-size: 13px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; padding: 3px 6px; cursor: pointer; text-align: right; transition: color .2s; }
.years button[aria-current] { color: var(--wheat); }
.walk-start { position: absolute; left: 50%; top: 18%; translate: -50% 0; text-align: center; pointer-events: none; transition: opacity .4s; z-index: 1;
  padding: 16px 28px; border-radius: 20px; background: rgba(14, 9, 8, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.walk-start p { margin: 0; font-family: var(--serif); font-size: 24px; color: var(--ink-2); }
.walk-start span { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--camel); }

/* the hall in 3D: a vignette, and the panel beside a painting you stand at */
.walk-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 80% 75% at 50% 48%, transparent 55%, rgba(6, 3, 2, 0.5)); }
.hud, .years, .walk-start { transition: opacity .4s ease; }
.walk-stage.viewing .hud, .walk-stage.viewing .years, .walk-stage.viewing .walk-start { opacity: 0 !important; pointer-events: none; }
.vpanel { position: absolute; z-index: 3; top: 0; bottom: 0; right: 0; width: min(48vw, 680px); padding: 8vh max(4vw, 40px) 6vh 4vw; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  background: linear-gradient(90deg, rgba(13, 8, 7, 0), rgba(13, 8, 7, 0.7) 20%, rgba(13, 8, 7, 0.86));
  opacity: 0; translate: 28px 0; transition: opacity .5s ease, translate .6s cubic-bezier(.2, .7, .2, 1); }
.vpanel.open { opacity: 1; translate: 0 0; transition-delay: .45s; }
.v-in { margin: auto 0; }
.vpanel h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(40px, 3.6vw, 56px); line-height: 1; outline: none; }
.walk-stage canvas.room { touch-action: pan-y; }
.v-back { position: absolute; z-index: 4; top: 20px; left: 20px; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  border: 1px solid rgba(230, 212, 166, 0.5); background: rgba(20, 14, 12, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s ease; }
.v-back.open { opacity: 1; transition-delay: .3s; }
.v-back svg { width: 28px; height: 28px; }
.sound { position: absolute; z-index: 2; top: 20px; right: 22px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid rgba(230, 212, 166, 0.4); background: rgba(20, 14, 12, 0.6); color: var(--ink-2); font-size: 13.5px; letter-spacing: 0.04em; transition: opacity .4s, color .2s, border-color .2s; }
.sound svg { width: 18px; height: 18px; }
/* back up to her header from anywhere down the hall (Gabriel 2026-10-26); the painting's own back arrow takes this corner while you stand at one */
.g-exit { position: absolute; z-index: 2; top: 20px; left: 22px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid rgba(230, 212, 166, 0.4); background: rgba(20, 14, 12, 0.6); color: var(--ink-2); font-size: 13.5px; letter-spacing: 0.04em; transition: opacity .4s; }
.g-exit svg { width: 16px; height: 16px; }
.walk-stage.viewing .g-exit { opacity: 0; pointer-events: none; }
.sound[aria-pressed="true"] { color: var(--wheat); border-color: rgba(230, 212, 166, 0.75); }
.walk-stage.viewing .sound { opacity: 0; pointer-events: none; }
/* until the first painting has loaded: a turning ring and "Curating the gallery" in place of Scroll to walk (Gabriel 2026-10-26) */
.walk-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 22px; pointer-events: none; transition: opacity .6s ease; }
.walk-loading p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--ink-2); }
.walk-loading .spin { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(230, 212, 166, 0.18); border-top-color: var(--wheat); animation: walk-spin 1.1s linear infinite; }
@keyframes walk-spin { to { transform: rotate(1turn); } }
.walk-stage:not(.loading) .walk-loading { opacity: 0; }
.walk-stage.loading .walk-start, .walk-stage.loading .hud, .walk-stage.loading .years, .walk-stage.loading .sound { visibility: hidden; }
.walk-start .ws-music { margin-top: 10px; font-family: var(--sans); font-size: 14px; letter-spacing: 0.04em; color: var(--camel); }
.v-nav { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 34px; }
.v-nav button { height: 44px; border-radius: 999px; border: 1px solid rgba(230, 212, 166, 0.4); background: rgba(30, 24, 20, 0.6); color: var(--ink); cursor: pointer; padding: 0 18px; font-size: 14px; letter-spacing: 0.04em; }
.v-nav button:disabled { opacity: .4; cursor: default; }
.vpanel.gram .v-nav { display: none; }

/* looking closer: a big plus over a painting you can zoom into, an X while zoomed */
:root { --zoom-in: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2756%27%20height%3D%2756%27%3E%3Ccircle%20cx%3D%2728%27%20cy%3D%2728%27%20r%3D%2725%27%20fill%3D%27rgba(20%2C14%2C12%2C0.55)%27%20stroke%3D%27%23E6D4A6%27%20stroke-width%3D%271.5%27%2F%3E%3Cpath%20d%3D%27M28%2017v22M17%2028h22%27%20stroke%3D%27%23F8F3EA%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E") 28 28, zoom-in; --zoom-out: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2756%27%20height%3D%2756%27%3E%3Ccircle%20cx%3D%2728%27%20cy%3D%2728%27%20r%3D%2725%27%20fill%3D%27rgba(20%2C14%2C12%2C0.55)%27%20stroke%3D%27%23E6D4A6%27%20stroke-width%3D%271.5%27%2F%3E%3Cpath%20d%3D%27M20%2020l16%2016M36%2020L20%2036%27%20stroke%3D%27%23F8F3EA%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E") 28 28, zoom-out; }
.d-art .frame { cursor: var(--zoom-in); }
.zoom { position: fixed; z-index: 66; overflow: hidden; cursor: var(--zoom-out); touch-action: none; background: #0d0807; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); }
.zoom.full { box-shadow: none; cursor: default; }
.zoom img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-select: none; }

.walk [hidden], .zoom[hidden], .detail[hidden], .detail [hidden] { display: none !important; }

/* ---------- one painting, up close ---------- */
.detail { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); background: rgba(14, 9, 8, 0.94); opacity: 0; transition: opacity .35s ease; }
.detail.open { opacity: 1; }
.d-art { display: grid; place-items: center; padding: 6vh 3vw; min-height: 0; }
.d-art .frame { position: relative; display: block; cursor: default; transform: scale(.96); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.detail.open .d-art .frame { transform: none; }
.d-text { padding: 8vh 48px 40px 8px; overflow-y: auto; display: flex; flex-direction: column; }
/* the year, medium and size sit under the title: no small line above a heading on her pages (Gabriel 2026-10-25) */
.d-meta { margin: 14px 0 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--camel); }
.d-text h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(40px, 3.6vw, 56px); line-height: 1; }
.d-status { margin: 18px 0 0; font-size: 15px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.d-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.d-status.avail::before { background: #8FB89A; box-shadow: 0 0 10px rgba(143, 184, 154, 0.6); }
.d-poem { margin: 28px 0 0; padding-top: 26px; border-top: 1px solid var(--hair); font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; max-width: 34em; }
.d-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
/* Ask about this painting, Telify's Message the studio drawn as her button (js/gallery.js): filled where it leads */
.ask-fill [data-part="messageStudio"] { background: radial-gradient(circle at 30% 28%, #B8454A 0%, #94252A 55%, #5E1A1A 130%); border-color: rgba(187, 148, 104, 0.4); box-shadow: 0 0 26px rgba(148, 37, 42, 0.4); }
.ask [data-part="signInError"] { margin: 8px 0 0; font-size: 14px; color: #E28A8D; }
.d-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 34px; }
.d-nav button, .d-close { height: 44px; border-radius: 999px; border: 1px solid rgba(230, 212, 166, 0.4); background: rgba(30, 24, 20, 0.6); color: var(--ink); cursor: pointer; padding: 0 18px; font-size: 14px; letter-spacing: 0.04em; }
.d-close { position: absolute; top: 18px; right: 18px; width: 44px; padding: 0; display: grid; place-items: center; z-index: 2; }
.d-close svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .g-head .wrap { grid-template-columns: 1fr; }
  .g-tools { justify-items: start; }
  .hud { padding: 70px 16px calc(18px + var(--bars, 0px)); }
  .years { right: 6px; }
  .years button { font-size: 11px; padding: 1px 4px; }
  .walk-start p { font-size: 19px; }
  .v-back { top: 14px; left: 14px; width: 54px; height: 54px; }
  .sound { top: 14px; right: 14px; }
  .g-exit { top: 14px; left: 14px; }
  .vpanel { top: 50%; left: 0; width: auto; padding: 44px 16px calc(28px + var(--bars, 0px)); translate: 0 24px; background: linear-gradient(180deg, rgba(13, 8, 7, 0), rgba(13, 8, 7, 0.96) 44px, #0d0807 120px); }
  .v-in { margin: 0; }
  .vpanel h2 { font-size: 36px; }
  .detail { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .d-art { padding: 64px 16px 8px; min-height: auto; }
  .d-text { padding: 20px 16px 40px; overflow: visible; }
  .d-poem { font-size: 18.5px; }
}
@media (prefers-reduced-motion: reduce) { .detail, .d-art .frame, .frame, .vpanel { transition: none; } .walk-loading .spin { animation-duration: 3s; } }
