/* ==========================================================================
   BLUMBERG — landing page
   Display: Barlow Condensed Bold. Everything else: IBM Plex Mono.
   Near-black surfaces, hairline rules, lime used sparingly.
   ========================================================================== */

/* --------------------------------------------------------------------------
   FONTS — self-hosted, no CDN. Licences ship alongside in public/fonts/.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Barlow Condensed";
  src: url("public/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("public/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("public/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("public/fonts/IBMPlexMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   TOKENS — the official palette, verbatim, in one place.
   -------------------------------------------------------------------------- */
:root {
  /* official palette */
  --blumberg-lime: #ccff00;
  --blumberg-black: #080a09;
  --blumberg-ivory: #f3f1e8;
  --blumberg-panel: #0f1210;
  --blumberg-muted: #949c91;
  --blumberg-gain: #62d99b;
  --blumberg-loss: #ff807e;
  --blumberg-warning: #f5c96a;

  /* derived surfaces — tints of the palette, no new hues */
  --rule: rgba(243, 241, 232, 0.14);
  --rule-soft: rgba(243, 241, 232, 0.07);
  --rule-lime: rgba(204, 255, 0, 0.4);
  --wash: rgba(243, 241, 232, 0.03);
  --lime-wash: rgba(204, 255, 0, 0.08);

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --gutter: clamp(2.5rem, 8vw, 7rem);
  --maxw: 1440px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--blumberg-black);
  color: var(--blumberg-ivory);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* the UA sheet would otherwise swap in the system mono and undo the self-hosted face */
code,
kbd {
  font: inherit;
  color: var(--blumberg-lime);
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
   FOCUS — always visible, never removed.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--blumberg-lime);
  outline-offset: 3px;
}
/* lime-on-lime would be invisible: the lime CTA gets an ivory ring instead */
.btn--lime:focus-visible {
  outline: 2px solid var(--blumberg-ivory);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blumberg-lime);
  color: var(--blumberg-black);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* the 01 / 02 / 03 print-poster section marker */
.marker {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
  padding-block: 1rem 2.5rem;
}
.marker__num {
  color: var(--blumberg-ivory);
  font-weight: 700;
}
.marker__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}

/* Display headings — huge condensed caps, tight leading, per the moodboard */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.005em;
  color: var(--blumberg-ivory);
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--blumberg-ivory);
  cursor: pointer;
  white-space: nowrap;
}

.btn--lime {
  background: var(--blumberg-lime);
  border-color: var(--blumberg-lime);
  /* black on lime — the only readable pairing for lime as a fill */
  color: var(--blumberg-black);
}

.btn--ghost:hover {
  border-color: var(--blumberg-lime);
  color: var(--blumberg-lime);
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.18s ease, color 0.18s ease,
      border-color 0.18s ease, transform 0.18s ease;
  }
  .btn:hover {
    transform: translateY(-1px);
  }
  .btn--lime:hover {
    background: var(--blumberg-ivory);
    border-color: var(--blumberg-ivory);
  }
}

/* --------------------------------------------------------------------------
   01 — NAV
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 10, 9, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand__mark {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: none;
}
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blumberg-ivory);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}
.nav__links a:hover {
  color: var(--blumberg-lime);
}
.nav__cta {
  padding: 0.6rem 1.15rem;
  font-size: 0.6875rem;
}

@media (max-width: 720px) {
  .nav__links {
    gap: 1.1rem;
  }
  .nav__links .nav__link {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   02 — HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem);
  position: relative;
}

/* The tie stands beside the whole headline block at roughly its height, as on
   the moodboard, and the headline runs the full measure of the shell. */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.75rem);
  align-items: stretch;
}

/* the crooked tie, treated as a flat lime graphic element */
.hero__tie {
  width: clamp(72px, 19vw, 300px);
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  align-self: stretch;
  padding-bottom: 0.06em;
  /* the mark PNG is already lime on transparent — keep it as-is */
}

/* fills the measure: two lines of ~9 characters at the shell's inner width */
.hero__title {
  font-size: clamp(3.2rem, 15.5vw, 14rem);
  margin-bottom: 0;
}
.hero__period {
  color: var(--blumberg-lime);
}

