/* barrage landing — DARK engineering monochrome.
   near-black canvas, hairlines, one amber accent, real terminal panels. */

/* ---------- custom dark monochrome theme ---------- */
[data-theme="barrage"] {
  color-scheme: dark;
  --color-base-100: oklch(14% 0 0);
  --color-base-200: oklch(17% 0 0);
  --color-base-300: oklch(27% 0 0);
  --color-base-content: oklch(93% 0 0);
  --color-primary: oklch(95% 0 0);
  --color-primary-content: oklch(12% 0 0);
  --color-secondary: oklch(65% 0 0);
  --color-secondary-content: oklch(12% 0 0);
  --color-accent: oklch(76% 0.13 75);
  --color-accent-content: oklch(14% 0 0);
  --color-neutral: oklch(94% 0 0);
  --color-neutral-content: oklch(14% 0 0);
  --color-info: oklch(70% 0 0);
  --color-info-content: oklch(14% 0 0);
  --color-success: oklch(75% 0 0);
  --color-success-content: oklch(14% 0 0);
  --color-warning: oklch(80% 0.15 85);
  --color-warning-content: oklch(14% 0 0);
  --color-error: oklch(68% 0.19 27);
  --color-error-content: oklch(98% 0 0);
  --radius-selector: 0.25rem;
  --radius-field: 0.375rem;
  --radius-box: 0.5rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 0;
  --noise: 0;

  /* surfaces */
  --panel: #101010;
  --panel-border: #262626;
}

html { scroll-behavior: smooth; }

[data-theme="barrage"] body {
  font-family: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.011em;
  background-color: #0d0d0d;
}

pre, code, kbd, .font-mono {
  font-family: "Geist Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace !important;
}

::selection { background: var(--color-accent); color: oklch(14% 0 0); }

/* ---------- buttons ---------- */
[data-theme="barrage"] .btn {
  transition: transform .14s ease, box-shadow .14s ease,
              background-color .14s ease, border-color .14s ease, color .14s ease;
}
[data-theme="barrage"] .btn-neutral {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 6px 20px rgba(0,0,0,.35);
}
@media (hover: hover) {
  [data-theme="barrage"] .btn-neutral:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 26px rgba(0,0,0,.45); }
  [data-theme="barrage"] .btn-outline:hover { background: rgba(255,255,255,.06); }
  [data-theme="barrage"] .btn:not(.btn-neutral):active,
  [data-theme="barrage"] .btn-neutral:active { transform: translateY(0) scale(.985); }
}
[data-theme="barrage"] :focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* buttons must adapt, not just wrap */
[data-theme="barrage"] .btn { white-space: nowrap; }
[data-theme="barrage"] .btn i { flex-shrink: 0; }
@media (max-width: 520px) {
  /* big CTAs go full-width stacked on phones */
  [data-theme="barrage"] .btn-lg {
    width: 100%;
    justify-content: center;
    height: 3rem;
    padding-inline: 0;
  }
  /* keep the nav cluster from crowding tiny screens */
  #gh-stars { display: none; }
}

/* film grain */
[data-theme="barrage"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .06;
  filter: contrast(125%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* faint blueprint grid over the whole canvas */
[data-theme="barrage"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
}
body > * { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- section rhythm ---------- */
.section-shell { max-width: 72rem; margin: 0 auto; padding: 6.5rem 1.25rem; }
@media (min-width: 640px) { .section-shell { padding: 7.5rem 1.5rem; } }
@media (min-width: 1024px) { .section-shell { padding: 9.5rem 1.5rem; } }
.section-alt {
  width: 100%;
  max-width: none !important;
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
}
.section-alt > :first-child { max-width: 72rem; margin-left: auto; margin-right: auto; }

.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 16px 0 0;
}
.lede {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.7;
  color: color-mix(in oklab, var(--color-base-content) 60%, transparent);
  max-width: 42rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Geist Mono Variable", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--color-accent);
  margin: 0;
}
.eyebrow i { font-size: 15px; }
.eyebrow::after {
  content: "";
  height: 1px;
  width: 44px;
  background: color-mix(in oklab, var(--color-accent) 45%, transparent);
}

.list-label {
  font-family: "Geist Mono Variable", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: color-mix(in oklab, var(--color-base-content) 45%, transparent);
  margin: 0 0 12px;
  font-weight: 600;
}

/* ---------- nav ---------- */
.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-field);
  font-size: 14px;
  color: color-mix(in oklab, var(--color-base-content) 62%, transparent);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: var(--color-base-content); }
.nav-link.active {
  color: var(--color-base-content);
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

/* mobile menu rows */
.m-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  border-radius: var(--radius-field);
  font-size: 15px;
  color: color-mix(in oklab, var(--color-base-content) 75%, transparent);
  text-decoration: none;
}
.m-link i { font-size: 19px; color: var(--color-accent); }
.m-link:active, .m-link:hover { background: rgba(255,255,255,.06); color: var(--color-base-content); }

