/* ==========================================================================
   CodeWorks — landing page
   Single stylesheet. No framework, no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* surface */
  --bg: #080b14;
  --panel: #0a0f1c;
  --surface: #0f1524;
  --surface-2: #131b2e;
  --surface-3: #1b2440;
  --chrome: #0d1425;
  --well: #0b1120;

  /* line */
  --border: #1e2942;
  --border-soft: #141c30;
  --border-strong: #2a3450;

  /* brand */
  --brand: #5864ff;
  --brand-fill: #4a56f0;
  --brand-soft: #8e97ff;
  --brand-bright: #c0c5ff;
  --brand-tint: rgba(88, 100, 255, 0.16);
  --live: #34d399;

  /* type */
  --text-bright: #f2f5fd;
  --text: #e8ecf6;
  --text-2: #d6dbea;
  --text-3: #a8b0c6;
  --text-dim: #97a0b8;
  --text-muted: #7e8aa8;
  --text-faint: #6f7893;
  --text-faintest: #5e6782;

  /* type scale */
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* metrics */
  --container: 1200px;
  --gutter: 24px;
  --radius: 14px;
  --radius-lg: 18px;
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 1.3rem + 3.6vw, 3.875rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.625rem);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--brand-soft);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--brand-bright);
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hidden until focused, without pushing the layout wider (a negative `left`
   can widen the scroll area in some engines). */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--brand-fill);
  color: #fff;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 7vw, 104px) 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head > * + * {
  margin-top: 18px;
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

.lede {
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-dim);
}

.mono {
  font-family: var(--mono);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease;
}

.btn--primary {
  background: var(--brand-fill);
  color: #fff;
}

.btn--primary:hover {
  background: #5a66ff;
  color: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text-2);
  font-weight: 500;
}

.btn--ghost:hover {
  border-color: #3a4675;
  background: rgba(88, 100, 255, 0.07);
  color: var(--text-bright);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8, 11, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header__logo img {
  height: 26px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-right: auto;
}

.nav a {
  font-size: 0.875rem;
  color: var(--text-3);
}

.nav a:hover {
  color: var(--text-bright);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__signin {
  font-size: 0.875rem;
  color: var(--text-3);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--text-2);
}

/* Lives in the markup for the mobile menu only; the header shows its own CTA
   at wider sizes. */
.nav__cta {
  display: none;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 6vw, 88px) 0;
  isolation: isolate;
  /* the glow is wider than the viewport on purpose — clip it here rather than
     relying on overflow-x on <body>, which does not contain it */
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset-block-start: -340px;
  inset-inline-start: 50%;
  width: min(1600px, 160vw);
  aspect-ratio: 16 / 10;
  translate: -50% 0;
  background: radial-gradient(
    closest-side,
    rgba(88, 100, 255, 0.2),
    rgba(88, 100, 255, 0)
  );
  pointer-events: none;
  z-index: -1;
}

.hero__text {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

.dot-live {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hero__sub {
  max-width: 680px;
  margin: 26px auto 38px;
  font-size: clamp(1rem, 0.93rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text-dim);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}

.hero__micro {
  margin-bottom: clamp(36px, 5vw, 56px);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   7. Browser frame
   -------------------------------------------------------------------------- */

.frame {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--well);
  box-shadow: none;
  overflow: hidden;
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding-inline: 16px;
  border-bottom: 1px solid #1a2338;
  background: var(--chrome);
}

.frame__dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #222d4a;
}

.frame__url {
  flex-grow: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-faintest);
}

.frame__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: var(--live);
}

.frame__status .dot-live {
  width: 6px;
  height: 6px;
}

.frame__shot {
  display: block;
  width: 100%;
  height: auto;
}

/* fixed-height viewport for the showcase, so tabs don't jump */
.frame__viewport {
  height: clamp(300px, 44vw, 620px);
  overflow: hidden;
}

.frame__viewport .frame__shot {
  height: auto;
}

/* --------------------------------------------------------------------------
   8. Proof strip
   -------------------------------------------------------------------------- */

.proof {
  margin-top: clamp(56px, 7vw, 88px);
  padding-block: 38px 34px;
  border-block: 1px solid var(--border-soft);
  background: var(--panel);
}

.proof__row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 22px;
}

.proof__label {
  flex-shrink: 0;
  width: 132px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.proof__names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
}

.proof__names span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
}

