/* RUBIX website. Brand tokens from the rubix-design skill: the dark app theme (.dark block of the
 * APP TOKENS) and the eight brand accents, which are identical in both themes. Poppins for
 * headings, Open Sans for text, both self-hosted (OFL). Spacing is the 4px scale. */
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/assets/poppins-600.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/assets/poppins-700.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url("/assets/opensans-400.ttf") format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url("/assets/opensans-600.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  /* Dark app tokens. */
  --background: 222 22% 8%;
  --foreground: 210 20% 92%;
  --card: 222 20% 11%;
  --border: 222 14% 18%;
  --muted-foreground: 220 8% 62%;
  --primary: 218.7 74.6% 62%;
  --ring: 218.7 74.6% 62%;
  --radius: 0.75rem;
  /* Brand accents. */
  --brand-navy: #17479E;
  --brand-green: #00A890;
  --brand-cyan: #08C0DE;
  --brand-lime: #C4D52E;
  --brand-orange: #FAA21B;
  --brand-red: #EF3A4C;
  --brand-purple: #AB4499;
  --brand-pink: #F27FB2;
  /* Dark-theme text tints of the accents, for text and icons on near-black. */
  --blue-tx: #7FA8E8;
  --ok-tx: #4FCFB6;
  --cy-tx: #5BD9EE;
  --warn-tx: #E0A24B;
  --red-tx: #F4707E;
  --pur-tx: #C97FBC;

  --bg: hsl(var(--background));
  --fg: hsl(var(--foreground));
  --muted: hsl(var(--muted-foreground));
  --line: hsl(var(--border));
  --card-bg: hsl(var(--card));
  --font-display: "Poppins", "Open Sans", system-ui, sans-serif;
  --font-sans: "Open Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 20px 40px -8px rgb(0 0 0 / .45);
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font-sans); overflow-x: hidden; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 5.2vw, 74px); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
.stop { color: var(--brand-green); }
.grad { background: linear-gradient(90deg, var(--blue-tx), var(--brand-cyan) 35%, var(--brand-green) 65%, var(--brand-lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 600 13px/1 var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--brand-cyan); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 4px; height: 16px; background: currentColor; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--muted); max-width: 40rem; }
.fine { font-size: 14px; color: var(--muted); }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 16px; border-radius: 8px; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--font-sans); text-decoration: none; border-radius: 10px; padding: 14px 22px; min-height: 48px; transition: transform 180ms var(--ease), background-color 180ms var(--ease), box-shadow 180ms var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand-navy); color: #fff; box-shadow: 0 0 0 1px rgb(127 168 232 / .35), 0 10px 30px -8px rgb(23 71 158 / .9); }
.btn-primary:hover { background: #1d55b8; box-shadow: 0 0 0 1px rgb(127 168 232 / .6), 0 14px 40px -8px rgb(23 71 158 / 1); }
.btn-primary .i { transition: transform 180ms var(--ease); }
.btn-primary:hover .i { transform: translateX(3px); }
.btn-ghost { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.btn-sm { padding: 10px 16px; min-height: 40px; font-size: 14px; }
.btn-lg { padding: 18px 30px; font-size: 17px; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 32px; padding: 16px max(24px, calc((100vw - var(--max)) / 2)); transition: background-color 240ms var(--ease), box-shadow 240ms var(--ease); }
.nav.solid { background: rgb(14 20 33 / .96); box-shadow: 0 1px 0 var(--line); }
.nav-logo img { height: 32px; width: auto; }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; transition: color 180ms; }
.nav nav a:hover { color: var(--fg); }
@media (max-width: 760px) { .nav nav { display: none; } .nav .btn { margin-left: auto; } }

/* Sections */
section { position: relative; }
.section-head { display: grid; gap: 16px; max-width: var(--max); margin: 0 auto 48px; padding: 0 24px; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Hero */
.hero { min-height: max(100vh, 780px); padding: 112px 24px 40px; display: grid; justify-items: center; align-content: start; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgb(127 168 232 / .16) 1px, transparent 1.2px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 55%, #000 30%, transparent 75%); }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.glow-a { width: 46vw; height: 46vw; left: 27vw; top: 40%; background: radial-gradient(circle, rgb(23 71 158 / .9), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.glow-b { width: 30vw; height: 30vw; left: 52vw; top: 18%; background: radial-gradient(circle, rgb(0 168 144 / .35), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-6vw, 4vh) scale(1.1); } }
.hero-copy { position: relative; z-index: 4; display: grid; justify-items: center; text-align: center; gap: 20px; max-width: 920px; }
.hero-copy .lead { max-width: 40rem; }
.core.tight .core-label { display: none; }
.hero-copy .lead { margin: 0 auto; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; }
.ctas .fine { flex-basis: 100%; }
@media (min-width: 761px) {
  /* Desktop hero: the stage fills the hero; the core sits under the buttons and the apps fan out on a wide arc around it. */
  .hero .stage { position: absolute; inset: 0; max-width: none; height: auto; margin: 0; }
  .hero .ctas .fine { flex-basis: auto; }
}

/* Stage: the core with the apps around it. Shared by the hero and the story. */
.stage { position: relative; width: 100%; max-width: var(--max); height: clamp(460px, 62vh, 640px); margin-top: 8px; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core { position: absolute; left: 50%; top: var(--cy, 50%); width: 180px; height: 180px; transform: translate(-50%, -50%); display: grid; place-items: center; z-index: 2; }
.core .mark { width: 112px; height: auto; position: relative; z-index: 2; filter: drop-shadow(0 0 24px rgb(8 192 222 / .35)); }
.core-label { position: absolute; top: 100%; margin-top: 8px; white-space: nowrap; font: 600 12px/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgb(127 168 232 / .25); animation: pulse 4.5s var(--ease) infinite; }
.ring.r2 { animation-delay: 1.5s; }
.ring.r3 { animation-delay: 3s; }
@keyframes pulse { 0% { transform: scale(.55); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.core::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgb(23 71 158 / .7), rgb(14 20 33 / 0) 70%); }
.core.small { width: 140px; height: 140px; }
.core.small .mark { width: 84px; }

.mark .edge { stroke-width: 22; stroke-linecap: round; }
.mark .node { transition: transform 300ms var(--ease); transform-box: fill-box; transform-origin: center; }
.mark .node.ping { animation: ping 700ms var(--ease); }
@keyframes ping { 40% { transform: scale(1.35); } }
.mark .edge.flow { stroke-dasharray: 8 10; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }

.chip { position: absolute; left: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: rgb(22 29 44 / .92); box-shadow: 0 0 0 1px rgb(255 255 255 / .07), var(--shadow); will-change: transform; cursor: default; transition: box-shadow 240ms var(--ease); white-space: nowrap; }
.chip:hover, .chip.hot { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent), 0 0 32px -4px color-mix(in srgb, var(--c) 55%, transparent), var(--shadow); }
.chip .ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.chip .nm { display: grid; line-height: 1.25; }
.chip .nm b { font: 600 14px/1.3 var(--font-display); }
.chip .nm i { font-style: normal; font-size: 12px; color: var(--muted); min-width: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.chip .live { width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); margin-left: 2px; animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
@media (max-width: 760px) {
  .stage { height: 520px; }
  .chip { padding: 6px; border-radius: 12px; }
  .chip .nm, .chip .live { display: none; }
  .chip.compact .nm { display: grid; }
  .core { width: 140px; height: 140px; }
  .core .mark { width: 80px; }
}

/* Compact chips: an icon with its name under it, for the narrower story stage. */
.chip.compact { flex-direction: column; gap: 6px; padding: 0; background: none; box-shadow: none; }
.chip.compact .ic { width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, rgb(22 29 44)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), var(--shadow); transition: box-shadow 240ms var(--ease); }
.chip.compact .nm b { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.chip.compact .nm i, .chip.compact .live { display: none; }
.chip.compact:hover, .chip.compact.hot { box-shadow: none; }
.chip.compact:hover .ic, .chip.compact.hot .ic { box-shadow: 0 0 0 1px var(--c), 0 0 24px -2px var(--c); }

/* Story: pinned while you scroll through it. */
.story { height: 520vh; }
.story-pin { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 32px; max-width: var(--max); margin: 0 auto; padding: 72px 24px 24px; }
.story-copy { position: relative; min-height: 320px; }
.story-step { position: absolute; inset: 0 0 auto; display: grid; gap: 16px; opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); pointer-events: none; }
.story-step.on { opacity: 1; transform: none; }
.story-step .num { font: 700 14px/1 var(--font-display); letter-spacing: .14em; color: var(--red-tx); }
.story-step .num.ok { color: var(--brand-green); text-transform: uppercase; }
.story-step p { color: var(--muted); font-size: 18px; max-width: 30rem; }
.story-progress { position: absolute; left: 0; top: calc(100% + 24px); width: 180px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.story-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--brand-red), var(--brand-orange) 50%, var(--brand-green)); }
.story-stage { height: min(640px, 78vh); margin: 0; }
.conflict { position: absolute; z-index: 4; display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgb(30 11 15 / .92); box-shadow: 0 0 0 1px rgb(244 112 126 / .45), var(--shadow); font-size: 12px; opacity: 0; transform: scale(.9); transition: opacity 400ms var(--ease), transform 400ms var(--ease); pointer-events: none; }
.conflict.on { opacity: 1; transform: none; }
.conflict b { font: 600 11px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--red-tx); }
.conflict span { color: var(--fg); }
.conflict span + span::before { content: "vs "; color: var(--muted); }
.conflict.c1 { left: 4%; top: 8%; }
.conflict.c2 { right: 2%; top: 30%; }
.conflict.c3 { left: 10%; bottom: 12%; }
.conflict.c4 { right: 8%; bottom: 6%; }
.conflict.c4 span::before { content: none; }
@media (max-width: 900px) {
  .story { height: 560vh; }
  .story-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 8px; padding-top: 80px; }
  .story-copy { min-height: 210px; }
  .story-step p { font-size: 16px; }
  .story-progress { display: none; }
  .story-stage { height: calc(100vh - 320px); min-height: 340px; }
  .conflict { font-size: 11px; }
}

