/* Mycelium, in the Lone Echo interface style.
   Void, bone linework, ice only where something is live. The red exists only as
   the chroma split's offset. The downloads sit on the navy-and-bone print palette. */

@font-face { font-family: "Barlow"; font-weight: 300; font-display: swap; src: url(/fonts/barlow-light.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/fonts/barlow-regular.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-medium.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-semibold.woff2) format("woff2"); }

:root {
  --void: #04060A;
  --haze: #0D1A2E;
  --bone: #E6ECEC;
  --bone-2: #A9B6B8;      /* secondary text, 9.6:1 on void */
  --ice: #9EE6EE;
  --split-red: #FF3A4C;
  --split-cyan: #31E4EE;
  --ghost: #23303B;       /* hairlines, crosshairs */
  --hair: #3D6467;
  --dossier: #1B1A2C;
  --khaki: #8C7A5B;
  --paper: #E8E2D2;       /* bone on navy */

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;    /* 17px body */
  --step-1: 1.375rem;
  --step-2: 1.875rem;
  --step-3: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem);
  --track-ro: 0.22em;
  --ease-snap: cubic-bezier(.2, .9, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font: 400 var(--step-0)/1.65 "Barlow", system-ui, sans-serif;
  letter-spacing: 0.01em;
  overflow-x: clip;
}
html { overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 8px 14px; background: var(--bone); color: var(--void); }
.skip:focus { top: 16px; }

/* ------------------------------------------------------------ space plate
   The vignette, a sparse + crosshair grid and film grain. Fixed behind everything. */
.space {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='168'%3E%3Cpath d='M84 79v10M79 84h10' stroke='%233D6467' stroke-width='1' opacity='.55'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 90% 70% at 50% 30%, var(--haze) 0%, #050A12 45%, var(--void) 80%);
  background-position: center 40px, center;
}
.space::after { content: ""; position: absolute; inset: 0; background: url(/brand/grain.png); mix-blend-mode: screen; opacity: .35; }

/* ------------------------------------------------------------ hero */
.hero {
  min-height: min(68vh, 720px);
  display: grid; place-content: center; justify-items: center;
  text-align: center;
  padding: clamp(72px, 14vh, 160px) var(--gutter) 40px;
}
.hero-mark { position: relative; display: flex; align-items: center; justify-content: center; width: min(100%, 980px); }
.wordmark { width: min(78vw, 720px); height: auto; overflow: visible; }
.wordmark .wm-r { color: var(--split-red); opacity: .85; transform: translate(-2.6px, 0); }
.wordmark .wm-c { color: var(--split-cyan); opacity: .85; transform: translate(2.6px, .8px); }
.wordmark .wm-w { color: var(--bone); }
.wordmark .wm-slash { color: var(--ice); }
.wordmark .wm-w .wm-slash { stroke: var(--ice); }

/* hairlines that run out from the wordmark to the page edges, ending in nodes */
.rule { position: absolute; top: 50%; height: 1px; width: 50vw; background: linear-gradient(90deg, transparent, var(--hair) 40%, var(--hair)); opacity: .7; }
.rule-l { right: calc(50% + min(39vw, 360px) + 28px); }
.rule-r { left: calc(50% + min(39vw, 360px) + 28px); background: linear-gradient(270deg, transparent, var(--hair) 40%, var(--hair)); }
.rule .node { position: absolute; right: -4px; top: -3px; }
.rule-r .node { right: auto; left: -4px; }
.node { display: block; width: 7px; height: 7px; background: var(--bone); }

.lede { margin: clamp(28px, 5vh, 48px) 0 0; font-size: var(--step-3); font-weight: 300; line-height: 1.15; letter-spacing: 0.02em; }
.sub { margin: 14px auto 0; max-width: 44ch; color: var(--bone-2); font-size: var(--step-1); font-weight: 300; line-height: 1.45; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }
.cta-note { margin: 16px 0 0; color: var(--bone-2); font-size: var(--step--1); letter-spacing: 0.04em; }

