/* rewirebio.io landing. Brand: Archivo (UI), Newsreader (display), IBM Plex Mono (data), teal accent. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f9f9;
  --ink: #09090b;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --accent: #0d9488;
  --accent-ink: #0f766e;
  --accent-soft: #e6f7f5;
  --hero: #071012;
  --hero-ink: #e8f3f2;
  --hero-mute: #93aeac;
  --warn: #dc6b4f;
  --node-model: #2dd4bf;
  --node-bench: #60a5fa;
  --node-data: #fbbf24;
  --node-paper: #c4b5fd;
  --node-case: #f472b6;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f10; --bg-alt: #10171a; --ink: #eef3f3; --ink-2: #c3cfd0; --ink-3: #8a9ea0; --line: #223033;
    --accent: #2dd4bf; --accent-ink: #5eead4; --accent-soft: #0f2a28; --hero: #050a0b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
svg use { color: inherit; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--hero) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.mark { font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--hero-ink); text-decoration: none; }
.mark span { color: var(--node-model); }
.nav nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.nav nav a { color: var(--hero-mute); text-decoration: none; }
.nav nav a:hover { color: var(--hero-ink); }
.nav .nav-blog { color: var(--hero-ink); font-weight: 600; }

/* hero */
.hero { position: relative; background: var(--hero); color: var(--hero-ink); overflow: hidden; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--hero) 0%, color-mix(in srgb, var(--hero) 82%, transparent) 46%, transparent 78%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; padding-block: 96px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.hero .eyebrow { color: var(--node-model); }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 6vw, 72px); line-height: 1.02; letter-spacing: -.015em; max-width: 15ch; }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: #c6d6d5; max-width: 56ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--bg); transition: transform .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.hero .btn { background: rgba(255,255,255,.06); color: var(--hero-ink); border-color: rgba(255,255,255,.16); }
.hero .btn.primary { background: var(--node-model); color: #04201d; border-color: var(--node-model); }
.hero .btn.ghost { background: transparent; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); margin: 30px 0 0; border-top: 1px solid rgba(255,255,255,.18); max-width: 900px; }
.stats div { padding: 16px 16px 0 0; }
.stats dd { margin: 0; font-family: var(--mono); font-size: clamp(24px, 2.6vw, 32px); font-variant-numeric: tabular-nums; letter-spacing: -.02em; order: -1; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: 13px; color: var(--hero-mute); }
.release { font-family: var(--mono); font-size: 12px; color: var(--hero-mute); }

/* blocks */
.block { padding-block: 88px; }
.block.alt { background: var(--bg-alt); }
.block h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; max-width: 22ch; margin-bottom: 18px; }
.intro { color: var(--ink-2); font-size: 18px; max-width: 64ch; }
.small { font-size: 14px; color: var(--ink-3); margin-top: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

/* types */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 14px; margin-top: 36px; }
.type { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 2px; background: var(--bg); }
.type svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 8px; }
.type b { font-family: var(--mono); font-weight: 500; font-size: 26px; font-variant-numeric: tabular-nums; }
.type span { font-weight: 600; }
.type small { color: var(--ink-3); font-size: 13px; }
.standards { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.standards h3 { font-size: 17px; margin-bottom: 6px; }
.standards p { color: var(--ink-2); font-size: 15px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row span { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--bg); }
@media (max-width: 760px) { .standards { grid-template-columns: 1fr; } }

/* disagreements */
.story { margin-top: 28px; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.story svg { width: 40px; height: 40px; color: var(--warn); }
.story h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin-bottom: 6px; }
.story p { color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }
.lead-card { margin: 0; border-radius: 14px; background: var(--hero); color: var(--hero-ink); padding: 22px; box-shadow: 0 30px 60px -30px rgba(7,16,18,.5); }
.lead-card figcaption { font-weight: 600; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--warn); color: #1d0b06; }
.lead-table { overflow-x: auto; }
.lead-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lead-card th, .lead-card td { text-align: left; padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
.lead-card th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--hero-mute); font-weight: 500; }
.lead-card td:nth-child(n+3) { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.lead-card td.hi { color: var(--node-model); }
.lead-note { margin-top: 14px; font-size: 14px; color: #c6d6d5; }
.lead-card a { color: var(--node-model); }

/* architecture */
.arch { margin-top: 40px; display: grid; grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr) 34px minmax(0,1fr) 34px minmax(0,1.15fr); align-items: stretch; }
.lane { display: grid; gap: 12px; align-content: start; }
.lane-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.node { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.node svg { width: 30px; height: 30px; color: var(--accent); }
.node b { display: block; font-size: 14px; line-height: 1.25; }
.node span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.node.src svg { color: var(--node-paper); }
.node.core { background: var(--hero); border-color: var(--hero); color: var(--hero-ink); box-shadow: 0 18px 40px -20px rgba(13,148,136,.55); }
.node.core svg { color: var(--node-model); }
.node.core span { color: var(--hero-mute); }
.node.agent { border-color: var(--accent); }
.node.soon { border-style: dashed; }
.node.soon svg { color: var(--ink-3); }
.flow { position: relative; align-self: center; height: 2px; background: var(--line); margin: 0 4px; overflow: hidden; }
.flow i { position: absolute; top: 0; left: -40%; width: 40%; height: 2px; background: var(--accent); }
.arch-note { margin-top: 18px; color: var(--ink-3); font-size: 14px; }
@media (max-width: 980px) {
  .arch { grid-template-columns: 1fr; gap: 0; }
  .flow { width: 2px; height: 28px; margin: 6px auto; }
  .flow i { width: 2px; height: 40%; left: 0; top: -40%; }
}

/* parts */
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 32px; }
.part { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--bg); display: grid; gap: 10px; align-content: start; transition: border-color .2s ease, transform .2s ease; }
.part:hover { border-color: var(--accent); transform: translateY(-2px); }
.part header { display: flex; justify-content: space-between; align-items: center; }
.part header svg { width: 34px; height: 34px; color: var(--accent); }
.part h3 { font-size: 19px; }
.part p { color: var(--ink-2); font-size: 15px; }
.part a { font-size: 14px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-ink); }
.chip.new { background: var(--accent); color: var(--bg); }

