/* ===========================================================================
   Slop Labs
   Committed palette: the ground carries the brand, chromatic colour is
   rationed to one signal. Single-theme by decision, not omission — the scene
   is a psychology department after hours, and it does not have a light mode.
   =========================================================================== */

:root {
  /* Plain hex first, so a browser without oklch() still paints the room.
     Browsers that understand oklch() take the block below. */
  --bg: #12060d;
  --bg-deep: #090206;
  --surface: #22111a;
  --surface-2: #311e29;
  --line: #3e2d36;
  --line-soft: #2c1b25;
  --ink: #f9f3f6;
  --ink-2: #c2b7bc;
  --ink-3: #8f8289;
  --signal: #7bd77f;
  --signal-dim: #518253;
  --signal-wash: rgba(123, 215, 127, 0.10);


  --serif: Palatino, "Palatino Linotype", "Book Antiqua", "URW Palladio L",
           "Hoefler Text", Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
           "Liberation Mono", "DejaVu Sans Mono", monospace;

  --prose: 34rem;
  --panel: 62rem;
  --pad:   clamp(1.25rem, 5vw, 2.5rem);

  --z-base: 1;
  --z-sticky: 100;
  --z-overlay: 200;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}
@supports (color: oklch(0% 0 0)) {
  :root {
    --bg: oklch(0.145 0.028 345);
    --bg-deep: oklch(0.110 0.024 345);
    --surface: oklch(0.205 0.032 345);
    --surface-2: oklch(0.265 0.034 345);
    --line: oklch(0.320 0.028 345);
    --line-soft: oklch(0.250 0.026 345);
    --ink: oklch(0.970 0.008 345);
    --ink-2: oklch(0.790 0.014 345);
    --ink-3: oklch(0.620 0.018 345);
    --signal: oklch(0.800 0.150 145);
    --signal-dim: oklch(0.560 0.090 145);
    --signal-wash: oklch(0.800 0.150 145 / 0.10);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--line) var(--bg); }
input, textarea { caret-color: var(--signal); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--signal); color: var(--bg); }

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--signal); color: var(--bg);
  padding: 0.6rem 1rem; z-index: var(--z-overlay);
  font-family: var(--sans); font-size: 0.875rem;
}
.skip:focus { left: 0; }
.skip:hover, .skip:focus { color: var(--bg); }

/* ---------- shared measure ---------- */

.wrap  { max-width: var(--panel); margin-inline: auto; padding-inline: var(--pad); }
.prose { max-width: var(--prose); }
/* Zero the children first, then space siblings: both rules sit at the same
   specificity, so source order decides and the paragraph gap actually lands. */
.prose > * { margin: 0; text-wrap: pretty; }
.prose > * + * { margin-top: 1.1em; }
.prose > .lede + * { margin-top: 1.6em; }

/* ---------- masthead ---------- */
/* Page navigation, built from the same grammar as the instrument's tab rail:
   full-height cells, hairline separators, a filled cell for where you are. */

.masthead {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}
.masthead-in {
  max-width: var(--panel); margin-inline: auto; padding-inline: var(--pad);
  display: flex; align-items: stretch; height: 3.5rem;
}
.wordmark {
  font-family: var(--serif); font-size: 1.125rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding-right: 1.5rem;
}
.wordmark .mark {
  width: 22px; height: 22px; flex: none; display: block;
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.wordmark:hover .mark { color: var(--signal); }
.masthead nav {
  margin-left: auto; display: flex; align-items: stretch;
  border-left: 1px solid var(--line);
}
.masthead nav a {
  position: relative; display: inline-flex; align-items: center;
  padding: 0 1.5rem; border-right: 1px solid var(--line);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.masthead nav a:hover { background: var(--surface); color: var(--ink); }
.masthead nav a[aria-current="page"] { background: var(--surface); color: var(--ink); }
.masthead nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--signal);
}
.masthead nav a:focus-visible { outline-offset: -2px; }
@media (max-width: 480px) {
  .wordmark { font-size: 1.0625rem; padding-right: 1rem; }
  .masthead nav a { padding: 0 0.9rem; font-size: 0.875rem; }
}
/* The narrowest phones keep the mark and drop the words; the link keeps its
   accessible name. */
