/*
 * TERMINUS Chris glass — JourdanLabs ink language (proving-room family).
 * NOT Mercury. No electric blue CTAs. Dark void, hairlines, mono stations.
 *
 * Background art (Captain):
 *   drop file at:  demo/chris/static/art/background.png
 *   or override:   --jl-art-url: url("/art/your-file.png");
 */

:root {
  --void: #06070b;
  --ink: #e8ecf4;
  --mu: #8b95a8;
  --mu-dim: #5c6470;
  --line: #252a38;
  --line-soft: #1a1e28;
  --panel: rgba(8, 10, 16, 0.94);
  --panel-solid: #0c0e14;
  --ok: #4ade80;
  --ok-dim: rgba(74, 222, 128, 0.12);
  --bad: #f87171;
  --bad-dim: rgba(248, 113, 113, 0.1);
  --phos: #9ddeb0;
  --select: #b8c5d6;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --radius: 2px;
  /* Narrower column, left-biased — leave room for the seal painting */
  --max: 34rem;
  --content-left: clamp(1.25rem, 4vw, 2.5rem);
  --art-gutter: clamp(12rem, 28vw, 22rem); /* ~3–4in+ open on the right at desktop */
  /* Title art (Captain lock 2026-08-10) — refusal.io hero / code-ward parchment */
  --jl-art-url: url("/art/background.jpg");
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--select);
  color: var(--void);
}

/* —— Background art layer (Captain drops PNG here) —— */

/* Fixed full-viewport painting — persists for entire scroll */
.art-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  pointer-events: none;
  background-color: #c4b8a4;
  background-image: var(--jl-art-url);
  background-size: cover;
  background-position: 70% center; /* bias seal/stream into the open right field */
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 1;
}

/* No ::after wash — it stacks above background-image and kills the painting. */

/* Veil stronger only on the left content column; right stays open for art */
.art-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(6, 7, 11, 0.35) 0%,
      rgba(6, 7, 11, 0.12) 42%,
      rgba(6, 7, 11, 0) 58%,
      rgba(6, 7, 11, 0) 100%
    ),
    linear-gradient(180deg, rgba(6, 7, 11, 0.06) 0%, rgba(6, 7, 11, 0.04) 70%, rgba(6, 7, 11, 0.22) 100%);
  opacity: 1;
  mix-blend-mode: normal;
}

.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* —— Top bar —— */

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem var(--content-left) 1rem;
  border-bottom: 1px solid rgba(232, 236, 244, 0.14);
  background: rgba(6, 7, 11, 0.82);
  backdrop-filter: blur(16px);
}

.jl {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d0d6e0;
}

.product {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
}

.tag {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d0d6e0;
}

.top-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.chip {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d0d6e0;
  border: 1px solid rgba(232, 236, 244, 0.2);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  background: rgba(8, 10, 16, 0.88);
}

/* —— Main: left column so painting owns the right ~3–4in+ —— */

main {
  width: min(var(--max), calc(100% - var(--art-gutter)));
  max-width: var(--max);
  margin: 0;
  margin-right: auto;
  padding: 1.75rem var(--content-left) 2.5rem;
  padding-right: 1rem;
  display: grid;
  gap: 1rem;
  flex: 1;
  box-sizing: border-box;
}

.hero {
  padding: 0.35rem 0 0.5rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8f8d4;
  text-shadow: 0 1px 14px rgba(6, 7, 11, 0.75);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 1px 22px rgba(6, 7, 11, 0.85), 0 2px 6px rgba(6, 7, 11, 0.65);
}

.lede {
  margin: 0;
  max-width: 36em;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.55;
  text-shadow: 0 1px 18px rgba(6, 7, 11, 0.85);
}

.lede em {
  font-style: normal;
  color: #ffb0b0;
  font-weight: 800;
}

.bottom-line {
  margin: 1.15rem 0 0;
  max-width: 28em;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
  text-shadow: 0 1px 18px rgba(6, 7, 11, 0.85);
}

/* —— Stations (proving-room grammar) —— */

