/* Tramed landing page. Plain CSS, no build step.
   The design is dark only; there is no light theme. */

:root {
  --bg: #0F1113;
  --bg-deep: #0B0D0F;
  --surface: #171A1D;
  --rule: #23282D;
  --border: #2A2F35;
  --border-strong: #3A4047;
  --ring: #4A525A;
  --track-done: #6B747D;
  --text: #E8EAEC;
  --text-2: #C9CED3;
  --muted: #A0A8B0;
  --dim: #8B949D;
  --accent: #C6F06A;
  --accent-hover: #DDF7A6;
  --info: #8FBCFF;
  --warn: #F2B45C;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

/* Default link colours. Component rules below override them on purpose:
   in the design only the plain text link ("Read the docs") changes on hover. */
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

.container {
  box-sizing: border-box;
  max-width: 1168px;
  margin: 0 auto;
  padding: 88px 24px;
  display: flex;
  flex-direction: column;
}

.band { border-bottom: 1px solid var(--rule); }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}
.section-head--wide { max-width: 760px; }

.muted { color: var(--muted); }

/* Buttons and the command chip */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.btn--sm { min-height: 44px; padding: 0 18px; }
.btn--lg { min-height: 56px; padding: 0 28px; }

.cmd {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 15px;
}
.cmd .prompt { color: var(--dim); margin-right: 10px; }
.cmd--lg { min-height: 56px; padding: 0 22px; font-size: 17px; }
.cmd--lg .prompt { margin-right: 12px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Header */

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .container {
  padding: 16px 24px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  display: block;
  width: 14px;
  height: 14px;
  background: var(--accent);
}
.brand-name {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 15px;
}
.site-nav a,
.footer-nav a {
  color: var(--text-2);
  text-decoration: none;
}

/* Hero */

.hero {
  background-image:
    repeating-linear-gradient(0deg, rgba(232, 234, 236, 0.04) 0, rgba(232, 234, 236, 0.04) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(232, 234, 236, 0.04) 0, rgba(232, 234, 236, 0.04) 1px, transparent 1px, transparent 32px);
}
.hero .container { padding: 88px 24px 72px; gap: 56px; }
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 880px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede { max-width: 640px; font-size: 19px; color: var(--text-2); }
.hero-note { font-size: 14px; color: var(--muted); }

/* Hero illustration: three intents moving along their thread */

.overview {
  box-sizing: border-box;
  padding: 20px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 0 16px 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.col-title { flex: 1 1 240px; min-width: 0; }
.col-track {
  flex: 2 1 300px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}
.col-status { flex: 0 0 176px; }

.thread {
  --d: -2s;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}
.thread--2 { --d: -9s; }
.thread--3 { --d: -16s; }
.strong { font-weight: 500; }
.sub { font-size: 12px; color: var(--muted); }

.stage { display: flex; align-items: center; }
.node { position: relative; width: 12px; height: 12px; flex: none; }
.node .ring {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid var(--ring);
}
.node .fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
}
.node .now {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
.node .now--validate { background: var(--info); }
.link {
  flex: 1;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}
.link > span {
  display: block;
  height: 100%;
  background: var(--track-done);
  transform-origin: left center;
  transform: scaleX(0);
}
.thread-status { display: grid; }
.thread-status > div { grid-area: 1 / 1; opacity: 0; }
.thread-status .ready { color: var(--info); }

/* Resting state. It is what shows when motion is reduced, and it equals the
   frame each row's loop is on at load: row 1 running, row 2 ready, row 3 shipped. */
.node .fill.on,
.node .now.on,
.thread-status > div.on { opacity: 1; }
.link > span.on { transform: scaleX(1); }

/* Sections */

.problem .container { gap: 40px; }
.problem h2 { max-width: 760px; text-wrap: balance; }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 32px;
}
.problem-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-strong);
}
.problem-item h3 { font-size: 17px; font-weight: 600; }
.problem-item p { color: var(--muted); }