@media (max-width: 400px) {
  .wordmark span { display: none; }
  .wordmark { padding-right: 0.75rem; }
  .masthead nav a { padding: 0 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark .mark, .masthead nav a { transition: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(74vh, 40rem);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.hero-stage { position: absolute; inset: 0; }
.hero-stage .fx-out {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  pointer-events: none;
}
/* The source canvas is a scratch texture, never a layer. Shown, it puts a
   crisp copy of the type directly under the cipher, which then reads as
   ghosting wherever the cipher is transparent. It keeps its box so the
   html-in-canvas path can still host live DOM here if the browser has it. */
.hero-stage .fx-src { position: absolute; inset: 0; display: none; }

/* Grid centring already places the block; padding here only sets the side
   gutter and keeps the hint clear of the type. */
.hero-in {
  position: relative;
  max-width: var(--panel); margin-inline: auto;
  padding: clamp(2rem, 5vh, 3.5rem) var(--pad) clamp(3rem, 8vh, 5rem);
  width: 100%;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
  transition: opacity 0.5s var(--ease);
}
.hero p.dek {
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 40ch;
  margin: 1.75rem 0 0;
  text-wrap: pretty;
  transition: opacity 0.5s var(--ease);
}
/* When the cipher is live it draws its own copy of the text; the DOM copy stays
   for selection and assistive tech but steps out of the way visually. */
.hero.fx-on h1, .hero.fx-on p.dek { opacity: 0; }

/* ---------- sections ---------- */

section { padding-block: clamp(4rem, 11vh, 7.5rem); }
section + section { border-top: 1px solid var(--line-soft); }

h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.14; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 1.5rem;
  max-width: 20ch; text-wrap: balance;
}
h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 0.9375rem; letter-spacing: 0.005em;
  color: var(--ink); margin: 0 0 0.5rem;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.55; color: var(--ink);
  max-width: 36ch; text-wrap: pretty;
}

/* Section grammar: the heading holds the left column, the argument the right,
   at the monograph measure. Panels below a split run the full width. */
.split { display: grid; grid-template-columns: 1fr; gap: 1.5rem clamp(2.5rem, 6vw, 5rem); align-items: start; }
.split > h1, .split > h2, .split-head > h2 { margin-bottom: 0; }
.split > .split-head { align-self: stretch; }
.split > .prose { max-width: var(--prose); }
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  /* The heading holds while its argument scrolls past. */
  .split-head > h2 { position: sticky; top: 5.5rem; }
}

/* A terminal block cursor blinking after a heading. Hard on/off, no fade. */
.cursor {
  display: inline-block; width: 0.5em; height: 0.92em;
  margin-left: 0.14em; vertical-align: -0.06em;
  background: var(--signal);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- home: frames, not sections ---------- */
/* Each section is a full frame and scrolling settles on the next one. Frames
   carry mass: they rise into place as they arrive. One idea, page-wide. */

.home { scroll-snap-type: y proximity; }
.home .hero {
  min-height: calc(100vh - 3.5rem); min-height: calc(100svh - 3.5rem);
  scroll-snap-align: start; scroll-margin-top: 3.5rem;
}
.home section {
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center;
  scroll-snap-align: start; scroll-margin-top: 3.5rem;
}
.home section > .wrap { width: 100%; }
.home .lede { font-size: clamp(1.1875rem, 2.3vw, 1.5rem); }

@supports (animation-timeline: view()) {
  .home section > .wrap {
    animation: settle linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 50vh;
  }
}
@keyframes settle {
  from { opacity: 0.2; transform: translateY(3rem); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home { scroll-snap-type: none; }
  .home section > .wrap { animation: none; }
  .split-head > h2 { position: static; }
}

/* ---------- the architecture list ---------- */

/* 8.5rem term column + 2rem gap leaves the body at ~68ch, inside the measure. */
.arch { display: flex; flex-direction: column; gap: 0; margin-top: 3rem; }
.arch-row {
  display: grid; grid-template-columns: 1fr; gap: 0.4rem clamp(2.5rem, 6vw, 5rem);
  padding: 1.5rem 0; border-top: 1px solid var(--line-soft);
  align-items: start;
}
@media (min-width: 880px) {
  .arch-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}
.arch-row:last-child { border-bottom: 1px solid var(--line-soft); }
.arch-term {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--signal); padding-top: 0.25em;
}
.arch-body { margin: 0; color: var(--ink-2); text-wrap: pretty; max-width: var(--prose); }

/* ---------- archetype instrument ---------- */

.instrument {
  margin-top: 2.75rem;
  border: 1px solid var(--line);
  background: var(--bg-deep);
}

.inst-rail {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--line);
}
.inst-tab {
  flex: 1 1 auto; min-width: 7.5rem;
  appearance: none; background: transparent; border: 0;
  border-right: 1px solid var(--line);
  padding: 0.9rem 1rem;
  font-family: var(--sans); font-size: 0.8125rem; font-weight: 500;
  color: var(--ink-3); cursor: pointer; text-align: left;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.inst-tab:last-child { border-right: 0; }
.inst-tab:hover { color: var(--ink-2); background: var(--surface); }
.inst-tab[aria-selected="true"] { color: var(--ink); background: var(--surface); }
.inst-tab .tab-tag {
  display: block; font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.2rem;
  color: var(--ink-3);
}
.inst-tab[aria-selected="true"] .tab-tag { color: var(--signal); }

.inst-body { display: grid; grid-template-columns: 1fr 15rem; gap: 0; }
@media (max-width: 760px) { .inst-body { grid-template-columns: 1fr; } }

.inst-say { padding: 1.75rem; border-right: 1px solid var(--line); }
@media (max-width: 760px) { .inst-say { border-right: 0; border-bottom: 1px solid var(--line); } }

.inst-prompt {
  font-family: var(--sans); font-size: 0.875rem; line-height: 1.5;
  color: var(--ink-3); margin: 0 0 0.9rem; text-wrap: pretty;
}
.inst-prompt b {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500; color: var(--signal);
  margin-right: 0.6rem;
}
.inst-answer {
  margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--ink);
  min-height: 8.5rem; text-wrap: pretty;
}
.inst-answer.swapping { opacity: 0; }
.inst-answer { transition: opacity 0.22s var(--ease); }
@media (prefers-reduced-motion: reduce) { .inst-answer { transition: none; } }

