/* POISE (/p9/): a paper mobile on a crimson wall. The drawing is live WebGL (mobile.js); this sheet sets the type, the
   layers that ride on it and the readable page without JavaScript. */
@font-face { font-family: 'Inter'; src: url('fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --wall: #4a0910; --wall-2: #5d0b14; --deep: #2c0408; --pink: #eba797; --pink-2: #f6cfc4; --ink: #4a0c12; --ink-2: #7a2a30; --orange: #ef6526;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wall); color: var(--pink-2); font-family: var(--sans); font-size: 17px; line-height: 1.5; letter-spacing: -.005em; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--pink-2); color: var(--ink); padding: 10px 16px; border-radius: 999px; font: 600 13px var(--sans); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--pink-2); outline-offset: 3px; }
html:not(.js) .js-only { display: none !important; }
html.js .nojs-only { display: none !important; }

/* ---------------------------------------------------------------- header */
.top { position: absolute; inset: 0 0 auto 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: max(20px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-right)) 0 max(31px, env(safe-area-inset-left)); pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: baseline; gap: 16px; text-decoration: none; font-size: 15px; letter-spacing: 0; }
.brand strong { font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.slash { opacity: .85; margin-left: 4px; }
.tools { display: flex; align-items: center; gap: 54px; }
.search { position: relative; display: flex; align-items: center; gap: 10px; width: 231px; height: 34px; padding: 0 14px; border: 1px solid rgba(246, 207, 196, .55); border-radius: 999px; }
.search:focus-within { border-color: var(--pink-2); background: rgba(246, 207, 196, .06); }
.search-icon { display: grid; place-items: center; cursor: text; }
.search-icon svg, .overview svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; font: 400 12.5px var(--sans); color: var(--pink-2); }
.search input::placeholder { color: var(--pink-2); opacity: .85; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.results { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; margin: 0; padding: 8px; list-style: none; background: rgba(250, 230, 222, .98); color: var(--ink);
  border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(20, 0, 4, .7); }
.results li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.results li[aria-selected="true"] { background: rgba(239, 101, 38, .14); }
.r-label { font: 600 15px var(--sans); }
.r-kind { font: 500 10.5px var(--sans); letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; }
.r-none { color: var(--ink-2); cursor: default; }
.overview { display: inline-flex; align-items: center; gap: 12px; padding: 4px 0; border: 0; background: none; cursor: pointer; font: 500 13px var(--sans); text-decoration: none; }
.overview:hover svg { transform: rotate(-40deg); }
.overview svg { transition: transform .4s ease; }

/* ---------------------------------------------------------------- stage */
.stage { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; }
/* the room's light falls off toward the corners and glows on the floor, as in the reference */
.gl-ready .scene::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 40% at 38% 100%, rgba(214, 56, 60, .42), rgba(214, 56, 60, 0) 70%), radial-gradient(120% 110% at 45% 55%, rgba(24, 0, 8, 0) 45%, rgba(24, 0, 8, .5) 100%); }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; transition: opacity .9s ease; }
#mob { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; touch-action: pan-y; }
.gl-ready #mob { opacity: 1; }
.gl-ready .poster { opacity: 0; }
.focus-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.focus-ring polygon { fill: none; stroke: var(--pink-2); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(255, 200, 180, .8)); }