.btn {
  --c: var(--bone);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  color: var(--c); text-decoration: none; font-weight: 500; letter-spacing: 0.06em;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
/* square nodes on the two left corners: the reference's HUD button */
.btn::before, .btn::after { content: ""; position: absolute; left: -3px; width: 5px; height: 5px; background: var(--c); }
.btn::before { top: -3px; } .btn::after { bottom: -3px; }
.btn:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.btn-primary { --c: var(--ice); }
.btn-primary:hover { background: var(--ice); color: var(--void); }

/* ------------------------------------------------------------ demo scope */
.demo { padding: 24px var(--gutter) 40px; }
.scope { position: relative; width: min(100%, 1180px); margin: 0 auto; }
.scope-readout {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 0 34px 20px; color: var(--bone-2);
  font-size: var(--step--1); letter-spacing: 0.12em;
}
.ro-time { font-variant-numeric: tabular-nums; letter-spacing: var(--track-ro); white-space: nowrap; }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; outline: 1px solid var(--ghost); outline-offset: 10px; }
.frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* corner brackets that snap to the frame */
.brk { position: absolute; width: 34px; height: 34px; border: 0 solid var(--bone); pointer-events: none; z-index: 2; transition: transform .45s var(--ease-snap), border-color .3s; }
.b-tl { top: -18px; left: -18px; border-top-width: 2px; border-left-width: 2px; }
.b-tr { top: -18px; right: -18px; border-top-width: 2px; border-right-width: 2px; }
.b-bl { bottom: -18px; left: -18px; border-bottom-width: 2px; border-left-width: 2px; }
.b-br { bottom: -18px; right: -18px; border-bottom-width: 2px; border-right-width: 2px; }

/* outer nodes with diagonals running off toward the page corners (image 1) */
.frame > .node { position: absolute; z-index: 2; }
.n-tl { top: -32px; left: -32px; } .n-tr { top: -32px; right: -32px; }
.n-bl { bottom: -32px; left: -32px; } .n-br { bottom: -32px; right: -32px; }
.frame > .node::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 60vw; height: 1px;
  background: linear-gradient(90deg, var(--hair), transparent 70%); transform-origin: 0 50%; opacity: .65;
}
.n-tl::after { transform: rotate(-145deg); } .n-tr::after { transform: rotate(-35deg); }
.n-bl::after { transform: rotate(145deg); }  .n-br::after { transform: rotate(35deg); }

.play {
  position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; z-index: 3;
  border: 0; padding: 0; background: none; color: var(--bone); cursor: pointer;
}
.play svg { width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(0, 0, 0, .6)); }
.play circle { fill: rgba(4, 6, 10, .55); stroke: currentColor; stroke-width: 1.5; }
.play path { fill: currentColor; }
.play:hover { color: var(--ice); }
.scope[data-state="playing"] .play, .scope[data-state="paused"] .play { display: none; }
.scope[data-state="playing"] .brk { border-color: var(--ice); }

/* re-target: the brackets pull in and snap back out when the reel changes */
.scope.retarget .b-tl { transform: translate(24px, 24px); }
.scope.retarget .b-tr { transform: translate(-24px, 24px); }
.scope.retarget .b-bl { transform: translate(24px, -24px); }
.scope.retarget .b-br { transform: translate(-24px, -24px); }

.reels {
  list-style: none; padding: 0; margin: 44px auto 0; width: min(100%, 1180px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--ghost);
}
.reel {
  width: 100%; height: 100%; text-align: left; cursor: pointer;
  display: grid; gap: 4px; padding: 16px 16px 18px 22px;
  background: none; color: var(--bone-2); border: 0; border-right: 1px solid var(--ghost);
  font: inherit; position: relative;
}
.reels li:last-child .reel { border-right: 0; }
.reel::before { content: ""; position: absolute; left: 8px; top: 24px; width: 6px; height: 6px; border: 1px solid var(--hair); }
.reel-name { color: var(--bone); font-size: var(--step-1); font-weight: 300; line-height: 1.2; }
.reel-data { font-size: var(--step--1); letter-spacing: 0.08em; }
.reel:hover .reel-name { color: #fff; }
.reel[aria-pressed="true"]::before { background: var(--ice); border-color: var(--ice); box-shadow: 0 0 10px var(--ice); }
.reel[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--ice); }
.demo-note { max-width: var(--measure); margin: 28px auto 0; color: var(--bone-2); font-size: var(--step--1); text-align: center; }

/* ------------------------------------------------------------ content blocks */
.block { padding: clamp(80px, 12vw, 150px) var(--gutter) 0; }
.block > h2, .dossier h2 {
  max-width: 22ch; margin: 0 auto 28px; text-align: center;
  font-size: var(--step-3); font-weight: 300; line-height: 1.15; letter-spacing: 0.01em;
}
.measure { max-width: var(--measure); margin: 0 auto; color: var(--bone-2); text-align: center; }
.measure.after { margin-top: 36px; color: var(--bone); }
strong { font-weight: 500; color: var(--bone); }