.inst-read { padding: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }

.gauge-row { display: flex; flex-direction: column; gap: 0.45rem; }
.gauge-label {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
}
.gauge-label b {
  font-weight: 500; color: var(--ink);
  font-variant-numeric: tabular-nums; font-size: 0.8125rem;
}
.gauge-track { height: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.gauge-fill {
  position: absolute; inset-block: 0; left: 0; width: 100%; background: var(--signal);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.5s var(--ease);
}
.gauge-fill.warn { background: #e0874a; background: oklch(0.72 0.16 45); }
@media (prefers-reduced-motion: reduce) { .gauge-fill { transition: none; } }

.inst-note {
  margin: 0; font-family: var(--sans); font-size: 0.8125rem; line-height: 1.55;
  color: var(--ink-3); text-wrap: pretty;
}
.inst-foot {
  border-top: 1px solid var(--line); padding: 0.85rem 1.75rem;
  font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-3);
}
.inst-foot b { color: var(--ink-2); font-weight: 500; }

/* ---------- slop teaser ---------- */

.prose > .spec { margin-block: 2rem; }
.spec {
  border: 1px solid var(--line); background: var(--bg-deep); padding: 1.5rem;
}
.spec-line { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: baseline; }
.spec-line + .spec-line { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); }
/* Each specimen is a catalogue entry; the marker is its citation, and a link. */
.spec-cite {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; color: var(--signal); text-decoration: none;
}
.spec-cite:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.spec-text { font-style: italic; color: var(--ink); margin: 0; }
.spec-term {
  display: block; font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.02em; color: var(--ink-3);
  font-style: normal; margin-top: 0.4rem;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 500;
  color: var(--bg); background: var(--signal);
  padding: 0.7rem 1.15rem; border: 1px solid var(--signal);
  text-decoration: none; transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--signal); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-arrow { flex: none; transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .btn-arrow { transition: none; } .btn:hover .btn-arrow { transform: none; } }

/* ---------- team ---------- */

/* Names only. Same hairline list grammar as the architecture rows. */
.team { list-style: none; margin: 0; padding: 0; max-width: var(--prose); }
.team li {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  line-height: 1.2; letter-spacing: -0.015em; color: var(--ink);
  padding: 1rem 0; border-top: 1px solid var(--line-soft);
}
.team li:last-child { border-bottom: 1px solid var(--line-soft); }

/* ---------- team page ---------- */
/* Same grid as every other page. The names are the content; the address is
   the one action. The section is tall enough to keep the footer at the foot. */

.team-page { min-height: calc(100vh - 3.5rem - 6.25rem); min-height: calc(100svh - 3.5rem - 6.25rem); }
.team-page h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.14; letter-spacing: -0.02em;
  color: var(--ink); margin: 0;
}
.team-contact { margin-top: 2.5rem; font-family: var(--sans); font-size: 0.9375rem; }
.team-contact a { color: var(--ink-2); text-decoration: none; }
.team-contact a:hover { color: var(--signal); }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--line-soft);
  padding-block: 2.5rem;
  font-family: var(--sans); font-size: 0.875rem; color: var(--ink-3);
}
footer.site .foot-in {
  max-width: var(--panel); margin-inline: auto; padding-inline: var(--pad);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline;
}
footer.site p { margin: 0; }
footer.site .foot-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer.site .foot-nav a { color: var(--ink-3); text-decoration: none; transition: color 0.2s var(--ease); }
footer.site .foot-nav a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { footer.site .foot-nav a { transition: none; } }
