/*
  PROPOSITION B2 - "First Proof / Unified". The dark catalogue merged
  with Object Theater's best pieces per owner direction: top menu bar,
  bigger mark, smoother proximity snap, parallax dot field, the gate
  refusal beat in a lock collar, the hash as a turning half-wheel, and
  a concept visualization of the software itself. One inverted paper
  scene holds the artifact. Montserrat 500. Letter-spacing 0.
*/
:root {
  --ink-bg: #0C0C0C;
  --tx: #F4F4F0;
  --tx-muted: rgba(244,244,240,0.62);
  --tx-dim: rgba(244,244,240,0.38);
  --hair: rgba(244,244,240,0.16);
  --hair-strong: rgba(244,244,240,0.38);
  --paper: #F4F4F0;
  --paper-ink: #0A0A0A;
  --paper-muted: rgba(10,10,10,0.58);
  --paper-hair: rgba(10,10,10,0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: clamp(15px, 14px + 0.2vw, 19px);
  scroll-behavior: smooth;
}
body {
  background: var(--ink-bg);
  color: var(--tx);
  font-family: "Montserrat", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
.mono { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; }
a { color: inherit; }

/* ---------- parallax dot backdrop -------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.backdrop .dotfar,
.backdrop .dotnear {
  position: absolute;
  inset: -40% 0;
  will-change: transform;
}
.backdrop .dotfar {
  background-image: radial-gradient(circle, rgba(244,244,240,0.10) 1px, transparent 1.5px);
  background-size: 210px 230px;
}
.backdrop .dotnear {
  background-image: radial-gradient(circle, rgba(244,244,240,0.17) 1.2px, transparent 1.8px);
  background-size: 120px 135px;
  background-position: 60px 40px;
}

/* ---------- top bar ------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 13px 26px;
  background: rgba(12,12,12,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.topbar .brand { line-height: 0; }
.topbar .brand img { height: 30px; width: auto; display: block; }
.topbar .menu { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar .menu a {
  text-decoration: none;
  color: var(--tx-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  transition: color 0.2s ease;
}
.topbar .menu a:hover { color: var(--tx); }
.topbar .meta {
  margin-left: auto;
  font-size: 0.64rem;
  text-transform: uppercase;
  color: var(--tx-dim);
  white-space: nowrap;
}

/* ---------- scenes ------------------------------------------------------- */
.scene {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
  padding: 90px 0 60px;
}
.scene .inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 48px));
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1.05s ease, transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene.in .inner { opacity: 1; transform: none; }

.ghost {
  position: absolute;
  right: -2vw;
  bottom: -6vh;
  z-index: 1;
  font-size: clamp(220px, 44vw, 620px);
  font-weight: 300;
  line-height: 0.8;
  color: rgba(244,244,240,0.045);
  pointer-events: none;
  will-change: transform;
}
.scene.invert .ghost { color: rgba(10,10,10,0.05); }

.arc {
  position: absolute;
  border: 1px solid var(--hair);
  border-radius: 50%;
  pointer-events: none;
  -webkit-mask-image: conic-gradient(#000 0 110deg, transparent 110deg 360deg);
  mask-image: conic-gradient(#000 0 110deg, transparent 110deg 360deg);
  animation: arc-turn 90s linear infinite;
}
.arc.a1 { width: 130vmax; height: 130vmax; left: -75vmax; top: -55vmax; }
.arc.a2 { width: 90vmax; height: 90vmax; left: -48vmax; top: -30vmax; animation-duration: 140s; animation-direction: reverse; }
.arc.a3 { width: 70vmax; height: 70vmax; right: -40vmax; bottom: -42vmax; left: auto; top: auto; animation-duration: 110s; }
@keyframes arc-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.scene.invert .arc { border-color: var(--paper-hair); }

/* ---------- type --------------------------------------------------------- */
.kicker { font-size: 0.76rem; font-weight: 600; color: var(--tx-dim); margin-bottom: 28px; min-height: 1.2em; }
.display-xl { font-size: clamp(46px, 8.6vw, 132px); font-weight: 500; line-height: 1.02; max-width: 14ch; }
.display-m { font-size: clamp(30px, 4.6vw, 64px); font-weight: 500; line-height: 1.06; max-width: 22ch; }
.body-txt { margin-top: 22px; max-width: 36em; color: var(--tx-muted); font-size: 1.02rem; }
.body-txt b { color: var(--tx); font-weight: 600; }
.marg-cap { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); margin-bottom: 16px; }
.subcap { margin-top: 14px; font-size: 0.78rem; color: var(--tx-dim); max-width: 60ch; }
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--tx-dim);
  font-size: 0.74rem;
  animation: cue 8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.85; } }
.mast img { height: 44px; width: auto; display: block; margin-bottom: clamp(34px, 7vh, 80px); }