/* the word links: positioned and clipped by p9.js over the bowls */
.words ul { list-style: none; margin: 0; padding: 0; }
.gl-ready .words a { position: absolute; z-index: 2; display: block; color: transparent; font-size: 1px; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gl-ready .words a:focus-visible { outline: none; }
html:not(.gl-ready) .words { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; max-width: calc(100% - 32px); }
html:not(.gl-ready) .words ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
html:not(.gl-ready) .words a { display: block; padding: 7px 18px; font: 500 16px var(--sans); background: var(--pink); color: var(--ink); border-radius: 999px; text-decoration: none; box-shadow: 0 8px 20px -10px rgba(20, 0, 4, .8); }

/* the motto and the tagline */
.motto { position: absolute; z-index: 5; top: 88px; left: 63.6%; margin: 0; padding: 2px 0 4px 31px; border-left: 2px solid rgba(246, 207, 196, .75); font: 400 17.5px/1.4 var(--sans); letter-spacing: -.01em; }
.tagline { position: absolute; z-index: 5; left: max(58px, env(safe-area-inset-left)); bottom: max(86px, calc(env(safe-area-inset-bottom) + 70px)); margin: 0; font: 400 16px/1.32 var(--sans); }
.tagline::after { content: ''; display: block; width: 24px; height: 1.5px; margin-top: 20px; background: currentColor; opacity: .8; }

/* ---------------------------------------------------------------- the panels: text in the porthole */
.panels { position: relative; z-index: 4; }
.title { font: 700 32px/1.1 var(--sans); letter-spacing: -.025em; margin: 0; }
.type { font: 400 17px/1.4 var(--sans); margin: 8px 0 0; }
.line { font: 400 17px/1.45 var(--sans); margin: 12px 0 0; max-width: 34ch; }
.count { font: 600 11px var(--sans); letter-spacing: .14em; margin: 0 0 10px; opacity: .7; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 26px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 22px; white-space: nowrap; padding: 12px 22px 12px 28px; border: 0; border-radius: 999px; background: #5b0d16; color: #f6d6cc;
  font: 500 14.5px var(--sans); text-decoration: none; cursor: pointer; transition: background .25s, transform .25s; box-shadow: 0 10px 22px -14px rgba(40, 0, 6, .9); }
.pill svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.pill:hover { background: #73111c; } .pill:hover svg { transform: translateX(3px); }
.text-link { font: 500 15px var(--sans); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.small { font: 500 12px var(--sans); letter-spacing: .04em; opacity: .8; margin: 14px 0 0; }
.notes { margin: 16px 0 0; display: grid; gap: 8px; }
.notes div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; }
.notes dt { font: 600 10.5px/2 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.notes dd { margin: 0; font-size: 15.5px; }

/* the live layout: one panel at a time in the porthole, sized with it (--u is one pixel of the reference's porthole) */
.gl-ready .panels { position: absolute; left: var(--ax, 22%); top: var(--ay, 70%); width: calc(var(--u, 1px) * 480); z-index: 4; color: var(--ink); pointer-events: none; }
.gl-ready .panel { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; visibility: hidden; transform: translateY(calc(var(--u, 1px) * 14));
  transition: opacity .24s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .24s; }
.gl-ready .panel.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease .55s, transform .8s cubic-bezier(.2, .7, .2, 1) .55s, visibility 0s; pointer-events: auto; }
.gl-ready .is-moving .panel.is-on { transition-delay: .95s, .95s, 0s; }
.gl-ready .photo, .gl-ready .item { display: none; }
.gl-ready .item.is-on { display: block; animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.gl-ready .item .count { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(calc(var(--u, 1px) * 10)); } to { opacity: 1; transform: none; } }
.gl-ready .panels .title { font-size: max(20px, calc(var(--u) * 29)); }
.gl-ready .panels .type, .gl-ready .panels .line { font-size: max(12.5px, calc(var(--u) * 17)); margin-top: calc(var(--u) * 7); }
.gl-ready .panels .line { max-width: calc(var(--u) * 360); margin-top: calc(var(--u) * 10); }
.gl-ready .panels .actions { margin-top: calc(var(--u) * 26); gap: calc(var(--u) * 12) calc(var(--u) * 20); }
.gl-ready .panels .pill { font-size: max(12px, calc(var(--u) * 14.5)); padding: calc(var(--u) * 12) calc(var(--u) * 22) calc(var(--u) * 12) calc(var(--u) * 28); gap: calc(var(--u) * 22); }
.gl-ready .panels .pill svg { width: max(15px, calc(var(--u) * 19)); height: max(15px, calc(var(--u) * 19)); }
.gl-ready .panels .text-link, .gl-ready .panels .small { font-size: max(12px, calc(var(--u) * 14.5)); }
/* a pale glow behind the text, for the busier pictures */
.gl-ready .panel::before { content: ''; position: absolute; z-index: -1; left: calc(var(--u) * -70); top: calc(var(--u) * -50); width: calc(var(--u) * 560); height: calc(100% + var(--u) * 100);
  background: radial-gradient(closest-side, rgba(250, 224, 214, .38) 30%, rgba(250, 224, 214, 0)); pointer-events: none; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.gl-ready .pager { position: absolute; left: calc(var(--u) * 214); bottom: calc(var(--u) * 7); margin: 0; gap: calc(var(--u) * 10); }
.pager-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(74, 12, 18, .35); background: rgba(255, 240, 234, .35); cursor: pointer; transition: background .2s, border-color .2s; }
.pager-btn:hover { background: rgba(255, 240, 234, .7); border-color: var(--ink); }
.pager-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pager-dots { font: 600 11px var(--sans); letter-spacing: .16em; min-width: 5.5em; text-align: center; }

/* ---------------------------------------------------------------- the view cards */
.views { position: absolute; z-index: 5; right: max(44px, env(safe-area-inset-right)); bottom: max(80px, calc(env(safe-area-inset-bottom) + 64px)); display: flex; gap: 14px; }
.view-card { display: flex; flex-direction: column; gap: 15px; width: 206px; text-decoration: none; font: 500 13.5px var(--sans); }
.view-card img { display: block; width: 100%; height: auto; aspect-ratio: 410 / 270; object-fit: cover; border: 1px solid rgba(246, 207, 196, .62); border-radius: 9px; transition: transform .3s, border-color .3s; }
.view-card:hover img { transform: translateY(-3px); border-color: var(--pink-2); }
.view-card span { padding-left: 6px; }
.view-card span::after { content: ''; display: block; width: 24px; height: 1.5px; margin-top: 10px; background: currentColor; opacity: 0; transition: opacity .3s; }
.view-card[aria-current="page"] span::after { opacity: .85; }
.concept { position: absolute; z-index: 5; right: max(44px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); margin: 0; font: 500 11px var(--sans); letter-spacing: .02em; color: rgba(246, 207, 196, .62); }
.concept a { text-underline-offset: 3px; }

/* ---------------------------------------------------------------- the sheet and the overview */
dialog { border: 0; padding: 0; color: var(--ink); background: #fbe9e3; border-radius: 18px; box-shadow: 0 40px 120px -30px rgba(20, 0, 4, .8); max-width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgba(30, 2, 6, .55); backdrop-filter: blur(4px); }
.sheet { width: min(1060px, calc(100vw - 32px)); overflow: auto; }
.sheet-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); position: relative; }
.sheet-figure { margin: 0; background: #4a0910; }
.sheet-figure img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.sheet-text { padding: 46px 44px 34px; }
.kicker { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0; color: var(--ink-2); }
.sheet-text .title { font-size: 40px; margin: 14px 0 6px; }
.sheet-text .story { font-size: 17px; line-height: 1.6; margin: 20px 0 0; }
.sheet-h { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 26px 0 0; color: var(--ink-2); }
.process { margin: 12px 0 0; padding-left: 1.2em; } .process li { margin: 6px 0; }
.principles { margin: 12px 0 0; padding-left: 1.1em; }
.sheet-note { font: 500 12px/1.6 var(--sans); color: var(--ink-2); margin: 26px 0 0; }
.sheet-nav[hidden] { display: none; }
.sheet-nav { display: flex; justify-content: space-between; margin: 22px 0 0; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font: 600 14px var(--sans); padding: 6px 2px; }
.text-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(251, 233, 227, .92); }
.sheet-close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.index-inner { padding: 32px 38px 30px; overflow: auto; max-height: calc(100dvh - 32px); width: min(1100px, calc(100vw - 32px)); }
.index-head { display: flex; justify-content: space-between; align-items: center; }
.index-head h2 { font: 700 34px var(--sans); letter-spacing: -.02em; margin: 0; }
.index-head .sheet-close { position: static; }
.index-group { font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 24px 0 12px; }
.index-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.index-grid a { display: block; text-decoration: none; }
.index-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: #4a0910; transition: transform .3s; }
.index-grid a:hover img { transform: translateY(-3px); }
.ix-name { display: block; font: 700 17px var(--sans); margin-top: 10px; letter-spacing: -.01em; }
.ix-type { display: block; font: 500 12.5px var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- without the live drawing: a readable page */
html:not(.gl-ready) .stage { min-height: 0; overflow: visible; }
html:not(.gl-ready) .scene { position: relative; height: min(66.7vw, 92vh); min-height: 300px; }
html:not(.gl-ready) .motto { position: static; margin: 26px auto 0; max-width: 1040px; border: 0; padding: 0 20px; }
html:not(.gl-ready) .panels { max-width: 1040px; margin: 0 auto; padding: 18px max(20px, env(safe-area-inset-left)) 40px; }
html:not(.gl-ready) .panel { padding: 34px 0; border-top: 1px solid rgba(246, 207, 196, .2); }
html:not(.gl-ready) .item { margin-bottom: 40px; }
html:not(.gl-ready) .photo { display: block; width: min(520px, 100%); height: auto; border-radius: 50%; margin-bottom: 20px; }
html:not(.gl-ready) .pill { background: var(--pink); color: var(--ink); }
html:not(.gl-ready) .views { display: none; }
html:not(.gl-ready) .tagline, html:not(.gl-ready) .concept { position: static; padding: 0 20px 30px; max-width: 1040px; margin: 0 auto; }
html:not(.gl-ready) .tagline::after { display: none; }
html.js:not(.gl-ready):not(.no-gl) .panels { visibility: hidden; }

/* ---------------------------------------------------------------- phones and narrow windows */
@media (max-width: 1100px) and (min-width: 761px) { .motto { left: auto; right: 44px; } .views { display: none; } }
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
  .brand { gap: 10px; font-size: 13px; } .brand strong { font-size: 16px; }
  .tools { gap: 18px; }
  .search { width: 34px; padding: 0; justify-content: center; border-color: transparent; transition: width .3s; }
  .search input { width: 0; flex: 0 0 0; }
  .search:focus-within { width: 170px; padding: 0 12px; justify-content: flex-start; border-color: rgba(246, 207, 196, .55); }
  .search:focus-within input { flex: 1; width: auto; }
  .search:focus-within ~ .overview { display: none; }
  .results { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; }
  .motto { display: none; }
  .gl-ready .stage { min-height: 0; overflow: visible; }
  .gl-ready .scene { position: relative; height: 76svh; min-height: 520px; max-height: 820px; }
  .gl-ready .panels { position: relative; left: auto; top: auto; width: auto; color: var(--pink-2); padding: 6px max(20px, env(safe-area-inset-left)) 18px; pointer-events: auto; }
  .gl-ready .panel { position: relative; display: none; transform: none; opacity: 1; visibility: visible; transition: none; }
  .gl-ready .panel.is-on { display: block; }
  .gl-ready .panel::before { display: none; }
  .gl-ready .panels .title { font-size: 32px; }
  .gl-ready .panels .type, .gl-ready .panels .line { font-size: 17px; max-width: none; }
  .gl-ready .panels .actions { margin-top: 22px; gap: 14px 22px; }
  .gl-ready .panels .pill { font-size: 15px; padding: 12px 20px 12px 26px; gap: 18px; background: var(--pink); color: var(--ink); }
  .gl-ready .panels .pill svg { width: 19px; height: 19px; }
  .gl-ready .panels .text-link, .gl-ready .panels .small { font-size: 15px; }
  .gl-ready .pager { position: static; margin-top: 16px; }
  .gl-ready .pager-btn { border-color: rgba(246, 207, 196, .4); background: none; }
  .tagline { position: static; padding: 18px max(20px, env(safe-area-inset-left)) 6px; }
  .views { position: static; padding: 14px max(20px, env(safe-area-inset-left)) 6px; gap: 12px; }
  .view-card { flex: 1; width: auto; }
  .concept { position: static; padding: 16px 20px 32px; }
  .sheet-inner { grid-template-columns: 1fr; }
  .sheet-figure img { aspect-ratio: 4 / 3; }
  .sheet-text { padding: 26px 22px 24px; }
  .sheet-text .title { font-size: 32px; }
  dialog { max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow: auto; border-radius: 16px; }
  .index-inner { padding: 22px 18px; width: calc(100vw - 16px); }
  .index-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