/* scope list chips */
.chip {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
}
.chip i { font-size: 13px; }
.chip-yes { border: 1px solid color-mix(in oklab, var(--color-accent) 55%, transparent); color: var(--color-accent); background: rgba(255,255,255,.03); }
.chip-yes i { font-weight: 700; }
.chip-no { border: 1px solid #2e2e2e; color: #8a8a8a; background: rgba(255,255,255,.02); }

/* ---------- hero watermark ---------- */
.watermark {
  position: absolute;
  inset-inline: 0;
  top: 46%;
  transform: translateY(-50%);
  text-align: center;
  font-family: "Geist Mono Variable", monospace;
  font-weight: 700;
  font-size: clamp(6rem, 22vw, 20rem);
  line-height: 1;
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.055);
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

/* ---------- brand cursor ---------- */
.cursor { color: var(--color-accent); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- terminal windows ---------- */
.term {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-box);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 12px 48px rgba(0,0,0,.45);
  transition: border-color .18s ease;
}
@media (hover: hover) {
  .term:hover { border-color: #343434; }
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255,255,255,.02);
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  border: 1px solid #4a4a4a;
}
.term-bar .term-dot:nth-child(1) { background: #4d4d4d; }
.term-bar .term-dot:nth-child(2) { background: #3a3a3a; }
.term-bar .term-dot:nth-child(3) { background: #2b2b2b; }
.term-title {
  margin-left: 8px;
  font-family: "Geist Mono Variable", monospace;
  font-size: 12px;
  color: #8a8a8a;
}
.term pre {
  margin: 0;
  padding: 24px 28px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.9;
  color: #d9d9d9;
}
@media (max-width: 640px) {
  .term pre { padding: 18px 18px; font-size: 12px; line-height: 1.75; }
}
.term .c { color: #8f8f8f; }
.term .dim { color: #7a7a7a; }
.term b, .mini-term b { color: #ffffff; font-weight: 600; }

/* copy button lives inside the title bar */
.term-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid #333333;
  background: #181818;
  color: #9a9a9a;
  cursor: pointer;
  font-family: "Geist Mono Variable", monospace;
  font-size: 11px;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.term-copy::after { content: "copy"; }
.term-copy:hover { color: #ffffff; border-color: #555555; background: #1e1e1e; }
.term-copy.ok { color: var(--color-accent); border-color: var(--color-accent); }
.term-copy.ok::after { content: "copied"; }
.term-copy i { font-size: 14px; line-height: 1; }
@media (max-width: 640px) {
  .term-copy { padding: 0 7px; }
  .term-copy::after, .term-copy.ok::after { content: ""; }
}

.mini-term {
  margin: 0;
  background: #0a0a0a;
  border: 1px solid #222222;
  border-radius: var(--radius-field);
  padding: 18px 20px;
  overflow-x: auto;
}
.mini-term code {
  color: #d9d9d9;
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.85;
}

/* ---------- run simulator ---------- */
.term-sim pre { min-height: 480px; }
@media (max-width: 640px) { .term-sim pre { min-height: 420px; } }
.ln-t { color: #6f6f6f; }
.ln-k { font-weight: 600; }
.ln-k-http { color: #f2f2f2; }
.ln-k-db { color: #c4c4c4; }
.ln-k-redis { color: #969696; }
.ln-ok { color: #d9d9d9; }
.ln-dim { color: #7a7a7a; }
.ln-spike { color: var(--color-accent); font-weight: 700; }
.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  vertical-align: text-bottom;
  background: #d9d9d9;
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- fact list item ---------- */
.fact {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.fact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2e2e2e;
  border-radius: 9px;
  background: #161616;
  color: var(--color-accent);
}
.fact-icon i { font-size: 20px; }
.fact-body strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 15px;
}
.fact-body span {
  font-size: 14px;
  line-height: 1.68;
  color: color-mix(in oklab, var(--color-base-content) 64%, transparent);
}

/* ---------- signature: the shared clock ---------- */
.clock-diagram {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-box);
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 12px 48px rgba(0,0,0,.35);
}
.clock-layers { display: grid; grid-template-columns: repeat(3, 1fr); }
.layer {
  padding: 30px 26px;
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.layer:last-child { border-right: none; }
.ticks { display: flex; gap: 8px; }
.ticks i {
  flex: 1;
  height: 38px;
  border: 1px solid #2e2e2e;
  border-radius: 3px;
  background: #151515;
}
.ticks i.hit {
  background: repeating-linear-gradient(45deg, transparent 0 3px, #3a3a3a 3px 5px);
}
.ticks i.masked {
  background: repeating-linear-gradient(-45deg, transparent 0 3px,
    color-mix(in oklab, var(--color-accent) 55%, transparent) 3px 5px);
}
@media (max-width: 900px) {
  .clock-layers { grid-template-columns: 1fr; }
  .layer { border-right: none; border-bottom: 1px solid var(--panel-border); }
  .layer:last-child { border-bottom: none; }
}

/* quiet card hover lift */
.card { transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,0,0,.5); border-color: #3a3a3a; }
}

/* steps: amber markers on dark */
.step-primary:after { background-color: var(--color-accent) !important; color: oklch(14% 0 0) !important; }
.step-primary:before { color: color-mix(in oklab, var(--color-base-content) 55%, transparent) !important; }

/* ---------- journey line ---------- */
.journey {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-box);
  background: var(--panel);
  overflow-x: auto;
}
.jnode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Geist Mono Variable", monospace;
  font-size: 13px;
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 7px;
  border: 1px solid #2e2e2e;
  background: #161616;
  color: #d9d9d9;
}
.jmethod {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  padding: 2.5px 7px;
  border-radius: 4px;
}
.jmethod.post { background: var(--color-accent); color: oklch(14% 0 0); }
.jmethod.get { background: rgba(255,255,255,.08); color: #cfcfcf; }
.jextract {
  border-style: dashed;
  border-color: color-mix(in oklab, var(--color-accent) 55%, transparent);
  color: #e6e6e6;
}
.jextract b { font-weight: 600; }
.jarr { color: #5a5a5a; font-size: 16px; flex-shrink: 0; }

/* keep long inline code from stretching layout */
code { word-break: break-word; }
/* grid children must shrink below content width, or long terminal
   lines force their track wide and crush everything next to them */
.grid > * { min-width: 0; }
