/* ============================================================
   TACHI_DESK — showcase site styles
   Brutalist / neo-retro hardware. Square corners. Hard shadows.
   ============================================================ */

:root {
  --bone: #f4f1ef;
  --paper: #ffffff;
  --ink: #0f0f0f;
  --sunken: #1a1a1a;
  --sunken-2: #232323;
  --purple: #6c39d6;
  --purple-bright: #8b5cf6;
  --purple-dim: #e9ddff;
  --orange: #ff4d00;
  --yellow: #fde400;
  --green: #2fbf71;
  --term-green: #3ddc84;
  --red: #e5484d;
  --grey: #8a8580;
  --sh: 6px;
  --sh-sm: 4px;
  --bw: 2px;
  --speed: 1;
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--purple); color: #fff; }

h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; }
a { color: inherit; }
button { font-family: var(--font-mono); cursor: pointer; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- hardware primitives ---------- */
.hardsh    { box-shadow: var(--sh) var(--sh) 0 var(--ink); }
.hardsh-sm { box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: var(--paper); color: var(--ink);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 14px;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  transition: transform calc(0.18s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1), box-shadow calc(0.18s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}
.btn:hover  { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--purple); color: #fff; }
.btn-dark    { background: var(--ink); color: #fff; }
.btn .glyph  { font-weight: 400; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: var(--bw) solid var(--ink);
  background: var(--paper);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.chip .sq { width: 10px; height: 10px; background: var(--purple); flex: none; }
.chip-purple { background: var(--purple); color: #fff; }
.chip-orange { background: var(--orange); color: var(--ink); }
.chip-yellow { background: var(--yellow); color: var(--ink); }
.chip-dark   { background: var(--sunken); color: var(--term-green); border-color: var(--ink); }

.card {
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
}

.speclabel {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey);
}

/* ---------- stamp-in scroll animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .stamp {
    opacity: 0;
    transform: translate(calc(var(--sh) * -1), calc(var(--sh) * -1));
    box-shadow: 0 0 0 var(--ink);
  }
  .stamp.in {
    opacity: 1;
    transform: translate(0, 0);
    transition:
      transform calc(0.32s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1),
      opacity   calc(0.28s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow calc(0.32s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--d, 0) * 0.07s * var(--speed));
  }
  .stamp.in.hardsh    { box-shadow: var(--sh) var(--sh) 0 var(--ink); }
  .stamp.in.hardsh-sm { box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink); }
  .stamp-flat { opacity: 0; transform: translateY(10px); }
  .stamp-flat.in {
    opacity: 1; transform: none;
    transition: transform calc(0.3s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1), opacity calc(0.26s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--d, 0) * 0.07s * var(--speed));
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bone);
  border-bottom: var(--bw) solid var(--ink);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.logo-sq { width: 22px; height: 22px; background: var(--purple); border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); flex: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: 4px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--purple); color: var(--purple); }
.nav-cta { display: flex; gap: 12px; }
.nav .btn { padding: 8px 16px; font-size: 12px; box-shadow: 3px 3px 0 var(--ink); }
.nav .btn:hover { box-shadow: 0 0 0 var(--ink); }
@media (max-width: 920px) { .nav-links { display: none; } }

.devbar {
  background: var(--ink); color: var(--bone);
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; padding: 7px 16px;
}
.devbar .dot { display: inline-block; width: 8px; height: 8px; background: var(--orange); margin: 0 10px 0 0; vertical-align: 1px; animation: blink 1s steps(2, end) infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 88px 0 96px; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.045;
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
@media (max-width: 1020px) { .hero-inner { grid-template-columns: 1fr; } }

.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(40px, 4.6vw, 62px);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 .hl {
  background: var(--purple); color: #fff; padding: 0 12px;
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-tagline {
  font-size: 17px; min-height: 54px; margin-bottom: 36px; max-width: 520px; color: #3a3733;
}
.cursor {
  display: inline-block; width: 10px; height: 1.15em; background: var(--purple);
  vertical-align: -0.18em; margin-left: 3px;
  animation: blink 1s steps(2, end) infinite;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-plats { display: flex; gap: 10px; flex-wrap: wrap; }

/* hero terminal */
.window {
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: var(--bw) solid var(--ink);
  background: var(--bone);
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.window-bar .wsq { width: 10px; height: 10px; border: 2px solid var(--ink); }
.window-bar .wsq.f { background: var(--ink); }
.window-bar .wtitle { margin-left: 6px; }
.window-bar .wright { margin-left: auto; display: flex; gap: 6px; }

.term {
  background: var(--sunken); color: var(--term-green);
  font-size: 13.5px; line-height: 1.75;
  padding: 22px 24px; min-height: 360px;
}
.term .t-dim { color: #777; }
.term .t-purple { color: var(--purple-bright); }
.term .t-orange { color: var(--orange); }
.term .t-white { color: #eee; }
.term .t-yellow { color: var(--yellow); }
.term-cursor { display: inline-block; width: 9px; height: 15px; background: var(--term-green); vertical-align: -2px; animation: blink 1s steps(2, end) infinite; }

/* stats strip */
.stats {
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  background: var(--paper);
}
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 26px 24px;
  border-right: var(--bw) solid var(--ink);
  text-align: center;
}
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.stat .n em { font-style: normal; color: var(--purple); }
.stat .l { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-top: 4px; }
@media (max-width: 860px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: var(--bw) solid var(--ink); }
}

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section-dark { background: var(--sunken); color: var(--bone); }
.section-dark .speclabel { color: #8d8d8d; }
.sec-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-idx {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  background: var(--ink); color: var(--bone); padding: 4px 10px; letter-spacing: 0.1em;
}
.section-dark .sec-idx { background: var(--purple); color: #fff; }
.sec-title { font-size: clamp(30px, 4vw, 48px); font-weight: 700; text-transform: uppercase; }
.sec-sub { max-width: 640px; color: #4a4742; margin-bottom: 56px; font-size: 15px; }
.section-dark .sec-sub { color: #a5a19c; }

/* ---------- providers wall ---------- */
.prov-marquee {
  border-top: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  background: var(--paper);
  overflow: hidden; padding: 18px 0;
  display: flex;
}
.prov-marquee + .prov-marquee { border-top: 0; }
.prov-track { display: flex; gap: 14px; padding-right: 14px; flex: none; animation: marquee calc(28s / var(--speed)) linear infinite; }
.prov-track.rev { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .prov-track { animation: none; } }
.prov {
  display: inline-flex; align-items: center; gap: 10px;
  border: var(--bw) solid var(--ink);
  background: var(--bone);
  padding: 10px 18px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  white-space: nowrap;
}
.prov .sq { width: 12px; height: 12px; flex: none; }
.prov-free { font-size: 10px; background: var(--green); color: var(--ink); padding: 2px 6px; font-weight: 700; letter-spacing: 0.08em; }
.prov-paid { font-size: 10px; background: var(--yellow); color: var(--ink); padding: 2px 6px; font-weight: 700; letter-spacing: 0.08em; }
.prov-local { font-size: 10px; background: var(--purple); color: #fff; padding: 2px 6px; font-weight: 700; letter-spacing: 0.08em; }

.prov-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; align-items: center; }

/* ---------- routing demo ---------- */
.route-grid { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
@media (max-width: 1020px) { .route-grid { grid-template-columns: 1fr; } }
.route-prompts { display: flex; flex-direction: column; gap: 14px; }
.route-prompt {
  text-align: left;
  background: var(--paper); border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink);
  padding: 14px 16px; font-size: 13px; line-height: 1.5;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.route-prompt:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.route-prompt .speclabel { display: block; margin-bottom: 4px; }
.route-prompt.active { background: var(--purple-dim); border-color: var(--purple); box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--purple); }

.route-chat-body { padding: 22px 24px; min-height: 380px; background: var(--sunken); display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; font-size: 13px; line-height: 1.6; }
.msg-user { align-self: flex-end; background: var(--purple); color: #fff; padding: 10px 14px; border: 2px solid #000; }
.msg-ai { align-self: flex-start; color: #ddd; }
.msg-ai .route-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: #000; border: 2px solid var(--purple-bright); color: var(--purple-bright);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; margin-bottom: 8px;
}
.msg-ai .route-tag .tier { background: var(--purple-bright); color: #000; padding: 1px 6px; }
.msg-ai .route-tag.t-orange { border-color: var(--orange); color: var(--orange); }
.msg-ai .route-tag.t-orange .tier { background: var(--orange); }
.msg-ai .route-tag.t-yellow { border-color: var(--yellow); color: var(--yellow); }
.msg-ai .route-tag.t-yellow .tier { background: var(--yellow); }
.msg-ai .route-tag.t-green { border-color: var(--term-green); color: var(--term-green); }
.msg-ai .route-tag.t-green .tier { background: var(--term-green); }

.route-meta { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: var(--bw) solid var(--ink); background: var(--bone); flex-wrap: wrap; }
.smart-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }
.smart-led { width: 12px; height: 12px; background: var(--purple); border: 2px solid var(--ink); animation: blink 2s steps(2, end) infinite; }
.saved { margin-left: auto; font-size: 13px; font-weight: 700; }
.saved .n { color: var(--purple); font-size: 18px; font-family: var(--font-display); }

/* ---------- private mode ---------- */
.priv-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
@media (max-width: 1020px) { .priv-grid { grid-template-columns: 1fr; } }

.hw-switch {
  display: inline-flex; align-items: center; gap: 18px;
  background: var(--sunken-2); border: var(--bw) solid #000;
  box-shadow: var(--sh) var(--sh) 0 #000;
  padding: 18px 22px; margin: 28px 0;
  user-select: none; cursor: pointer;
}
.hw-switch .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: #999; }
.hw-switch .lbl.on { color: var(--orange); }
.hw-track { width: 86px; height: 38px; background: #000; border: 2px solid #444; position: relative; flex: none; }
.hw-knob {
  position: absolute; top: 2px; left: 2px; width: 38px; height: 28px;
  background: var(--bone); border: 2px solid #000;
  transition: left 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}
.priv .hw-knob { left: 40px; background: var(--orange); }

.priv-badge {
  display: none;
  background: var(--orange); color: var(--ink); border: 2px solid #000;
  font-weight: 700; font-size: 12px; letter-spacing: 0.16em; padding: 5px 12px;
  box-shadow: 4px 4px 0 #000;
}
.priv .priv-badge { display: inline-block; }

.priv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 560px) { .priv-tiles { grid-template-columns: repeat(2, 1fr); } }
.ptile {
  background: var(--sunken-2); border: 2px solid #3a3a3a;
  padding: 16px 14px; position: relative; min-height: 92px;
  font-size: 13px; font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ptile .speclabel { display: block; margin-bottom: 6px; }
.ptile .led { position: absolute; top: 14px; right: 12px; width: 10px; height: 10px; background: var(--term-green); }
.ptile .locktag { display: none; position: absolute; inset: 0; background: rgba(0,0,0,0.82); color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; align-items: center; justify-content: center; }
.priv .ptile.cloud { border-color: #2a2a2a; }
.priv .ptile.cloud .led { background: #444; }
.priv .ptile.cloud .locktag { display: flex; }
.ptile.local { border-color: var(--purple-bright); }
.ptile.local .led { background: var(--purple-bright); }
.priv .ptile.local { background: #241a3d; }

.priv-net { margin-top: 18px; font-size: 12px; color: #8d8d8d; display: flex; align-items: center; gap: 10px; }
.netline { flex: 1; height: 0; border-top: 2px dashed var(--term-green); position: relative; transition: border-color 0.12s steps(1,end); }
.priv .netline { border-top-color: #555; }
.netline .cut { display: none; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); color: var(--orange); font-weight: 700; background: var(--sunken); padding: 0 6px; }
.priv .netline .cut { display: block; }
.priv-net .egress { font-weight: 700; color: var(--term-green); }
.priv .priv-net .egress { color: var(--orange); }

.priv-denies { display: none; margin-top: 14px; gap: 8px; flex-wrap: wrap; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.priv .priv-denies { display: flex; }
.priv-denies span { border: 2px solid #3a3a3a; padding: 3px 8px; background: #000; }
.priv-denies .no { color: var(--orange); border-color: var(--orange); }
.priv-denies .yes { color: var(--term-green); border-color: var(--term-green); }

/* ---------- catalog ---------- */
.hwbanner {
  display: flex; gap: 0; flex-wrap: wrap;
  border: var(--bw) solid var(--ink); background: var(--ink); color: var(--bone);
  box-shadow: var(--sh) var(--sh) 0 rgba(15,15,15,0.25);
  margin-bottom: 36px;
}
.hwbanner .cell { padding: 12px 20px; border-right: 2px solid #333; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.hwbanner .cell:last-child { border-right: 0; }
.hwbanner .cell em { font-style: normal; color: var(--term-green); }

.cat-search {
  display: flex; align-items: center; gap: 12px;
  background: var(--sunken); border: var(--bw) solid var(--ink);
  padding: 14px 18px; color: var(--term-green); font-size: 14px;
  margin-bottom: 28px;
}
.cat-search .pfx { color: var(--purple-bright); font-weight: 700; }

.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 1020px) { .cat-cards { grid-template-columns: 1fr; } }
.mcard { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink); display: flex; flex-direction: column; }
.mcard-head { padding: 16px 18px 10px; }
.mcard-head .nm { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.mcard-head .sz { font-size: 12px; color: var(--grey); }
.fit { margin: 0 18px; padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; border: 2px solid var(--ink); align-self: flex-start; }
.fit-ok   { background: var(--green); }
.fit-part { background: var(--yellow); }
.fit-no   { background: var(--orange); }
.mcard-caps { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 18px; }
.cap { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; border: 2px solid var(--ink); padding: 2px 7px; background: var(--bone); }
.mcard-foot { margin-top: auto; border-top: var(--bw) solid var(--ink); padding: 14px 18px; }
.dl-row { display: flex; gap: 10px; }
.dl-btn { flex: 1; padding: 10px; font-size: 12px; }
.dl-progress { margin-top: 12px; }
.dl-bar { height: 18px; border: 2px solid var(--ink); background: var(--bone); position: relative; overflow: hidden; }
.dl-bar .fill { position: absolute; inset: 0; width: 0%; background: var(--purple); }
.dl-stat { font-size: 11px; font-weight: 700; margin-top: 6px; letter-spacing: 0.04em; }
.dl-stat .t-green { color: var(--green); }

/* ---------- nodes ---------- */
.nodes-stage { position: relative; background: var(--sunken); border: var(--bw) solid var(--ink); box-shadow: var(--sh) var(--sh) 0 var(--ink); overflow: hidden; }
.nodes-dots { position: absolute; inset: 0; background-image: radial-gradient(#3a3a3a 1.5px, transparent 1.5px); background-size: 26px 26px; }
.nodes-inner { position: relative; padding: 48px 40px; min-height: 380px; }
.node {
  position: absolute; width: 218px;
  background: var(--sunken-2); border: 2px solid #000;
  box-shadow: 5px 5px 0 #000;
  font-size: 12px; color: #ddd;
}
.node-head { padding: 7px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: #fff; display: flex; justify-content: space-between; }
.node-head .tag { background: #000; padding: 0 6px; color: #fff; }
.node-body { padding: 12px; line-height: 1.5; }
.node-body .nm { font-weight: 700; color: #fff; font-size: 14px; }
.node-body .dim { color: #888; font-size: 11px; }
.n-provider .node-head { background: var(--purple); }
.n-agent    .node-head { background: var(--orange); color: var(--ink); }
.n-perm     .node-head { background: var(--green); color: var(--ink); }
.node .pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.node .pill { border: 1.5px solid #555; color: #aaa; font-size: 10px; padding: 1px 6px; }
.nodes-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wire { fill: none; stroke: var(--purple-bright); stroke-width: 3; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.in-view .wire { animation: wiredraw calc(0.9s * var(--speed)) cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.in-view .wire.w2 { animation-delay: calc(0.4s * var(--speed)); }
@keyframes wiredraw { to { stroke-dashoffset: 0; } }
.node-runchip { position: absolute; background: var(--purple-bright); color: #000; border: 2px solid #000; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; padding: 4px 10px; box-shadow: 4px 4px 0 #000; }

.swarm-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
@media (max-width: 1020px) { .swarm-row { grid-template-columns: 1fr; } }
.feat { background: var(--sunken-2); border: 2px solid #000; box-shadow: 5px 5px 0 #000; padding: 24px; }
.feat .speclabel { display: block; margin-bottom: 10px; }
.feat h3 { color: #fff; font-size: 20px; margin-bottom: 10px; text-transform: uppercase; }
.feat p { font-size: 13px; color: #a5a19c; }

/* ---------- workstation slider ---------- */
.rail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.rail-nav { margin-left: auto; display: flex; gap: 10px; }
.rail-btn {
  width: 48px; height: 48px; font-size: 18px; font-weight: 700;
  background: var(--paper); border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.rail-btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.rail-btn:disabled { opacity: 0.35; pointer-events: none; }
.rail {
  display: flex; gap: 28px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 8px 20px 8px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: none; width: min(520px, 86vw);
  scroll-snap-align: start;
}
.rail-card .window-bar .tabname { background: var(--purple); color: #fff; padding: 2px 8px; }
.rail-shot { background: var(--sunken); min-height: 280px; padding: 20px; font-size: 12px; color: #ccc; line-height: 1.7; }
.rail-desc { padding: 16px 18px; border-top: var(--bw) solid var(--ink); font-size: 13px; }
.rail-desc b { text-transform: uppercase; letter-spacing: 0.06em; }
.rail-dots { display: flex; gap: 8px; margin-top: 10px; }
.rail-dot { width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--paper); padding: 0; }
.rail-dot.on { background: var(--purple); }

/* mini mockups inside rail */
.mini-msg { background: #000; border: 1.5px solid #3a3a3a; padding: 8px 10px; margin-bottom: 8px; }
.mini-msg .who { color: var(--purple-bright); font-weight: 700; font-size: 10px; letter-spacing: 0.1em; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-tile { background: #000; border: 1.5px solid #3a3a3a; padding: 10px; font-size: 11px; }
.mini-tile .speclabel { display: block; }
.mini-bar { height: 10px; border: 1.5px solid #555; margin-top: 6px; position: relative; }
.mini-bar i { position: absolute; inset: 0; background: var(--purple-bright); display: block; }

/* ---------- languages / platforms ---------- */
.world-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 1020px) { .world-grid { grid-template-columns: 1fr; } }
.lang-card .term { min-height: 0; padding: 26px; }
.lang-line { font-size: 15px; }
.lang-line .t-purple { font-weight: 700; }
.lang-flips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.lang-chip { font-size: 11px; font-weight: 700; border: 2px solid #444; color: #999; padding: 3px 8px; letter-spacing: 0.08em; transition: none; }
.lang-chip.on { border-color: var(--term-green); color: var(--term-green); }
.plat-cards { display: flex; flex-direction: column; gap: 18px; }
.plat {
  display: flex; align-items: center; gap: 18px;
  background: var(--paper); border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink);
  padding: 18px 22px;
}
.plat .os { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.plat .speclabel { margin-left: auto; }
.plat .soon { background: var(--yellow); border: 2px solid var(--ink); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; padding: 2px 8px; }

/* ---------- open / token ---------- */
.open-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 1020px) { .open-grid { grid-template-columns: 1fr; } }
.open-card { padding: 32px; }
.open-card h3 { font-size: 26px; text-transform: uppercase; margin: 14px 0 12px; }
.open-card p { font-size: 14px; color: #4a4742; margin-bottom: 22px; }
.open-card .speclabel { font-size: 12px; }
.token-card { background: var(--ink); color: var(--bone); }
.token-card p { color: #a5a19c; }
.token-card .speclabel { color: #8d8d8d; }

/* ---------- footer ---------- */
.footer { background: var(--sunken); color: var(--bone); border-top: var(--bw) solid var(--ink); padding: 96px 0 48px; }
.footer-brand { display: flex; align-items: center; gap: 18px; justify-content: center; margin-bottom: 24px; }
.footer-sq { width: 44px; height: 44px; background: var(--purple); border: 2px solid #000; box-shadow: 5px 5px 0 #000; }
.footer-brand .nm { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: -0.02em; }
.footer-tag { text-align: center; font-size: 15px; color: var(--term-green); margin-bottom: 36px; }
.footer-ctas { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }
.footer-meta { text-align: center; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #777; border-top: 2px solid #333; padding-top: 28px; }
.footer-meta .row { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* tweaks mount */
#tweaks-mount:empty { display: none; }

/* ============================================================
   CONTRAST FIXES — light components inside .section-dark were
   inheriting the bone text color (white-on-white). Pin ink.
   ============================================================ */
.chip { color: var(--ink); }
.chip-purple { color: #fff; }
.chip-dark { color: var(--term-green); }
.window-bar { color: var(--ink); }
.route-meta { color: var(--ink); }
.route-prompt { color: var(--ink); }
.rail-btn { color: var(--ink); }
.plat { color: var(--ink); }
.stats { color: var(--ink); }

/* ============================================================
   FOR ARTISTS — media pipeline showcase
   ============================================================ */
.art-pipe {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr;
  gap: 0; align-items: stretch;
  margin-bottom: 56px;
}
@media (max-width: 1020px) { .art-pipe { grid-template-columns: 1fr; } .art-arrow { transform: rotate(90deg); margin: 4px auto; } }
.art-node {
  background: var(--paper); border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink);
  display: flex; flex-direction: column;
}
.art-node-head {
  padding: 8px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: var(--bw) solid var(--ink); color: #fff;
}
.art-node-head .tag { background: rgba(0,0,0,0.35); padding: 1px 7px; font-size: 10px; }
.an-ref .art-node-head { background: var(--green); color: var(--ink); }
.an-ref .art-node-head .tag { background: rgba(0,0,0,0.15); }
.an-prompt .art-node-head { background: var(--purple); }
.an-video .art-node-head { background: var(--orange); color: var(--ink); }
.an-video .art-node-head .tag { background: rgba(0,0,0,0.15); }
.art-node-body { padding: 14px; font-size: 12.5px; line-height: 1.55; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.art-node-body .dim { color: var(--grey); font-size: 11px; }
.art-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--bw) solid var(--ink); display: block; }
.art-prompt-box {
  background: var(--sunken); color: var(--term-green);
  padding: 10px 12px; font-size: 12px; line-height: 1.6; min-height: 84px;
}
.art-prompt-box .t-purple { color: var(--purple-bright); }
.art-arrow {
  align-self: center; padding: 0 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  color: var(--purple);
}
.art-runrow { display: flex; gap: 8px; margin-top: auto; }
.art-runrow .btn { padding: 7px 14px; font-size: 11px; box-shadow: 3px 3px 0 var(--ink); }
.art-film { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.art-film img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); display: block; filter: saturate(0.9); }
.art-film img.lit { outline: 3px solid var(--orange); outline-offset: -3px; filter: none; }
.art-video { width: 100%; border: var(--bw) solid var(--ink); display: block; background: #000; }

.art-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1020px) { .art-gallery { grid-template-columns: repeat(2, 1fr); } }
.art-out { background: var(--paper); border: var(--bw) solid var(--ink); box-shadow: var(--sh-sm) var(--sh-sm) 0 var(--ink); }
.art-out img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-bottom: var(--bw) solid var(--ink); }
.art-out figcaption { padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.art-out figcaption .ok { color: var(--purple); white-space: nowrap; }
.art-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; align-items: center; }

/* ============================================================
   I18N + MOBILE UX — language switcher, burger nav, small-screen
   polish. Desktop layout untouched above 920px (except the new
   language select in the nav).
   ============================================================ */

* { -webkit-tap-highlight-color: transparent; }
section[id], header[id] { scroll-margin-top: 96px; }

/* language switcher — brutalist chip-select */
.lang-sel {
  appearance: none; -webkit-appearance: none;
  padding: 8px 26px 8px 12px;
  border: var(--bw) solid var(--ink); border-radius: 0;
  background: var(--paper) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0h10L5 6z' fill='%230f0f0f'/></svg>") no-repeat right 8px center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-sel:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

/* burger + its panel — hidden on desktop */
.nav-burger { display: none; }
.nav-mobile { display: none; }

@media (max-width: 920px) {
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 38px; padding: 0 10px;
    background: var(--paper); border: var(--bw) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
  }
  .nav-burger span { display: block; height: 3px; background: var(--ink); transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.15s; }
  .nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-mobile {
    display: block;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bone); border-bottom: var(--bw) solid var(--ink);
    box-shadow: 0 10px 0 rgba(15, 15, 15, 0.15);
    transform: translateY(-10px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s, visibility 0.18s;
  }
  .nav-open .nav-mobile { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-mobile-links { display: flex; flex-direction: column; }
  .nav-mobile-links a {
    padding: 15px 24px; text-decoration: none;
    font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    border-top: 2px solid var(--ink); color: var(--ink);
  }
  .nav-mobile-links a:hover, .nav-mobile-links a:active { background: var(--purple); color: #fff; }
  .nav-mobile-lang { padding: 14px 24px 18px; border-top: 2px solid var(--ink); }
  /* on phones the switcher lives in the burger panel, not the crowded bar */
  .nav-cta > .lang-sel { display: none; }

  /* ---------- small-screen polish ---------- */
  .wrap { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-inner { gap: 36px; }
  .term { min-height: 300px; font-size: 12.5px; padding: 16px; }
  .route-chat-body { min-height: 320px; padding: 16px; }
  .sec-sub { margin-bottom: 36px; }
  .stat .n { font-size: 26px; }
  .footer-brand .nm { font-size: 30px; }
  .open-card { padding: 24px 20px; }
  .swarm-row { gap: 16px; }

  /* node canvas: the absolute art-directed layout can't fit a phone —
     stack the same nodes vertically, wires off. */
  .nodes-inner { display: flex; flex-direction: column; gap: 16px; padding: 24px 18px; min-height: 0; }
  .nodes-inner .node { position: static !important; width: 100%; }
  .nodes-svg { display: none; }
  .node-runchip { position: static !important; display: inline-block; align-self: flex-start; margin-top: 6px; }
}