/* ---------- inventory ----------------------------------------------------- */
.inv { margin-top: 38px; display: grid; }
.inv-row {
  display: grid;
  grid-template-columns: minmax(56px, 110px) 1fr minmax(120px, 260px);
  column-gap: 22px;
  align-items: baseline;
  padding: 19px 0;
  border-top: 1px solid var(--hair);
}
.inv-row:last-child { border-bottom: 1px solid var(--hair); }
.inv-row .no { color: var(--tx-dim); font-weight: 300; font-size: 1.3rem; }
.inv-row .what { font-size: clamp(19px, 2.4vw, 30px); font-weight: 500; line-height: 1.15; }
.inv-row .state { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-muted); text-align: right; }
.inv-row.struck .what { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--tx-muted); }
.inv-row.struck .state { color: var(--tx); }

/* ---------- the software mockup ------------------------------------------ */
.os-mock { margin-top: 34px; }
.os-frame {
  position: relative;
  width: min(860px, 100%);
  aspect-ratio: 16 / 9.6;
  border: 1px solid var(--hair-strong);
  background: #101012;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.os-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--hair);
  font-size: 0.7rem;
}
.os-top .os-brand { font-weight: 700; }
.os-top .os-title { color: var(--tx-muted); font-weight: 600; }
.os-top .os-flag { margin-left: auto; color: var(--tx-dim); }
.os-desk { position: relative; flex: 1; }
.os-window {
  position: absolute;
  left: 5%;
  top: 9%;
  width: 46%;
  height: 64%;
  border: 1px solid var(--hair);
  background: #131316;
}
.os-winbar {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hair);
}
.os-winbar span { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--hair-strong); }
.os-rows { padding: 10px; display: grid; gap: 10px; }
.os-row { display: flex; gap: 10px; align-items: center; }
.os-row i { width: 14px; height: 14px; border: 1px solid var(--hair-strong); }
.os-row b { height: 1px; flex: 1; background: var(--hair); }
.os-palette {
  position: absolute;
  left: 18%;
  bottom: 14%;
  width: 64%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hair-strong);
  background: rgba(12,12,13,0.95);
  padding: 13px 16px;
  font-size: 0.86rem;
}
.os-palette .os-prompt { color: var(--tx-dim); }
.os-palette .os-cmd { color: var(--tx); min-height: 1.2em; }
.tcaret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--tx);
}
.tcaret.blink { animation: caret 1s steps(2, jump-none) infinite; }
.os-approve {
  position: absolute;
  right: 6%;
  top: 16%;
  width: 36%;
  border: 1px solid var(--tx);
  background: #0C0C0C;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.os-approve.show { opacity: 1; transform: none; }
.os-approve strong { font-size: 0.82rem; }
.os-approve p { font-size: 0.68rem; color: var(--tx-muted); }
.os-actions { display: flex; gap: 8px; justify-content: flex-end; font-size: 0.68rem; }
.os-actions span { border: 1px solid var(--hair-strong); padding: 4px 10px; color: var(--tx-muted); }
.os-actions .allow { background: var(--tx); color: var(--paper-ink); border-color: var(--tx); font-weight: 600; }
.os-dock {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--hair);
}
.os-dock span { width: 9px; height: 9px; border: 1px solid var(--hair-strong); border-radius: 50%; }

/* ---------- figures -------------------------------------------------------- */
.figs { display: flex; flex-wrap: wrap; gap: 6vw; margin-top: 38px; align-items: end; }
.fig .big { font-size: clamp(74px, 12.5vw, 190px); font-weight: 300; line-height: 0.95; }
.fig .cap { display: block; margin-top: 10px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); max-width: 30ch; }

/* ---------- proof wheel ----------------------------------------------------- */
.wheel-stage {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 1;
  pointer-events: none;
}
.wheel {
  position: absolute;
  width: 150vh;
  height: 150vh;
  left: -75vh;
  top: -75vh;
  animation: wheel-turn 70s linear infinite;
}
@keyframes wheel-turn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.wheel .pair {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(15px, 2vh, 24px);
  color: rgba(244,244,240,0.6);
}
.wheel .ring {
  position: absolute;
  inset: 6vh;
  border: 1px solid var(--hair);
  border-radius: 50%;
}
.wheel-copy { margin-left: clamp(80px, 42vh, 46vw); }