.features .container { gap: 72px; }
.feature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 64px;
}
.feature--reverse { flex-wrap: wrap-reverse; }
.feature-copy {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-copy h3 { font-size: 26px; font-weight: 600; line-height: 1.2; }
.feature-copy p { color: var(--text-2); }
.feature-visual {
  flex: 1 1 380px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}

.terminal {
  padding: 20px 22px;
  background: var(--bg-deep);
  font-family: var(--mono);
  line-height: 1.8;
}
.terminal .prompt { color: var(--dim); }
.terminal .out { color: var(--muted); }
.terminal .spaced { margin-top: 10px; }
.terminal .tag { color: var(--accent); }

.signal {
  padding: 20px 22px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signal-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.signal-title { font-size: 17px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text-2);
}
.signal-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}
.pill--primary {
  border: 0;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.pill--quiet { color: var(--text-2); }

.proof {
  box-sizing: content-box;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.proof-row:last-child { border-bottom: 0; }
.criterion { flex: 1 1 200px; font-weight: 500; }
.verdict { display: inline-grid; justify-items: end; align-items: center; }
.verdict > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.verdict .checking { color: var(--muted); opacity: 0; }
.verdict .checking i {
  box-sizing: border-box;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
}
.verdict .done { color: var(--info); }
.verdict .done i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--info);
}
.verdict .gap { color: var(--warn); }
.verdict .gap i {
  width: 8px;
  height: 8px;
  background: var(--warn);
  transform: rotate(45deg);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}
.card {
  box-sizing: border-box;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 { font-size: 18px; font-weight: 600; }
.card p { font-size: 15px; color: var(--muted); }

.how .container { gap: 48px; }
.steps {
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 32px 0;
}
.steps li { display: flex; flex-direction: column; gap: 14px; }
.step-rail { display: flex; align-items: center; }
.step-rail .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.step-rail .bar { flex: 1; height: 2px; background: var(--border-strong); }
.step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 28px;
}
.step-body h3 { font-size: 18px; font-weight: 600; }
.step-body p { font-size: 15px; color: var(--muted); }

.compare .container { gap: 40px; }
.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.compare-table {
  min-width: 900px;
  display: flex;
  flex-direction: column;
  font-size: 15px;
}
.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: 0; }
.compare-row > span { padding: 16px 18px; color: var(--text-2); }
.compare-row > span:first-child { color: var(--muted); }
.compare-row > span:nth-child(2) { background: var(--surface); color: inherit; }
.compare-row--head > span {
  padding: 19px 18px 16px;
  color: inherit;
  font-weight: 600;
}
.compare-row--head > span:nth-child(2) {
  padding: 16px 18px;
  border-top: 3px solid var(--accent);
}
.compare-note { font-size: 13px; color: var(--muted); }