.proof__note {
  margin-bottom: 30px;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.stat__num {
  font-family: var(--mono);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.stat__label {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   9. Data path
   -------------------------------------------------------------------------- */

.path__stages {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.stage {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 88px;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 12px 12px 0 0;
  background: var(--panel);
  color: var(--text-muted);
  text-align: left;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.stage:hover {
  color: var(--text-2);
  background: #0c121f;
}

.stage[aria-selected="true"] {
  border-color: var(--border);
  border-bottom-color: var(--surface);
  background: var(--surface);
  color: var(--text-bright);
}

.stage__n {
  font-family: var(--mono);
  font-size: 0.6875rem;
  opacity: 0.7;
}

.stage__name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.stage__sub {
  font-size: 0.75rem;
  opacity: 0.72;
}

.path__panel {
  min-height: 212px;
  padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.path__panel[hidden] {
  display: none !important;
}

.path__grid {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
}

.path__lead {
  flex-shrink: 0;
  width: 320px;
}

.path__lead h3 {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.path__lead p {
  font-size: 0.9375rem;
  color: var(--text-dim);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--brand-tint);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--brand-soft);
}

.path__items {
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.path__items--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.tile--lg {
  padding: 18px;
  border-color: var(--border-strong);
}

.tile__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.tile__meta {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tile__desc {
  margin-top: 8px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. Products
   -------------------------------------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.product:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.product__icon {
  width: 26px;
  height: 26px;
  color: var(--brand-soft);
}

.product p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticks li {
  position: relative;
  padding-left: 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-fill);
}

.ticks--lg li {
  padding-left: 18px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-3);
}

.ticks--lg li::before {
  width: 5px;
  height: 5px;
}

.product__unit {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.model {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 20px;
  padding: 32px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.model__defs {
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.model__term {
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--brand-soft);
}

.model__def {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.model__rule {
  align-self: stretch;
  width: 1px;
  background: var(--border);
}

.model__cta {
  flex-shrink: 0;
  width: 300px;
}

.model__cta p {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. Showcase
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease;
}

.tab:hover {
  color: var(--text-2);
  border-color: var(--border-strong);
}

.tab[aria-selected="true"] {
  border-color: #3a4675;
  background: var(--surface-3);
  color: var(--text-bright);
}

.showcase__cap {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.capsules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.capsule {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.capsule h3 {
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.capsule p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   12. Split blocks (Edge, Router/Store)
   -------------------------------------------------------------------------- */

.split {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.split--flip .split__media {
  order: -1;
}

.split__copy {
  flex-shrink: 0;
  width: 452px;
}

.split__copy h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem);
  margin-bottom: 18px;
}

.split__copy p {
  margin-bottom: 26px;
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text-dim);
}

.split__media {
  flex-grow: 1;
  min-width: 0;
  padding: 32px 28px;
  border: 1px solid #222d4a;
  border-radius: var(--radius-lg);
  background: var(--well);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* diagram */
.diagram {
  display: flex;
  align-items: center;
  gap: 16px;
}

.diagram__col {
  flex-shrink: 0;
  width: 152px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.diagram__col--narrow {
  width: 138px;
  gap: 8px;
}

.diagram__label {
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.node {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
}

.node--sm {
  padding: 10px 12px;
  font-size: 0.6875rem;
}

.node--hero {
  flex-grow: 1;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--brand-fill);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: 0 0 40px rgba(88, 100, 255, 0.18);
  font-family: var(--sans);
  font-size: inherit;
}

.node__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-bright);
}

.node__head svg {
  width: 18px;
  height: 18px;
  color: var(--brand-soft);
}

.node__lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.node__foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--text-faint);
}

.arrow {
  flex-shrink: 0;
  width: 34px;
  height: 24px;
  color: var(--border-strong);
}

.fan {
  flex-shrink: 0;
  width: 52px;
  height: 180px;
  color: var(--border-strong);
}

.hub {
  flex-shrink: 0;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub__card {
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
}

.hub__card--lit {
  border-color: var(--brand-fill);
  background: var(--surface-2);
  box-shadow: 0 0 36px rgba(88, 100, 255, 0.18);
}

.hub__name {
  margin-bottom: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.hub__card--lit .hub__name {
  color: var(--text-bright);
}

.hub__meta {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--text-faint);
}

.hub__card--lit .hub__meta {
  color: var(--brand-soft);
}

/* --------------------------------------------------------------------------
   13. Why / Security
   -------------------------------------------------------------------------- */

.why {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.why__item {
  padding-top: 22px;
  border-top: 2px solid var(--border-strong);
}

.why__item:first-child {
  border-top-color: var(--brand-fill);
}

.why__item h3 {
  margin-bottom: 10px;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.why__item p,
.security__item p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.security {
  padding: clamp(32px, 4vw, 52px) clamp(24px, 4vw, 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.security__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 56px;
}

.security__item h3 {
  margin-bottom: 10px;
  font-size: 1.0625rem;
}

.security__item p {
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   14. CTA
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--chrome);
  overflow: hidden;
  isolation: isolate;
}

.cta__glow {
  position: absolute;
  top: -160px;
  right: -60px;
  width: 620px;
  height: 420px;
  background: radial-gradient(
    closest-side,
    rgba(88, 100, 255, 0.28),
    rgba(88, 100, 255, 0)
  );
  pointer-events: none;
  z-index: -1;
}

.cta__inner {
  max-width: 700px;
}

.cta h2 {
  margin-bottom: 18px;
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem);
}

.cta p {
  margin-bottom: 34px;
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-3);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn--mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.footer {
  margin-top: clamp(64px, 7vw, 104px);
  padding-block: 56px 44px;
  border-top: 1px solid var(--border-soft);
}

.footer__top {
  display: flex;
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: 44px;
}

.footer__brand {
  flex-shrink: 0;
  width: 340px;
}

.footer__brand img {
  height: 24px;
  width: auto;
  margin-bottom: 18px;
}

.footer__brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-faint);
}

.footer__cols {
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer__head {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.footer__cols ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__cols a {
  font-size: 0.875rem;
  color: var(--text-3);
}

.footer__cols a:hover {
  color: var(--text-bright);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-faintest);
}

/* --------------------------------------------------------------------------
   16. Scroll reveal
   -------------------------------------------------------------------------- */

/* Scoped to .js so that if the script never runs, nothing is left invisible.
   The class is set by a one-line inline script in <head>. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .products,
  .capsules,
  .why {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    flex-direction: column;
    align-items: stretch;
  }

  .split--flip .split__media {
    order: 0;
  }

  .split__copy {
    width: auto;
  }

  .diagram {
    flex-direction: column;
    align-items: stretch;
  }

  .diagram__col,
  .diagram__col--narrow,
  .hub {
    width: auto;
  }

  .diagram__col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagram__label {
    grid-column: 1 / -1;
  }

  .hub {
    flex-direction: row;
  }

  .hub__card {
    flex: 1 1 0;
  }

  .arrow {
    width: 24px;
    height: 34px;
    rotate: 90deg;
    align-self: center;
  }

  .fan {
    width: 100%;
    height: 40px;
    rotate: 90deg;
    display: none;
  }
}

@media (max-width: 900px) {
  .nav,
  .header__signin {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header__inner {
    gap: 16px;
  }

  .header__logo {
    margin-right: auto;
  }

  /* open state: nav drops below the bar */
  .header.is-open .nav {
    position: absolute;
    inset-inline: 0;
    top: var(--header-h);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(8, 11, 20, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .header.is-open .nav a {
    padding-block: 14px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 1rem;
  }

  .header.is-open .nav a.nav__cta {
    border-bottom: 0;
  }

  .path__stages {
    flex-wrap: wrap;
  }

  .stage {
    flex: 1 1 calc(33.333% - 6px);
    border-radius: 12px;
    border-bottom-color: var(--border-soft);
  }

  .stage[aria-selected="true"] {
    border-bottom-color: var(--border);
  }

  .path__panel {
    margin-top: 8px;
    border-radius: var(--radius);
  }

  .path__grid {
    flex-direction: column;
  }

  .path__lead {
    width: auto;
  }

  .model {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  .model__rule {
    width: auto;
    height: 1px;
  }

  .model__cta {
    width: auto;
  }

  .security__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer__top {
    flex-direction: column;
    gap: 36px;
  }

  .footer__brand {
    width: auto;
  }
}

@media (max-width: 680px) {
  :root {
    --gutter: 20px;
    --header-h: 64px;
  }

  .products,
  .capsules,
  .why,
  .model__defs,
  .footer__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path__items,
  .path__items--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage {
    flex: 1 1 calc(50% - 4px);
  }

  .proof__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .proof__label {
    width: auto;
  }

  .hero__actions,
  .cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero__actions .btn,
  .cta__actions .btn {
    width: 100%;
  }

  /* logo + CTA + hamburger will not fit on a phone: the CTA moves into the menu */
  .header__actions .btn--primary {
    display: none;
  }

  .header.is-open .nav .nav__cta {
    display: flex;
    margin-top: 14px;
  }

  .diagram__col {
    grid-template-columns: minmax(0, 1fr);
  }

  .hub {
    flex-direction: column;
  }

  .btn--mono {
    font-size: 0.75rem;
    padding-inline: 16px;
  }

  /* on a phone the screenshot is shown zoomed, anchored left, so the
     track labels stay legible instead of shrinking to noise */
  .frame__viewport {
    height: 320px;
  }

  .frame__viewport .frame__shot {
    width: 260%;
    max-width: none;
  }

  .hero .frame__shot {
    width: 230%;
    max-width: none;
  }

  .hero .frame__viewport {
    height: 300px;
  }
}

/* --------------------------------------------------------------------------
   18. Motion / print
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .cta__glow,
  .hero__glow {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