/* ---------- gate (refusal beat + lock collar) -------------------------------- */
.gate-stage { position: relative; display: inline-block; padding: 8vmin 7vmin; perspective: 800px; margin-top: 10px; }
.specimen {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(28px, 5.8vw, 80px);
  line-height: 1.1;
  min-height: 1.2em;
}
.specimen .bad { color: var(--tx-dim); text-decoration: line-through; }
.specimen .caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  vertical-align: text-bottom;
  background: var(--tx);
  animation: caret 1s steps(2, jump-none) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.lock {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(244,244,240,0.4);
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
}
.lock.top {
  -webkit-mask-image: conic-gradient(from -90deg, #000 0 150deg, transparent 150deg 360deg);
  mask-image: conic-gradient(from -90deg, #000 0 150deg, transparent 150deg 360deg);
  transform: rotateX(12deg) rotate(-14deg);
}
.lock.bot {
  -webkit-mask-image: conic-gradient(from 90deg, #000 0 150deg, transparent 150deg 360deg);
  mask-image: conic-gradient(from 90deg, #000 0 150deg, transparent 150deg 360deg);
  transform: rotateX(12deg) rotate(14deg);
}
.gate-stage.locked .lock.top,
.gate-stage.locked .lock.bot { transform: rotateX(12deg) rotate(0deg); border-color: rgba(244,244,240,0.7); }
.refusal {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--tx-muted);
  min-height: 1.3em;
}
.specimen-cap { margin-top: 10px; font-size: 0.82rem; color: var(--tx-dim); max-width: 56ch; }
.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  margin-top: 30px;
}
.limit-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr;
  column-gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-top: 1px solid var(--hair);
}
.limit-row .k { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 0.82rem; font-weight: 700; }
.limit-row .v { color: var(--tx-muted); font-size: 0.9rem; }

/* ---------- artifact (paper scene) ------------------------------------------- */
.scene.invert { background: var(--paper); color: var(--paper-ink); border-bottom-color: var(--paper-hair); }
/* black dot parallax layers for the paper scene */
.pdots {
  position: absolute;
  inset: -30% 0;
  pointer-events: none;
  will-change: transform;
}
.pdots.p1 {
  background-image: radial-gradient(circle, rgba(10,10,10,0.16) 1px, transparent 1.5px);
  background-size: 190px 210px;
}
.pdots.p2 {
  background-image: radial-gradient(circle, rgba(10,10,10,0.26) 1.3px, transparent 1.9px);
  background-size: 110px 125px;
  background-position: 50px 35px;
}
.scene.invert .marg-cap { color: rgba(10,10,10,0.42); }
.scene.invert .body-txt { color: var(--paper-muted); }
.scene.invert .body-txt b { color: var(--paper-ink); }
.filename {
  margin-top: 26px;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: clamp(20px, 4vw, 52px);
  overflow-wrap: anywhere;
}
.dl-link {
  display: inline-block;
  margin-top: 34px;
  font-size: clamp(30px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.08;
  text-decoration: none;
  border-bottom: 3px solid var(--paper-ink);
  padding-bottom: 6px;
  transition: border-bottom-width 0.15s ease;
}
.dl-link:hover, .dl-link:focus-visible { border-bottom-width: 6px; }
.dl-link.unavailable { opacity: 0.45; cursor: not-allowed; border-bottom-style: dashed; }
.reqs { margin-top: 26px; font-size: 0.9rem; color: var(--paper-muted); max-width: 52ch; }
.status-line {
  margin-top: 8px;
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  color: rgba(10,10,10,0.45);
  min-height: 1.3em;
}

/* ---------- direction + signoff ----------------------------------------------- */
.dir { margin-top: 34px; display: grid; }
.dir-row {
  display: grid;
  grid-template-columns: minmax(100px, 190px) 1fr minmax(130px, 240px);
  column-gap: 22px;
  align-items: baseline;
  padding: 15px 0;
  border-top: 1px solid var(--hair);
}
.dir-row:last-child { border-bottom: 1px solid var(--hair); }
.dir-row .when { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-muted); }
.dir-row .what { font-size: clamp(16px, 1.9vw, 24px); font-weight: 500; }
.dir-row .state { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--tx-dim); text-align: right; }
.closer { margin-top: 26px; font-size: 1.02rem; font-weight: 600; max-width: 36em; }
.signoff {
  margin-top: clamp(30px, 6vh, 60px);
  display: flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(34px, 6vw, 84px);
  font-weight: 500;
  line-height: 1;
}
.signoff img { height: 0.62em; width: auto; transform: translateY(0.06em); }
.links-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 28px; font-size: 0.86rem; }
.links-row a { color: var(--tx-muted); text-decoration: none; border-bottom: 1px solid var(--hair-strong); }
.links-row a:hover { color: var(--tx); border-bottom-color: var(--tx); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
  .scene .inner { opacity: 1; transform: none; transition: none; }
  .arc, .wheel { animation: none; }
  .scroll-cue { animation: none; }
  .specimen .caret { animation: none; }
  .os-approve { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 920px) {
  .topbar { gap: 12px; padding: 10px 14px; }
  .topbar .meta { display: none; }
  .topbar .brand img { height: 24px; }
  .limits { grid-template-columns: 1fr; }
  .inv-row { grid-template-columns: 44px 1fr; }
  .inv-row .state { grid-column: 2; text-align: left; margin-top: 3px; }
  .dir-row { grid-template-columns: 1fr; row-gap: 3px; }
  .dir-row .state { text-align: left; }
  .ghost { font-size: clamp(160px, 60vw, 320px); }
  .wheel-stage { top: 100%; left: 50%; }
  .wheel { width: 120vw; height: 120vw; left: -60vw; top: -60vw; }
  .wheel-copy { margin-left: 0; margin-bottom: 40vw; }
  .os-window { width: 60%; }
  .os-approve { width: 46%; }
  .scene { padding: 80px 0 50px; }
}