/* the supporting band sits under the headline: rule, then copy and actions
   in two columns, so the hero has one big gesture and one quiet register */
.hero__band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.25rem, 2vw, 1.75rem) clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(1.75rem, 3.5vw, 2.75rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--rule);
}
.hero__band .hero__kicker {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.hero__col {
  min-width: 0;
}

@media (max-width: 860px) {
  .hero__band {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.hero__sub {
  max-width: 46ch;
  color: var(--blumberg-muted);
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.hero__sub strong {
  color: var(--blumberg-ivory);
  font-weight: 500;
}

.hero__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* the terminal line with the blinking cursor */
.termline {
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  margin-top: 1.5rem;
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  color: var(--blumberg-lime);
  letter-spacing: 0.06em;
  max-width: 100%;
}
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 0.15em;
  background: var(--blumberg-lime);
  vertical-align: text-bottom;
}
@media (prefers-reduced-motion: no-preference) {
  .cursor {
    animation: blink 1.1s steps(1, end) infinite;
  }
}
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 800px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__tie {
    max-width: 96px;
  }
}

/* --------------------------------------------------------------------------
   03 — THE TAPE DEMO PANEL (full-bleed, terminal chrome)
   -------------------------------------------------------------------------- */
.demo {
  background: var(--blumberg-panel);
  border-block: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.demo__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
}
.demo__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 0.88;
}
.demo__note {
  color: var(--blumberg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  max-width: 52ch;
}

/* terminal chrome frame */
.terminal {
  border: 1px solid var(--rule);
  background: var(--blumberg-black);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: var(--wash);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}
.terminal__mark {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: none;
}
.terminal__name {
  color: var(--blumberg-ivory);
  font-weight: 700;
  letter-spacing: 0.16em;
}
.terminal__path {
  color: var(--blumberg-muted);
}
.terminal__status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blumberg-warning);
  white-space: nowrap;
}
.terminal__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blumberg-warning);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .terminal__dot {
    animation: pulse 2s ease-in-out infinite;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* the mount point the tape widget fills. Left empty in the markup. */
#tape-demo {
  overflow-x: auto;
  overflow-y: hidden;
}

.terminal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}
.terminal__foot .lime {
  color: var(--blumberg-lime);
}

/* --------------------------------------------------------------------------
   04 — FEATURES
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 8vw, 6.5rem);
}

.section__title {
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.section__lede {
  color: var(--blumberg-muted);
  max-width: 58ch;
  font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.feature {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.feature__num {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--blumberg-muted);
  font-weight: 700;
}
.feature__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 0.95;
  color: var(--blumberg-ivory);
}
.feature__body {
  color: var(--blumberg-muted);
  font-size: 0.8125rem;
  line-height: 1.75;
}
.feature__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.chip {
  border: 1px solid var(--rule);
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
  white-space: nowrap;
}
.chip--lime {
  border-color: var(--rule-lime);
  color: var(--blumberg-lime);
}
.chip--gain {
  color: var(--blumberg-gain);
  border-color: rgba(98, 217, 155, 0.35);
}
.chip--loss {
  color: var(--blumberg-loss);
  border-color: rgba(255, 128, 126, 0.35);
}
.chip--warn {
  color: var(--blumberg-warning);
  border-color: rgba(245, 201, 106, 0.35);
}

/* --------------------------------------------------------------------------
   05 — HOW IT WORKS (CSS/SVG diagram, no images)
   -------------------------------------------------------------------------- */
.pipeline {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: 1fr;
}

.stage {
  border: 1px solid var(--rule);
  background: var(--blumberg-panel);
  padding: clamp(1.25rem, 3vw, 2rem);
  position: relative;
  min-width: 0;
}
.stage--pending {
  border-left: 2px solid var(--blumberg-muted);
}
.stage--resolved {
  border-left: 2px solid var(--blumberg-lime);
}
.stage--failed {
  border-left: 2px solid var(--blumberg-loss);
}

