@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* The dark surface stays the same in both themes: the white logo needs it */
  --night: #0f171d;
  --night-2: #17222b;
  --night-line: #2b3b47;
  --night-text: #e8f1f4;
  --night-muted: #9db2be;
  --flux: #0e7482;
  --flux-light: #5fe0e8;
  --camel: #f0b252;

  --bg: #ffffff;
  --band: #f1f6f7;
  --surface: #ffffff;
  --ink: #131d25;
  --muted: #52646f;
  --line: #dbe5e9;
  --link: #0b6673;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1115;
  --band: #10191f;
  --surface: #152028;
  --ink: #e8f1f4;
  --muted: #9db2be;
  --line: #283842;
  --link: #5fe0e8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; font-family: "Archivo", system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .55em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 7vw, 5.2rem); font-stretch: 122%; font-weight: 780; letter-spacing: -.025em; max-width: 16ch; margin-inline: auto; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); font-stretch: 115%; font-weight: 740; letter-spacing: -.015em; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: var(--link); text-underline-offset: .18em; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--camel); outline-offset: 3px; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 30; background: var(--surface); padding: .5rem 1rem; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(15 23 29 / .97); backdrop-filter: blur(14px) saturate(150%); border-bottom: 1px solid rgb(255 255 255 / .09); }
.top-row { display: flex; align-items: center; gap: 1.5rem; padding-block: .7rem; }
.brand { display: flex; flex: none; }
.brand img { height: auto; }
.top nav { display: flex; gap: .25rem; margin-inline: auto; }
.top nav a { color: var(--night-muted); text-decoration: none; font-size: .95rem; padding: .35rem .8rem; border-radius: 2rem; white-space: nowrap; }
.top nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.top-actions { display: flex; align-items: center; gap: .6rem; flex: none; }
.theme { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--night-line); background: transparent; color: var(--night-text); cursor: pointer; }
.theme:hover { border-color: var(--night-muted); }

.button { display: inline-block; padding: .7rem 1.35rem; border: 1px solid transparent; border-radius: 3rem; font-weight: 650; line-height: 1.3; text-decoration: none; transition: translate .15s, box-shadow .15s, border-color .15s; }
.button:hover { translate: 0 -2px; }
.button.docs { background: var(--camel); color: var(--night); padding: .5rem 1.1rem; }
.button.docs small { font-weight: 500; font-size: .76em; margin-left: .25rem; }
.button.primary { background: var(--flux-light); color: #06262a; }
.button.primary:hover { box-shadow: 0 8px 30px -6px rgb(95 224 232 / .6); }
.button.ghost { border-color: var(--night-line); color: var(--night-text); background: rgb(255 255 255 / .04); }
.button.ghost:hover { border-color: var(--night-muted); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--night-text); text-align: center; padding-block: clamp(3.5rem, 8vw, 6.5rem) 3rem; }
.aurora { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(46rem 28rem at 18% 4%, rgb(14 116 130 / .55), transparent 70%),
    radial-gradient(40rem 26rem at 84% 14%, rgb(240 178 82 / .22), transparent 70%),
    radial-gradient(60rem 30rem at 50% 100%, rgb(95 224 232 / .12), transparent 70%); }
.pill { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.6rem; padding: .38rem 1rem; border-radius: 2rem; border: 1px solid var(--night-line); background: rgb(255 255 255 / .05); color: var(--night-text); font-size: .9rem; text-decoration: none; }
.pill:hover { border-color: var(--flux-light); }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: #54e08a; box-shadow: 0 0 0 4px rgb(84 224 138 / .18); flex: none; }
.lead { font-size: clamp(1.08rem, 2vw, 1.28rem); color: var(--night-muted); max-width: 60ch; margin-inline: auto; }
.hero .actions { justify-content: center; margin-block: 1.8rem 0; max-width: none; }

/* The studio: the pipeline drawn the way the project's own UI will draw it */
.studio { margin-top: clamp(2.5rem, 6vw, 4rem); text-align: left; border: 1px solid var(--night-line); border-radius: 22px; background: rgb(23 34 43 / .72); backdrop-filter: blur(6px); box-shadow: 0 40px 90px -40px rgb(0 0 0 / .75); overflow: hidden; }
.studio-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--night-line); font-size: .9rem; }
.file { font-weight: 650; }
.live { display: inline-flex; align-items: center; gap: .6rem; color: var(--night-muted); }