/* control: four depths drawn as frames inside frames */
.depth { width: min(100%, 860px); margin: 48px auto 0; }
.lvl { position: relative; border: 1px solid var(--hair); padding: 18px 18px 18px; }
.lvl .lvl { margin-top: 14px; }
.lvl-head { margin: 0; color: var(--bone-2); font-size: var(--step-0); }
.lvl-track { border-color: var(--ghost); }
.lvl-notes { border-color: var(--ice); background: rgba(158, 230, 238, .04); }
.lvl::before { content: ""; position: absolute; top: -4px; left: -4px; width: 7px; height: 7px; background: var(--bone); }
.lvl-notes::before { background: var(--ice); }
.roll {
  margin-top: 14px; height: 64px;
  background:
    linear-gradient(var(--ice), var(--ice)) 6% 70% / 9% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 18% 40% / 6% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 27% 55% / 13% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 44% 25% / 5% 5px no-repeat,
    linear-gradient(var(--bone), var(--bone)) 52% 40% / 10% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 66% 70% / 7% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 77% 55% / 12% 5px no-repeat,
    linear-gradient(var(--ice), var(--ice)) 92% 25% / 6% 5px no-repeat,
    radial-gradient(circle, var(--hair) 1px, transparent 1.5px) 0 0 / 16px 16px;
  opacity: .9;
}

/* how: a sequence, so it is numbered by the pads */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 48px auto 0; width: min(100%, 1000px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); }
.steps li { counter-increment: step; color: var(--bone-2); }
.steps strong { display: block; margin-bottom: 6px; font-size: var(--step-2); font-weight: 300; }
.pad {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px;
  border: 1.5px solid var(--bone);
  background: radial-gradient(circle, var(--hair) 1.2px, transparent 1.6px) 4px 4px / 10px 10px;
}
.pad::after { content: counter(step); font-weight: 500; font-size: var(--step--1); letter-spacing: 0.1em; color: var(--bone); background: var(--void); padding: 0 4px; }

/* claims: a spine with a node per statement */
.claims { width: min(100% - 2 * var(--gutter), 760px); margin: 0 auto; padding-left: 0; padding-right: 0; position: relative; }
.claims::before { content: ""; position: absolute; left: 3px; top: clamp(80px, 12vw, 150px); bottom: 8px; width: 1px; background: var(--ghost); }
.claims article { position: relative; padding: 0 0 52px 40px; }
.claims article::before { content: ""; position: absolute; left: 0; top: 14px; width: 7px; height: 7px; background: var(--bone); }
.claims article:first-child::before { background: var(--ice); }
.claims h3 { margin: 0 0 10px; font-size: var(--step-2); font-weight: 300; line-height: 1.2; }
.claims p { margin: 0; max-width: var(--measure); color: var(--bone-2); }