.stage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.stage__step {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--blumberg-muted);
  font-weight: 700;
}
.stage__name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 2.6vw, 1.875rem);
  line-height: 1;
}
.stage__meta {
  margin-left: auto;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}
.stage__body {
  color: var(--blumberg-muted);
  font-size: 0.8125rem;
  line-height: 1.75;
  max-width: 62ch;
  margin-bottom: 1.25rem;
}

/* a static, hand-built sample row so the two states are visible side by side */
/* The sample rows keep the tape's rigid column rhythm, so on a narrow screen
   they scroll inside their own frame rather than widening the page. */
.samplescroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.samplerow {
  display: grid;
  grid-template-columns: 4.75rem 1.5rem 8.5rem minmax(0, 1fr) 4.5rem 4rem;
  gap: 0 0.75rem;
  align-items: center;
  border: 1px solid var(--rule-soft);
  background: var(--blumberg-black);
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
/* Only force the scroll when the rigid columns genuinely can't fit. */
@media (max-width: 900px) {
  .samplerow {
    min-width: 31rem;
  }
}
.samplerow + .samplerow {
  border-top: 0;
}
.samplerow__head {
  color: var(--blumberg-muted);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--wash);
}
.cell--time {
  color: var(--blumberg-muted);
}
.cell--glyph {
  text-align: center;
  font-weight: 700;
}
.cell--handle {
  color: var(--blumberg-ivory);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell--text {
  color: var(--blumberg-ivory);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.is-pending {
  color: var(--blumberg-muted);
}
.is-lime {
  color: var(--blumberg-lime);
}
.is-gain {
  color: var(--blumberg-gain);
}
.is-loss {
  color: var(--blumberg-loss);
}
.is-warn {
  color: var(--blumberg-warning);
}
.is-empty {
  color: rgba(148, 156, 145, 0.45);
}

/* the branch connector, drawn in CSS */
.branch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 1rem;
  color: var(--blumberg-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.branch__stem {
  width: 1px;
  height: 28px;
  background: var(--rule);
  flex: none;
}
.branch__arrow {
  flex: none;
}
.branch__label {
  flex: none;
}
.branch__fill {
  flex: 1;
  height: 1px;
  background: var(--rule-soft);
  min-width: 1rem;
}

.outcomes {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.footnote {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--blumberg-muted);
  font-size: 0.75rem;
  line-height: 1.8;
  max-width: 70ch;
}

/* --------------------------------------------------------------------------
   06 — FOOTER
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}
.footer__tag {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  /* sized so the single line spans the shell without overflowing it */
  font-size: clamp(1.0625rem, 4.05vw, 3.75rem);
  letter-spacing: -0.01em;
  color: var(--blumberg-ivory);
  line-height: 1.15;
  margin-block: 2.5rem 3rem;
  white-space: nowrap;
}
/* the line must be allowed to shrink, or nowrap text pushes the mark out of
   the shell and the whole page gains a horizontal scrollbar */
.footer__tag > span {
  min-width: 0;
  overflow: hidden;
}
.footer__tag-mark {
  width: clamp(28px, 3.4vw, 56px);
  height: auto;
  margin-left: auto;
  flex: none;
}
@media (max-width: 720px) {
  .footer__tag {
    white-space: normal;
    font-size: clamp(1.0625rem, 7vw, 2rem);
  }
}
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blumberg-muted);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-left: auto;
}
.footer__links a:hover {
  color: var(--blumberg-lime);
}
.footer__fine {
  margin-top: 1.5rem;
  font-size: 0.6875rem;
  color: var(--blumberg-muted);
  line-height: 1.8;
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   PHONE REFINEMENTS
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  body {
    font-size: 13px;
  }
  .marker {
    padding-block: 0.75rem 1.75rem;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .samplerow {
    grid-template-columns: 3.75rem 1.25rem 6rem minmax(90px, 1fr) 3.25rem 3rem;
    font-size: 0.625rem;
    gap: 0 0.4rem;
    padding-inline: 0.4rem;
  }
  .footer__links {
    margin-left: 0;
    width: 100%;
  }
}