.pricing .container { gap: 40px; }
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}
.plan { padding: 28px; gap: 10px; }
.plan .price { font-family: var(--mono); font-size: 28px; font-weight: 500; }
.plan .price span {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

.install .container {
  padding: 104px 24px;
  align-items: flex-start;
  gap: 28px;
}
.install h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
}

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .container {
  padding: 28px 24px 40px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .legal { font-family: var(--mono); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* Animations. Every animated element carries data-anim so that reduced
   motion can switch all of them off with one rule and leave the resting state. */

/* 1. Hero threads: a 21 s loop per row, rows offset by a third of the loop.
      Every row starts 2 s into its loop, so two of them move within the
      first second.
      Stage windows: intent 0-13 %, plan 15-33 %, runs 35-59 %, proof 61-79 %,
      shipped 81-100 %. */
.thread [data-anim] {
  animation-duration: 21s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: var(--d);
}
.thread-track,
.thread-status { animation-name: trow; }
.ts1 { animation-name: ts1; }
.ts2 { animation-name: ts2; }
.ts3 { animation-name: ts3; }
.ts4 { animation-name: ts4; }
.ts5 { animation-name: ts5; }
.a2 { animation-name: a2; }
.a3 { animation-name: a3; }
.a4 { animation-name: a4; }
.a5 { animation-name: a5; }
.tl1 { animation-name: tl1; }
.tl2 { animation-name: tl2; }
.tl3 { animation-name: tl3; }
.tl4 { animation-name: tl4; }

/* The marker on the current stage. */
@keyframes ts1 { 0%, 13% { opacity: 1 } 15%, 100% { opacity: 0 } }
@keyframes ts2 { 0%, 13% { opacity: 0 } 15%, 33% { opacity: 1 } 35%, 100% { opacity: 0 } }
@keyframes ts3 { 0%, 33% { opacity: 0 } 35%, 59% { opacity: 1 } 61%, 100% { opacity: 0 } }
@keyframes ts4 { 0%, 59% { opacity: 0 } 61%, 79% { opacity: 1 } 81%, 100% { opacity: 0 } }
@keyframes ts5 { 0%, 79% { opacity: 0 } 81%, 100% { opacity: 1 } }
/* The filled dot of a stage that is behind the current one. */
@keyframes a2 { 0%, 13% { opacity: 0 } 15%, 100% { opacity: 1 } }
@keyframes a3 { 0%, 33% { opacity: 0 } 35%, 100% { opacity: 1 } }
@keyframes a4 { 0%, 59% { opacity: 0 } 61%, 100% { opacity: 1 } }
@keyframes a5 { 0%, 79% { opacity: 0 } 81%, 100% { opacity: 1 } }
/* The segment between two stages, drawn from the left. */
@keyframes tl1 { 0%, 13% { transform: scaleX(0) } 15%, 100% { transform: scaleX(1) } }
@keyframes tl2 { 0%, 33% { transform: scaleX(0) } 35%, 100% { transform: scaleX(1) } }
@keyframes tl3 { 0%, 59% { transform: scaleX(0) } 61%, 100% { transform: scaleX(1) } }
@keyframes tl4 { 0%, 79% { transform: scaleX(0) } 81%, 100% { transform: scaleX(1) } }
/* The whole row fades out and back in when its loop restarts. */
@keyframes trow { 0% { opacity: 0 } 3%, 96% { opacity: 1 } 100% { opacity: 0 } }

/* 2. Staggered reveal, 12 s loop: terminal lines and signal chips rise in one
      after the other, hold, then fade out together. All are in place 2.4 s
      after the page opens, for a reader who scrolls down at once. */
.r1, .r2, .r3, .r4, .r5, .r6 {
  animation-duration: 12s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}
.r1 { animation-name: r1; }
.r2 { animation-name: r2; }
.r3 { animation-name: r3; }
.r4 { animation-name: r4; }
.r5 { animation-name: r5; }
.r6 { animation-name: r6; }

@keyframes r1 { 0%, 1% { opacity: 0; transform: translateY(4px) } 3%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }
@keyframes r2 { 0%, 4% { opacity: 0; transform: translateY(4px) } 6%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }
@keyframes r3 { 0%, 7% { opacity: 0; transform: translateY(4px) } 9%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }
@keyframes r4 { 0%, 10% { opacity: 0; transform: translateY(4px) } 12%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }
@keyframes r5 { 0%, 15% { opacity: 0; transform: translateY(4px) } 17%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }
@keyframes r6 { 0%, 18% { opacity: 0; transform: translateY(4px) } 20%, 94% { opacity: 1; transform: translateY(0) } 100% { opacity: 0; transform: translateY(0) } }

/* 3. Proof verdicts, 12 s loop: each row shows "Checking again" for the first
      tenth of its loop, then its verdict. Rows start 0.2 s, 0.9 s and 1.6 s
      in. */
.verdict [data-anim] {
  animation-duration: 12s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-delay: var(--pd, 0s);
}
.verdict .checking { animation-name: pvc; }
.verdict .result { animation-name: pvv; }
.proof-row:nth-child(1) { --pd: 0.2s; }
.proof-row:nth-child(2) { --pd: 0.9s; }
.proof-row:nth-child(3) { --pd: 1.6s; }

@keyframes pvc { 0%, 10% { opacity: 1 } 12%, 100% { opacity: 0 } }
@keyframes pvv { 0%, 10% { opacity: 0 } 12%, 100% { opacity: 1 } }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { animation: none !important; }
}