/* ------------------------------------------------------------ dossier (downloads) */
.dossier {
  margin-top: clamp(60px, 10vw, 120px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M75 69v12M69 75h12' stroke='%238C7A5B' stroke-width='1.2' opacity='.6'/%3E%3C/svg%3E") center 0,
    var(--dossier);
  color: var(--paper);
  padding: clamp(72px, 10vw, 120px) var(--gutter);
  position: relative; overflow: hidden;
}
.dossier::before, .dossier::after { content: ""; position: absolute; width: 150px; height: 1.5px; background: var(--paper); transform: rotate(-45deg); opacity: .8; }
.dossier::before { top: 70px; left: 8%; } .dossier::after { bottom: 70px; right: 8%; }
.dossier-in { width: min(100%, 1140px); margin: 0 auto; }
.dossier .measure { color: #BDB6A6; }
.dossier code { color: var(--paper); }
.dossier strong { color: var(--paper); }

.takeaway { list-style: none; padding: 0; margin: 44px auto 0; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; color: #BDB6A6; font-size: var(--step--1); line-height: 1.55; }
.takeaway li { border-top: 1px solid rgba(232, 226, 210, .25); padding-top: 12px; }

.plates { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px); margin-top: 64px; }
.plate { display: flex; flex-direction: column; padding: 0; color: #BDB6A6; }
.plate-name {
  margin: 0; padding: 22px 16px; text-align: center;
  border: 3px solid var(--paper); color: var(--paper);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 400; letter-spacing: 0.24em; line-height: 1;
}
.plate-ro { display: flex; justify-content: space-between; margin: 10px 0 0; font-size: var(--step--1); letter-spacing: 0.14em; color: var(--paper); }
.dots { border: 0; height: 22px; margin: 14px 0 18px; background: radial-gradient(circle, rgba(232, 226, 210, .55) 1px, transparent 1.4px) 0 0 / 8px 8px; }
.plate > p:not(.plate-ro) { margin: 0 0 18px; font-size: 0.9375rem; flex: 1; }
.plate pre { margin: -6px 0 18px; padding: 10px 12px; background: rgba(0, 0, 0, .25); border-left: 2px solid var(--khaki); overflow-x: auto; }
.btn-plate { --c: var(--paper); width: 100%; }
.btn-plate:hover { background: var(--paper); color: var(--dossier); }
.plate.is-yours .plate-name { background: var(--paper); color: var(--dossier); }
.plate.is-yours .btn-plate { background: var(--paper); color: var(--dossier); }
.plate details { margin-top: 12px; font-size: var(--step--1); }
.plate summary { cursor: pointer; letter-spacing: 0.1em; color: #BDB6A6; }
.hash { display: block; margin-top: 6px; word-break: break-all; font-size: 0.75rem; color: var(--paper); }
.dossier-note { margin: 48px auto 0; max-width: var(--measure); text-align: center; color: #BDB6A6; font-size: var(--step--1); }

/* ------------------------------------------------------------ footer */
.foot { padding: 48px var(--gutter) 64px; text-align: center; color: var(--bone-2); font-size: var(--step--1); letter-spacing: 0.06em; }
.foot p { margin: 4px 0; }
.foot a { text-decoration: none; letter-spacing: var(--track-ro); }
.foot a:hover { color: var(--ice); }

/* ------------------------------------------------------------ the one load sequence */
@media (prefers-reduced-motion: no-preference) {
  .wordmark .wm-r { animation: split-r 1.1s var(--ease-snap) .15s backwards; }
  .wordmark .wm-c { animation: split-c 1.1s var(--ease-snap) .15s backwards; }
  .wordmark .wm-w { animation: resolve .9s steps(6, end) .15s backwards; }
  .wordmark .wm-glitch { animation: glitch 1.4s steps(1, end) .1s backwards; }
  .rule { animation: draw .9s var(--ease-snap) .7s backwards; transform-origin: 100% 50%; }
  .rule-r { transform-origin: 0 50%; }
  .frame > .node::after { animation: fade 1.2s ease-out 1s backwards; }
  .brk { animation: bracket .7s var(--ease-snap) 1s backwards; }
}
@keyframes split-r { from { transform: translate(-26px, 0); opacity: 0; } to { transform: translate(-2.6px, 0); opacity: .85; } }
@keyframes split-c { from { transform: translate(26px, 4px); opacity: 0; } to { transform: translate(2.6px, .8px); opacity: .85; } }
@keyframes resolve { 0% { opacity: 0; } 30% { opacity: .9; } 45% { opacity: .2; } 60% { opacity: 1; } 75% { opacity: .5; } 100% { opacity: 1; } }
@keyframes glitch { 0% { opacity: 1; transform: translateX(-30px); } 20% { transform: translateX(12px); } 40% { transform: translateX(-6px); } 60% { transform: none; } 100% { opacity: 1; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw-r { from { transform: scaleX(0); } to { transform: scaleX(-1); } }
@keyframes fade { from { opacity: 0; } to { opacity: .65; } }
@keyframes bracket { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brk { transition: none; }
}

/* ------------------------------------------------------------ narrow */
@media (max-width: 900px) {
  .reels { grid-template-columns: repeat(2, 1fr); }
  .reels li:nth-child(2) .reel { border-right: 0; }
  .reels li:nth-child(n+3) .reel { border-top: 1px solid var(--ghost); }
  .plates { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .takeaway { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 640px) {
  .rule { display: none; }
  .wordmark { width: 100%; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .scope-readout { flex-direction: column; gap: 2px; }
  .frame { outline-offset: 6px; }
  .brk { width: 22px; height: 22px; }
  .b-tl, .b-tr { top: -10px; } .b-bl, .b-br { bottom: -10px; }
  .b-tl, .b-bl { left: -10px; } .b-tr, .b-br { right: -10px; }
  .n-tl, .n-tr { top: -20px; } .n-bl, .n-br { bottom: -20px; }
  .n-tl, .n-bl { left: -14px; } .n-tr, .n-br { right: -14px; }
  .play { width: 72px; height: 72px; }
  .lvl { padding: 14px 12px; }
  .lvl .lvl { margin-top: 12px; }
  .claims article { padding-left: 28px; }
}
