/* Shared identity kit for the three direction studies. Throwaway. */

/* OPERATOR Sans and Mono 1.000 (SIL OFL 1.1, see fonts/OFL.txt): variable, weights 300 to 700, no width axis */
@font-face { font-family: "OPERATOR Sans"; src: url("../fonts/operator-sans-variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "OPERATOR Mono"; src: url("../fonts/operator-mono-variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --ground: #000;
  --raised: #0d0c0a;
  --bone: #dad5cb;
  --dim: #8f8a80;
  --faint: #55514a;
  --line: rgba(218, 213, 203, 0.14);
  --line-strong: rgba(218, 213, 203, 0.32);
  --signal: #d4d0c8; /* chromate, switchable */
  --signal-ink: #000;

  --display: "OPERATOR Sans", "Helvetica Neue", Arial, sans-serif;
  --text: "OPERATOR Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "OPERATOR Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 2.4vw, 36px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

:root[data-signal="amber"] { --signal: #f2a71b; }
:root[data-signal="orange"] { --signal: #ff5a1f; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--bone);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--signal); color: var(--signal-ink); }

/* ---------- type ---------- */
/* the display face: OPERATOR Sans Bold in caps; it has no condensed width, so the caps are set tight instead */
.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.88;
}
.redact { display: inline-flex; gap: 0.32em; width: var(--w, 70%); max-width: 100%; vertical-align: middle; }
.redact i { display: block; height: 0.9em; flex: var(--f, 1) 1 0; background: var(--bone); opacity: 0.88; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.4; letter-spacing: 0; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.45; max-width: 34em; }

/* ---------- the name in the header: only as wide as the name, even as a grid item ---------- */

.brand {
  display: inline-flex; align-items: center; justify-self: start;
  text-decoration: none; font-weight: 640; letter-spacing: -0.01em;
}

/* ¬ corners: a frame built from the mark. Add .corners to any box. */
.corners { position: relative; }
.corners > .c {
  position: absolute; width: 14px; height: 9px; pointer-events: none;
  border-color: var(--line-strong); border-style: solid; border-width: 0;
  transition: border-color 240ms, width 240ms var(--ease-out), height 240ms var(--ease-out);
}
.corners > .c.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.corners > .c.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.corners > .c.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.corners > .c.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.corners.hot > .c { border-color: var(--signal); width: 22px; height: 14px; }

/* ---------- figure: the drawing that resolves ---------- */
.fig { position: relative; width: 100%; }
.fig > svg.drawing { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fig .ink { fill: none; stroke: var(--bone); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fig .ink.light { stroke: var(--line-strong); }
.fig .ink.hair { stroke: var(--line); }
.fig .ink.sig { stroke: var(--signal); }
.fig .fill-faint { fill: rgba(218, 213, 203, 0.05); stroke: none; }
.fig text {
  fill: var(--dim); font-family: var(--mono); font-size: var(--fs, 11px);
  letter-spacing: 0.02em; text-transform: uppercase;
}
.fig text.num { fill: var(--bone); text-anchor: middle; dominant-baseline: central; }

/* plotting: every stroked element has pathLength=1 */
.fig .plot { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.fig.plotted .plot { stroke-dashoffset: 0; transition: stroke-dashoffset var(--d, 900ms) var(--ease-inout) var(--w, 0ms); }
.fig .lettering { opacity: 0; }
.fig .redact-bar { fill: var(--dim); stroke: none; }
.fig.plotted .lettering { opacity: 1; transition: opacity 400ms ease var(--w, 0ms); }

.fig .media {
  position: absolute; overflow: hidden; background: #050505;
  clip-path: inset(0 0 100% 0);
}
.fig .media > video, .fig .media > img, .fig .media > iframe {
  width: 100%; height: 100%; object-fit: cover; border: 0;
}
.fig .media > iframe { pointer-events: auto; }
/* on the wall the live embed is only a preview: the page keeps the scroll, the click and the cursor */
.plate .fig .media > iframe { pointer-events: none; }
.fig.resolved .media { clip-path: inset(0 0 0 0); transition: clip-path 1100ms var(--ease-inout); }
.fig .scan {
  position: absolute; height: 1px; background: var(--signal);
  box-shadow: 0 0 12px 1px var(--signal); opacity: 0; pointer-events: none;
}
.fig.resolved .scan { animation: scan 1100ms var(--ease-inout) forwards; }
@keyframes scan {
  0% { opacity: 1; transform: translateY(0); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--scan-h)); }
}
.fig.resolved .interior { opacity: 0.12; transition: opacity 900ms ease 500ms; }

.fig .tier {
  position: absolute; left: 0; bottom: -26px;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.tier-glyph { width: 9px; height: 9px; border: 1px solid currentColor; flex: none; }
.tier-glyph.full { background: currentColor; }
.tier-glyph.abstracted { background: linear-gradient(135deg, currentColor 50%, transparent 50%); }

@media (prefers-reduced-motion: reduce) {
  .fig .plot { stroke-dashoffset: 0 !important; transition: none !important; }
  .fig .lettering { opacity: 1 !important; transition: none !important; }
  .fig .media { transition: none !important; }
  .fig.resolved .scan { animation: none; }
}

/* ---------- dossier (opened project) ---------- */
.dossier { display: grid; gap: 28px; }
.dossier h2 { margin: 0; font-size: clamp(44px, 6vw, 96px); }
.dossier .summary { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.35; margin: 0; max-width: 26em; }
.dataplate { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.dataplate dt { font-family: var(--mono); font-size: 12px; color: var(--dim); padding-top: 2px; }
.dataplate dd { margin: 0; }
.dataplate .status { display: inline-flex; align-items: center; gap: 8px; }
.notes h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: var(--dim); }
.notes ol, .notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.notes ol li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; max-width: 36em; }
.notes ul li { position: relative; padding-left: 26px; max-width: 36em; }
.notes ul li::before { content: ""; position: absolute; left: 4px; top: 0.75em; width: 10px; height: 1px; background: var(--dim); }
.notes li .n {
  width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 50%;
  font-family: var(--mono); font-size: 10px; display: grid; place-items: center; margin-top: 1px;
}
.dossier .link { color: var(--signal); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- temporary study control ---------- */
.study-bar {
  position: fixed; z-index: 100; left: 50%; bottom: 16px; transform: translateX(-50%);
  transition: transform 360ms var(--ease-out), opacity 360ms;
  display: flex; align-items: center; gap: 4px; padding: 5px;
  background: rgba(14, 13, 11, 0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); font-size: 12px;
  max-width: min(calc(100vw - 24px), 1080px); flex-wrap: wrap; justify-content: center;
}
.study-bar .lbl { font-family: var(--mono); font-size: 11px; color: var(--faint); padding: 0 8px; white-space: nowrap; }
.study-bar a, .study-bar button {
  padding: 6px 10px; text-decoration: none; color: var(--dim); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.study-bar a[aria-current="page"], .study-bar button[aria-pressed="true"] { color: var(--bone); background: rgba(218, 213, 203, 0.09); }
.study-bar .sw { width: 10px; height: 10px; }
.study-bar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 6px; }

.fig.instant .plot, .fig.instant .lettering, .fig.instant .media, .fig.instant .interior { transition: none !important; }
.fig.instant .scan { display: none; }
.fig.portrait { height: 100%; width: auto; }
.fig.landscape { width: 100%; height: auto; }

.study-bar.tucked { transform: translate(-50%, calc(100% + 6px)); opacity: 0.7; }
@media (hover: none) { .study-bar.tucked { transform: translateX(-50%); opacity: 1; } }
@media (max-width: 560px) { .study-bar { flex-wrap: wrap; justify-content: center; overflow: visible; } }

/* ---------- cursor: a dark kite arrowhead with a sharp, mitered bone outline, its tip the hotspot; a bounding box frames
   what you can click and a frosted tooltip names it. Mouse and trackpad only (html.cursor-live). ---------- */
:root.cursor-live, :root.cursor-live * { cursor: none !important; }
.cur { position: fixed; inset: 0; z-index: 200; pointer-events: none; display: none; }
/* its own layer in page transitions, so the arrow holds still instead of interlacing with the page */
.cur { view-transition-name: cursor; }
::view-transition-group(cursor), ::view-transition-old(cursor), ::view-transition-new(cursor) { animation: none; }
::view-transition-old(cursor) { display: none; }
:root.cursor-live .cur { display: block; }
.cur.away { opacity: 0; }

/* the mitered outline carries the tip out to (1.2, 0.65) in the 24-unit drawing, so that point is the hotspot */
.cur-a { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -0.65px 0 0 -1.2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); transition: scale 140ms var(--ease-out); transform-origin: 1.2px 0.65px; }
.cur-a svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cur.down .cur-a { scale: 0.86; }

/* the bounding box: corner brackets that ease onto whatever you can click */
.cur-lock { position: absolute; left: 0; top: 0; opacity: var(--lock, 0); }
.cur-lock i { position: absolute; width: 9px; height: 9px; border: 0 solid var(--bone); }
.cur-lock i:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.cur-lock i:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.cur-lock i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.cur-lock i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }

/* the tooltip: frosted glass that trails the arrow */
.cur-tip { position: absolute; left: 0; top: 0; min-width: 132px; max-width: 280px; padding: 8px 11px 9px;
  background: rgba(24, 23, 21, 0.44); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(218, 213, 203, 0.16); border-radius: 3px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0; scale: 0.96; transform-origin: 0 0; transition: opacity 160ms ease, scale 220ms var(--ease-out); }
.cur.tip-on .cur-tip { opacity: 1; scale: 1; }
.cur-tip b { display: block; font: 600 13px/1.2 var(--text); letter-spacing: -0.01em; color: var(--bone); white-space: nowrap; }
.cur-tip span { display: block; margin-top: 4px; font: 10px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.cur-tip span:empty { display: none; }