.station {
  background: var(--panel);
  border: 1px solid rgba(232, 236, 244, 0.16);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.15rem;
  backdrop-filter: blur(18px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.station-quiet {
  background: rgba(8, 10, 16, 0.94);
}

.station-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.station-id {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4ccd8;
  flex-shrink: 0;
}

.station h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.hint {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #eef1f6;
  line-height: 1.55;
}

.hint strong,
.hint em,
.hint code {
  color: #ffffff;
  font-weight: 800;
}

.actions {
  display: grid;
  gap: 0.65rem;
}

.actions-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn {
  appearance: none;
  border: 1px solid rgba(232, 236, 244, 0.22);
  background: rgba(6, 7, 11, 0.75);
  color: #ffffff;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.btn:hover:not(:disabled) {
  border-color: rgba(232, 236, 244, 0.4);
  background: rgba(22, 26, 36, 0.95);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 2px;
}

.btn-prime {
  background: #f4f6fa;
  color: #06070b;
  border-color: #f4f6fa;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.7rem 1.1rem;
  width: fit-content;
  min-width: 10rem;
}

.btn-prime:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
  color: #06070b;
}

.busy {
  margin: 0.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #c8ced8;
}

/* —— Result —— */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--mu);
  background: rgba(6, 7, 11, 0.4);
}

.badge.ok {
  color: var(--ok);
  border-color: rgba(74, 222, 128, 0.35);
  background: var(--ok-dim);
}

.badge.bad {
  color: var(--bad);
  border-color: rgba(248, 113, 113, 0.35);
  background: var(--bad-dim);
}

.detail {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #c8f0d4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  padding: 0.85rem 0.95rem;
  background: rgba(4, 6, 10, 0.92);
  border: 1px solid rgba(232, 236, 244, 0.12);
  border-radius: var(--radius);
}

.nonclaims {
  margin: 0;
  padding-left: 1.1rem;
  color: #d4dae4;
  font-size: 0.86rem;
  line-height: 1.55;
}

.nonclaims em {
  font-style: normal;
  color: #ffffff;
}

.nonclaims a {
  color: #b8d4ff;
}

/* —— Footer —— */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.85rem var(--content-left) 1.1rem;
  border-top: 1px solid rgba(232, 236, 244, 0.12);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a8b0be;
  background: rgba(6, 7, 11, 0.88);
}

.foot-mute {
  color: #8b95a8;
  opacity: 0.95;
}

@media (max-width: 900px) {
  :root {
    --art-gutter: clamp(4rem, 18vw, 12rem);
  }
  main {
    width: min(var(--max), calc(100% - 2rem));
  }
}

@media (max-width: 560px) {
  :root {
    --art-gutter: 0rem;
  }
  main {
    width: 100%;
    padding-right: var(--content-left);
  }
  .top {
    flex-direction: column;
  }
  .top-right {
    justify-content: flex-start;
  }
  .btn-prime {
    width: 100%;
  }
  .art-layer {
    background-position: 80% center;
    background-attachment: scroll; /* fixed can glitch on iOS */
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* —— Front door (refusal.io) —— */

.chip-link {
  text-decoration: none;
  color: #d0d6e0;
}

.chip-link:hover {
  color: #fff;
  border-color: rgba(232, 236, 244, 0.4);
}

.hero-door {
  padding-bottom: 0.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
  align-items: center;
}

a.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

a.cta-secondary {
  background: rgba(6, 7, 11, 0.55);
  color: #f0f2f6;
}

.station-turn {
  background: rgba(8, 10, 16, 0.9);
}

.turn-line {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #eef1f6;
  line-height: 1.55;
}

.turn-line:last-child {
  margin-bottom: 0;
}

.turn-punch {
  font-weight: 800;
  color: #fff;
  font-size: 1.05rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.receipt {
  max-height: 420px;
  color: #d4f5e0;
}

.caption {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8ced8;
  line-height: 1.5;
}

.verbs {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: #eef1f6;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.verbs li {
  margin-bottom: 0.55rem;
}

.verbs strong {
  color: #fff;
  font-weight: 800;
}

.verbs em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-weight: 600;
  color: #b8c0cc;
  font-size: 0.82rem;
}

.station-handoff .btn-prime {
  margin-top: 0.35rem;
}

html {
  scroll-behavior: smooth;
}