/* agents */
.asks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.asks li { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 15px; color: var(--ink-2); }
.snippets { display: grid; gap: 14px; min-width: 0; }
.snippet { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.snippet .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; background: var(--bg-alt); border-bottom: 1px solid var(--line); font-size: 14px; }
.snippet pre { margin: 0; padding: 14px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.copy { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.copy:hover { border-color: var(--accent); color: var(--accent-ink); }

/* tiers, principles */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; margin-top: 28px; }
.tier { padding: 22px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 6px; }
.tier b { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }
.tier h3 { font-size: 19px; }
.tier p { color: var(--ink-2); font-size: 15px; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px; margin-top: 28px; }
.principles h3 { font-size: 17px; margin-bottom: 6px; }
.principles p { color: var(--ink-2); font-size: 15px; }

/* blog */
.blog-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 24px; }
.post { display: grid; gap: 10px; align-content: start; padding: 22px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.post:hover { border-color: var(--accent); transform: translateY(-2px); }
.post span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.post h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.25; }

/* footer */
.foot { background: var(--hero); color: var(--hero-mute); }
.foot-row { padding-block: 40px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; font-size: 14px; }
.foot nav { display: flex; gap: 18px; }
.foot a:not(.mark) { color: var(--hero-mute); }

/* motion: content is visible without JS; animations only when JS runs and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .types .reveal:nth-child(2), .js .parts .reveal:nth-child(2), .js .posts .reveal:nth-child(2) { transition-delay: .07s; }
  .js .types .reveal:nth-child(3), .js .parts .reveal:nth-child(3), .js .posts .reveal:nth-child(3) { transition-delay: .14s; }
  .js .types .reveal:nth-child(4), .js .parts .reveal:nth-child(4), .js .posts .reveal:nth-child(4) { transition-delay: .21s; }
  .js .types .reveal:nth-child(5), .js .parts .reveal:nth-child(5) { transition-delay: .28s; }
  .js .types .reveal:nth-child(6), .js .parts .reveal:nth-child(6) { transition-delay: .35s; }
  .arch.in .flow i { animation: flow 2.2s linear infinite; }
  .arch.in .flow:nth-of-type(4) i { animation-delay: .5s; }
  .arch.in .flow:nth-of-type(6) i { animation-delay: 1s; }
  @keyframes flow { to { left: 100%; } }
  @keyframes flowv { to { top: 100%; } }
  @media (max-width: 980px) { .arch.in .flow i { animation-name: flowv; } }
}

@media (max-width: 560px) { .block { padding-block: 64px; } .hero-inner { padding-block: 64px 40px; } .nav nav { gap: 14px; font-size: 13px; } .types { grid-template-columns: 1fr 1fr; } }