.canvas { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3.2rem; align-items: start; padding: 2rem 1.4rem 2.4rem;
  background-image: radial-gradient(rgb(157 178 190 / .22) 1px, transparent 1.4px); background-size: 22px 22px; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wires path { fill: none; stroke: #3d5666; stroke-width: 2; }
.wires path.off { stroke-dasharray: 4 7; }
.wires circle.packet { fill: var(--flux-light); }
.wires circle.packet.enriched { fill: var(--camel); }
.wires circle.port { fill: var(--night); stroke: var(--flux-light); stroke-width: 2; }

.node { position: relative; min-width: 0; padding: .95rem; border-radius: 14px; border: 1px solid var(--night-line); background: #131d25; box-shadow: 0 18px 40px -24px rgb(0 0 0 / .8); }
.node:nth-of-type(2) { margin-top: 3.2rem; }
.node:nth-of-type(3) { margin-top: .6rem; }
.node:nth-of-type(4) { margin-top: 2.4rem; }
.node header { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.node h2 { font-size: .98rem; font-stretch: 100%; letter-spacing: 0; margin: 0; }
.kind { font-size: .72rem; font-weight: 700; padding: .1rem .55rem; border-radius: 1rem; background: rgb(95 224 232 / .14); color: var(--flux-light); }
.node.plugin { border-color: rgb(240 178 82 / .6); transition: opacity .2s, border-color .2s; }
.node.plugin .kind { background: rgb(240 178 82 / .16); color: var(--camel); }
.node.plugin.unplugged { border-style: dashed; border-color: #5b6f7c; opacity: .72; }
.node p, .node label { font-size: .88rem; color: var(--night-muted); margin: 0 0 .7rem; }
.node .jar { margin: .8rem 0 0; font-family: ui-monospace, Consolas, monospace; font-size: .76rem; }
.node label { display: block; }
.node output { color: var(--flux-light); font-weight: 750; font-variant-numeric: tabular-nums; }
#threshold { width: 100%; margin: 0 0 .7rem; accent-color: var(--flux-light); }
.node pre { margin: 0; padding: .6rem .7rem; border-radius: 8px; background: #0a1116; color: #cfe3e8; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: .74rem; }
.node table { width: 100%; border-collapse: collapse; font-size: .83rem; font-variant-numeric: tabular-nums; }
.node th, .node td { text-align: left; padding: .3rem .15rem; border-bottom: 1px solid var(--night-line); overflow-wrap: anywhere; }
.node th { color: var(--night-muted); font-weight: 500; }
.node tr.dropped td { color: #5f7482; text-decoration: line-through; }
.node td.total { color: var(--camel); font-weight: 750; }

.node .switch { display: flex; align-items: center; gap: .6rem; cursor: pointer; color: var(--night-text); margin: 0; }
.switch input { position: absolute; opacity: 0; }
.track { position: relative; width: 2.7rem; height: 1.5rem; flex: none; border-radius: 1rem; background: #455a68; transition: background .18s; }
.track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: translate .18s; }
.switch input:checked + .track { background: var(--camel); }
.switch input:checked + .track::after { translate: 1.2rem 0; }
.switch input:focus-visible + .track { outline: 3px solid var(--flux-light); outline-offset: 3px; }

.console { border-top: 1px solid var(--night-line); background: #0a1116; padding: .9rem 1.2rem; }
.console pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #cfe3e8; }
.note { margin: .4rem 0 0; color: var(--camel); font-size: .9rem; }
.note:empty { display: none; }
.hero .fine { margin: 1rem auto 0; }
.fine { font-size: .84rem; color: var(--night-muted); }

/* -------------------------------------------------------------- sections */
main > section:not(.hero) { padding-block: clamp(4rem, 9vw, 7rem); }
.band { background: var(--band); }
.intro { color: var(--muted); font-size: 1.12rem; margin-bottom: 2.5rem; }

.flow { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow li { counter-increment: step; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 4rem 1.5rem 0 0; }
.flow li::before { content: counter(step); position: absolute; top: 0; left: 0; z-index: 1; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--flux); color: #fff; font-weight: 750; }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 1.25rem; left: 2.6rem; right: 0; height: 2px; background: linear-gradient(90deg, var(--flux), var(--line)); }
.flow p { color: var(--muted); font-size: .98rem; }
.flow .state { margin-top: auto; }

.state { display: inline-block; padding: .2rem .75rem; border-radius: 2rem; font-size: .8rem; font-weight: 700; line-height: 1.5; }
.state.ready { background: #d3f2df; color: #0f5b33; }
.state.building { background: #fdebc8; color: #6f4608; }
.state.planned { background: #e0e9ed; color: #364955; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.card, .tile { --x: 50%; --y: 0%; position: relative; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(18rem circle at var(--x) var(--y), rgb(95 224 232 / 0), transparent 70%), var(--surface); padding: 1.5rem; transition: border-color .2s, translate .2s; }
.card:hover, .tile:hover { border-color: var(--flux); translate: 0 -3px; background: radial-gradient(18rem circle at var(--x) var(--y), rgb(95 224 232 / .17), transparent 70%), var(--surface); }
.card h3 { margin-top: 1.4rem; font-size: 1.35rem; }
.card p, .tile p { color: var(--muted); margin: 0; font-size: .98rem; }

.snippets { border-radius: 18px; overflow: hidden; background: var(--night); color: #cfe3e8; border: 1px solid var(--night-line); }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .6rem; border-bottom: 1px solid var(--night-line); }
.tabs button { font: 600 .88rem "Archivo", sans-serif; color: var(--night-muted); background: transparent; border: 0; border-radius: 2rem; padding: .4rem .95rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--night-2); color: #fff; }
.tabs .copy { margin-left: auto; border: 1px solid var(--night-line); color: var(--night-text); }
.snippets pre { margin: 0; padding: 1.3rem 1.4rem; overflow-x: auto; line-height: 1.75; min-height: 11rem; }
.snippets b { color: var(--flux-light); font-weight: 400; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; grid-auto-flow: dense; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; background-color: var(--surface); }
.chain { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.chain li { padding: .35rem .85rem; border-radius: 2rem; border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.checks { margin-top: 1.3rem; }
.checks li { display: flex; gap: .65rem; align-items: center; padding: .62rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.checks li::before { content: ""; width: .38rem; height: .72rem; border: solid var(--flux); border-width: 0 2.5px 2.5px 0; rotate: 45deg; flex: none; margin: -.15rem .2rem 0; }

.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.lane { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); padding: 1.4rem; }
.lane.done { border-top-color: #3ccb78; }
.lane.now { border-top-color: var(--camel); }
.lane.next { border-top-color: var(--flux); }
.lane li { padding: .7rem 0; border-top: 1px solid var(--line); }

.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; border-radius: 26px; padding: clamp(1.6rem, 5vw, 3.5rem); background: radial-gradient(34rem 22rem at 0% 0%, rgb(14 116 130 / .5), transparent 70%), var(--night); color: var(--night-text); }
.about p { color: var(--night-muted); }
.monogram { width: clamp(6.5rem, 17vw, 11rem); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 4px solid transparent; background: linear-gradient(var(--night-2), var(--night-2)) padding-box, conic-gradient(var(--flux-light), var(--camel), var(--flux), var(--flux-light)) border-box; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 780; font-stretch: 120%; }
.tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.tools li { padding: .3rem .85rem; border-radius: 2rem; border: 1px solid var(--night-line); font-size: .88rem; }
.about .actions { margin: 0; }

footer { background: var(--night); color: var(--night-text); padding-block: 3.5rem 2.5rem; }
.sign { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; font-stretch: 115%; line-height: 1.2; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.8rem; max-width: none; padding-bottom: 1.8rem; border-bottom: 1px solid var(--night-line); }
.links a { color: var(--flux-light); }

/* One orchestrated entrance, for the hero only */
.hero .pill, .hero h1, .hero .lead, .hero .actions, .studio { animation: rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero h1 { animation-delay: .06s; }
.hero .lead { animation-delay: .12s; }
.hero .actions { animation-delay: .18s; }
.studio { animation-delay: .26s; }
@keyframes rise { from { translate: 0 18px; } }

@media (max-width: 1000px) {
  .top-row { flex-wrap: wrap; gap: .5rem 1rem; }
  .top-actions { margin-left: auto; }
  .top nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .canvas { grid-template-columns: minmax(0, 26rem); justify-content: center; gap: 2.6rem; }
  .canvas .node { margin-top: 0; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .flow li::after { display: none; }
  .cards, .roadmap { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .flow, .bento, .about { grid-template-columns: minmax(0, 1fr); }
  .tile.wide, .tile.tall { grid-column: auto; grid-row: auto; }
  .canvas { padding-inline: .9rem; }
}

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