/* Thread: one customer through the apps. */
.thread { padding: 120px 0; }
.thread-track { position: relative; max-width: 980px; margin: 0 auto; padding: 0 24px; }
.thread-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--line); }
.thread-fill { position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p, 0)); background: linear-gradient(180deg, var(--brand-cyan), var(--blue-tx), var(--pur-tx), var(--brand-purple), var(--brand-lime), var(--brand-green), var(--brand-orange)); }
.thread-head { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .15), 0 0 24px 6px rgb(8 192 222 / .6); }
.thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.thread-item { position: relative; width: calc(50% - 48px); opacity: .25; transform: translateY(12px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.thread-item:nth-child(odd) { justify-self: start; text-align: right; }
.thread-item:nth-child(even) { justify-self: end; }
.thread-item.on { opacity: 1; transform: none; }
.thread-item .dot { position: absolute; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); transition: box-shadow 400ms, background-color 400ms; }
.thread-item:nth-child(odd) .dot { right: -55px; }
.thread-item:nth-child(even) .dot { left: -55px; }
.thread-item.on .dot { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 0 18px var(--c); }
.thread-card { display: grid; gap: 8px; padding: 20px 24px; border-radius: 16px; background: var(--card-bg); box-shadow: 0 0 0 1px rgb(255 255 255 / .05); }
.thread-item.on .thread-card { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 20px 40px -20px color-mix(in srgb, var(--c) 40%, transparent); }
.thread-meta { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.thread-item:nth-child(odd) .thread-meta { justify-content: flex-end; }
.thread-meta time { color: var(--muted); letter-spacing: .04em; }
.thread-card p { color: var(--muted); font-size: 15px; }
.thread-card .link { font: 500 12px/1.4 ui-monospace, "JetBrains Mono", monospace; color: var(--fg); opacity: .8; }
@media (max-width: 760px) {
  .thread-line { left: 31px; }
  .thread-head { left: 0; }
  .thread-item, .thread-item:nth-child(odd), .thread-item:nth-child(even) { width: auto; justify-self: stretch; text-align: left; margin-left: 40px; }
  .thread-item:nth-child(odd) .thread-meta { justify-content: flex-start; }
  .thread-item:nth-child(odd) .dot, .thread-item:nth-child(even) .dot { left: -36px; right: auto; }
}

/* Lineage */
.lineage { padding: 120px 0; }
.lineage-card { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.lineage-scroll { overflow-x: auto; border-radius: 20px; background: linear-gradient(180deg, rgb(255 255 255 / .03), rgb(255 255 255 / .01)); box-shadow: 0 0 0 1px rgb(255 255 255 / .06); }
.lineage-graph { width: 100%; min-width: 820px; height: auto; padding: 16px; }
.lg-col { font: 600 12px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; fill: var(--muted); }
.lg-edge { fill: none; stroke: rgb(255 255 255 / .12); stroke-width: 1.5; transition: stroke 300ms, opacity 300ms; }
.lg-edge.on { stroke: var(--c); stroke-width: 2.5; stroke-dasharray: 6 8; animation: flow 1s linear infinite; }
.lg-node { cursor: pointer; transition: opacity 300ms; }
.lg-node rect { fill: rgb(22 29 44); stroke: rgb(255 255 255 / .1); stroke-width: 1; transition: stroke 300ms, fill 300ms; }
.lg-node text { fill: var(--fg); font: 600 14px var(--font-sans); }
.lg-node text.sub { fill: var(--muted); font: 400 11.5px var(--font-sans); }
.lg-node .pip { fill: var(--c); }
.lg-node.on rect { stroke: var(--c); fill: color-mix(in srgb, var(--c) 14%, rgb(22 29 44)); }
.lg-node:focus-visible { outline: none; }
.lg-node:focus-visible rect { stroke: #fff; stroke-width: 2; }
.lineage-graph.active .lg-node:not(.on) { opacity: .3; }
.lineage-graph.active .lg-edge:not(.on) { opacity: .25; }
.lineage-caption { margin-top: 16px; min-height: 3.2em; color: var(--muted); font-size: 15px; }
.lineage-caption b { color: var(--fg); font-weight: 600; }

/* Apps */
.apps { padding: 120px 0; }
.app-grid { list-style: none; margin: 0 auto; padding: 0 24px; max-width: var(--max); display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.app { --mx: 50%; --my: 50%; position: relative; display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: 16px; background: var(--card-bg); box-shadow: 0 0 0 1px rgb(255 255 255 / .06); overflow: hidden; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); }
.app::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 18%, transparent), transparent 60%); opacity: 0; transition: opacity 240ms; pointer-events: none; }
.app:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 24px 48px -16px color-mix(in srgb, var(--c) 35%, transparent); }
.app:hover::before { opacity: 1; }
.app .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.app .ic .i { width: 22px; height: 22px; }
.app h3 { font-size: 18px; }
.app p { color: var(--muted); font-size: 15px; }
.io { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.io span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgb(255 255 255 / .05); color: var(--muted); }
.io span.w { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }

/* Governed */
.governed { padding: 120px 0; }
.gov-grid { max-width: var(--max); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .gov-grid { grid-template-columns: 1fr; } }
.gov { display: grid; gap: 12px; align-content: start; padding: 28px; border-radius: 20px; background: var(--card-bg); box-shadow: 0 0 0 1px rgb(255 255 255 / .06); }
.gov-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--brand-green); background: rgb(0 168 144 / .14); }
.gov p { color: var(--muted); font-size: 15px; }
.gov-demo { margin-top: 12px; padding: 16px; border-radius: 12px; background: rgb(0 0 0 / .25); min-height: 132px; font-size: 13px; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.roles span { padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .05); color: var(--muted); transition: background-color 300ms, color 300ms; }
.roles span.on { background: rgb(0 168 144 / .18); color: var(--ok-tx); }
.roles::after { content: attr(data-sees); display: block; width: 100%; margin-top: 8px; color: var(--fg); }
.log { list-style: none; margin: 12px 0 0; display: grid; gap: 6px; overflow: hidden; font: 12px/1.5 ui-monospace, "JetBrains Mono", monospace; }
.log li { color: var(--muted); animation: logIn 500ms var(--ease); }
.log li b { color: var(--fg); font-weight: 500; }
@keyframes logIn { from { opacity: 0; transform: translateY(8px); } }
.ask .q { color: var(--fg); font-weight: 600; }
.ask .q::before { content: "You: "; color: var(--muted); font-weight: 400; }
.ask .a { margin-top: 8px; color: var(--muted); }
.cite { display: inline-block; margin: 6px 6px 0 0; padding: 2px 8px; border-radius: 6px; font-size: 11px; color: var(--cy-tx); background: rgb(8 192 222 / .12); }

/* Start */
.start { padding: 120px 0; }
.steps { list-style: none; margin: 0 auto; padding: 0 24px; max-width: var(--max); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.steps li { display: grid; gap: 12px; padding: 28px; border-radius: 20px; background: var(--card-bg); box-shadow: 0 0 0 1px rgb(255 255 255 / .06); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 16px/1 var(--font-display); background: var(--brand-navy); color: #fff; }
.steps p { color: var(--muted); font-size: 15px; }
.stats { max-width: var(--max); margin: 64px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: grid; gap: 8px; }
.stat-n { font: 700 clamp(40px, 5vw, 64px)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--fg); }
.stat-l { font: 600 12px/1.3 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* Final */
.final { padding: 160px 24px; display: grid; justify-items: center; text-align: center; gap: 24px; overflow: hidden; }
.final-rays { position: absolute; inset: 0; pointer-events: none; background: repeating-conic-gradient(from 0deg at 50% 38%, rgb(127 168 232 / .07) 0deg 1deg, transparent 1deg 15deg); -webkit-mask-image: radial-gradient(circle at 50% 38%, #000, transparent 60%); mask-image: radial-gradient(circle at 50% 38%, #000, transparent 60%); animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.final-mark { width: 96px; height: auto; position: relative; filter: drop-shadow(0 0 30px rgb(8 192 222 / .45)); }
.final h2 { font-size: clamp(40px, 6vw, 80px); position: relative; }
.final .lead { position: relative; }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 32px 24px 48px; color: var(--muted); font-size: 14px; box-shadow: 0 -1px 0 var(--line); }
.foot img { height: 24px; width: auto; }
.foot p:last-child { margin-left: auto; }

/* Tailoring: the website field in the hero, and the visitor's new website. */
.tailor { display: grid; justify-items: center; gap: 8px; width: min(560px, 100%); margin-top: 4px; }
.tailor label { font-size: 14px; color: var(--muted); }
.tailor-row { display: flex; width: 100%; gap: 8px; padding: 6px; border-radius: 14px; background: rgb(22 29 44 / .9); box-shadow: 0 0 0 1px rgb(127 168 232 / .25), 0 0 40px -10px rgb(8 192 222 / .45); }
.tailor input { flex: 1; min-width: 0; background: none; border: 0; color: var(--fg); font: 400 15px/1 var(--font-sans); padding: 0 12px; outline: none; }
.tailor input::placeholder { color: var(--muted); }
.tailor-row:focus-within { box-shadow: 0 0 0 2px hsl(var(--ring)), 0 0 40px -10px rgb(8 192 222 / .6); }
.btn-tailor { background: linear-gradient(90deg, var(--brand-navy), #0b7f93); color: #fff; }
.btn-tailor:disabled { opacity: .6; }
.tailor.working .btn-tailor { animation: blink 1.2s infinite; }
.tailor-status { min-height: 1.4em; font-size: 14px; color: var(--cy-tx); max-width: 40rem; }
.for-you { margin-left: 8px; vertical-align: middle; font: 600 11px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.yours { padding: 120px 0 40px; }
.yours-frame { position: relative; max-width: 1080px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 40px 80px -30px rgb(8 192 222 / .35); }
.yours-chrome { display: flex; gap: 6px; padding: 10px 14px; background: #1A2233; }
.yours-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .2); }
.yours-frame iframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.yours-building { position: absolute; inset: 30px 0 0; display: none; place-items: center; background: var(--card-bg); }
.yours.building .yours-building { display: grid; }
.yours-building span { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgb(255 255 255 / .1); border-top-color: var(--brand-cyan); animation: spin 1s linear infinite; }
.yours-actions { display: flex; justify-content: center; margin-top: 16px; }
@media (max-width: 760px) { .yours-frame { margin: 0 16px; } .yours-frame iframe { height: 520px; } }

/* Phones: the later sections in less height. Apps become compact rows; governance and getting
 * started become swipeable cards; the thread's cards tighten; sections breathe less. */
@media (max-width: 760px) {
  .thread, .lineage, .apps, .governed, .start { padding: 72px 0; }
  .yours { padding: 72px 0 24px; }
  .final { padding: 96px 24px; }
  .section-head { margin-bottom: 28px; gap: 12px; }

  .app-grid { grid-template-columns: 1fr; gap: 8px; padding: 0 16px; }
  .app { grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 4px; padding: 14px 16px; border-radius: 14px; }
  .app .ic { grid-row: span 3; width: 40px; height: 40px; border-radius: 10px; }
  .app .ic .i { width: 20px; height: 20px; }
  .app h3 { font-size: 16px; line-height: 1.3; }
  .app p { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .io { margin-top: 2px; gap: 4px; }
  .io span:not(.w) { display: none; }
  .io span { font-size: 11px; padding: 2px 7px; }

  .gov-grid, .steps { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 8px; scrollbar-width: none; }
  .gov-grid::-webkit-scrollbar, .steps::-webkit-scrollbar { display: none; }
  .gov, .steps li { flex: 0 0 84%; scroll-snap-align: center; padding: 20px; border-radius: 16px; gap: 10px; }
  .gov-demo { min-height: 0; margin-top: 4px; padding: 12px; }
  .gov p, .steps p { font-size: 14px; }
  .steps li { grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; }
  .steps li p { grid-column: 1 / -1; }
  .step-n { width: 36px; height: 36px; font-size: 15px; }
  .stats { margin-top: 40px; gap: 24px 16px; padding: 0 16px; }

  .thread-list { gap: 16px; }
  .thread-card { padding: 14px 16px; border-radius: 14px; gap: 6px; }
  .thread-card p { font-size: 14px; line-height: 1.45; }
  .thread-card .link { display: none; }
  .thread-meta { font-size: 11px; letter-spacing: .06em; flex-wrap: wrap; row-gap: 2px; }
  .thread-item .dot { top: 16px; }

  .lineage-card { padding: 0 16px; }
  .lineage-card::before { content: "Swipe to follow the trail"; display: block; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
  .lineage-caption { font-size: 14px; }
}

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