@font-face { font-family: 'Bricolage Grotesque'; src: url(fonts/bricolage.woff2) format('woff2'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jetbrains-mono.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  --ink: #0b0b0f;
  --ink-2: #2a2a33;
  --muted: #4a4a55;
  --faint: #6b6b78;
  --line: #e4e3ec;
  --bg: #f6f6f8;
  --panel: #ffffff;
  --sunk: #efeef4;
  --accent: #5b3df5;
  --accent-ink: #3a1fc2;
  --accent-soft: #eee9ff;
  --ai: linear-gradient(110deg, #f2994a, #a855f7 50%, #5b7bf5);
  --ai-text: linear-gradient(110deg, #e0782a, #9333ea 55%, #4f6df0);
  --mark: rgba(168, 85, 247, 0.16);
  --wire: #d4d2e6;
  --wa: #25d366; --sl: #4a154b; --gm: #ea4335; --grey: #a3a2b4;
  --shadow: 0 1px 2px rgba(30, 20, 80, 0.05), 0 18px 48px -18px rgba(40, 20, 120, 0.22);
  --radius: 16px;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f2f1f8; --ink-2: #d9d8e3; --muted: #b1b0bf; --faint: #8f8e9e;
    --line: #2a2936; --bg: #0f0e15; --panel: #181722; --sunk: #13121b;
    --accent: #8f7bff; --accent-ink: #b9acff; --accent-soft: #2a2350;
    --mark: rgba(168, 85, 247, 0.28); --wire: #3a3850; --grey: #5e5d70; --sl: #d38fd8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ink: #f2f1f8; --ink-2: #d9d8e3; --muted: #b1b0bf; --faint: #8f8e9e;
  --line: #2a2936; --bg: #0f0e15; --panel: #181722; --sunk: #13121b;
  --accent: #8f7bff; --accent-ink: #b9acff; --accent-soft: #2a2350;
  --mark: rgba(168, 85, 247, 0.28); --wire: #3a3850; --grey: #5e5d70; --sl: #d38fd8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -18px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--sunk); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 14px; background: var(--panel); border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .logo-light { display: none; } :root:not([data-theme='light']) .logo-dark { display: block; } }
:root[data-theme='dark'] .logo-light { display: none; }
:root[data-theme='dark'] .logo-dark { display: block; }

/* Header */
.top { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.top .brand img { height: 34px; width: auto; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.top nav a:hover { color: var(--ink); background: var(--sunk); }
.top nav .lang { border: 1px solid var(--line); }
@media (max-width: 720px) { .top nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.btn:hover { text-decoration: none; border-color: var(--faint); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.9; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Hero */
.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 8vw, 104px); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 8.6vw, 112px); line-height: 0.92; letter-spacing: -0.045em; margin: 0; font-variation-settings: 'opsz' 96; }
.hero h1 .un { background: var(--ai-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { margin: 18px 0 0; font-size: 14px; color: var(--faint); }
@media (max-width: 900px) { .hero-copy { grid-template-columns: minmax(0, 1fr); } }

/* Hero demo: messages flow into the Inbox */
.demo { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(64px, 11vw, 150px) minmax(0, 1fr); align-items: center; }
.pipe { width: 100%; height: 100%; overflow: visible; }
.pipe path { fill: none; stroke: var(--wire); stroke-width: 2; }
.msgs { display: grid; gap: 10px; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 14px; font-size: 15px; line-height: 1.5; transition: opacity 0.5s ease; }
.msg .from { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 2px; }
.msg .from b { color: var(--ink-2); font-weight: 600; }
.sprite { position: absolute; }
.ico { width: 18px; height: 18px; flex: none; }
.ico.wa { fill: var(--wa); } .ico.sl { fill: var(--sl); } .ico.gm { fill: var(--gm); }
.task .ico { width: 20px; height: 20px; }
.msg p { margin: 0; color: var(--ink-2); }
.msg mark { color: inherit; background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 100% / 100% 100%; border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-size 0.7s cubic-bezier(.4, 0, .2, 1); }
.msg.skip-it { opacity: 0.6; }
.msg .why { display: block; margin-top: 6px; font-size: 13px; color: var(--faint); transition: opacity 0.4s ease; }

.inbox { border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border: 1.5px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--ai) border-box; }
.inbox-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 12px; }
.inbox-head strong { font-family: var(--display); font-size: 24px; letter-spacing: -0.02em; }
.inbox-head span { font-size: 13px; color: var(--faint); }
.inbox ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunk); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.2, .7, .2, 1); }
.task .t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.task .d { font-size: 13px; color: var(--faint); white-space: nowrap; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }

/* Animated states, driven by site.js. Without JS or with reduced motion, the final state shows. */
.playing .msg mark { background-size: 0% 100%; }
.playing .msg.lit mark { background-size: 100% 100%; }
.playing .task { opacity: 0; transform: translateX(-10px); }
.playing .task.in { opacity: 1; transform: none; }
.playing .msg.skip-it { opacity: 1; }
.playing .msg.skip-it.out { opacity: 0.6; }
.playing .msg.skip-it .why { opacity: 0; }
.playing .msg.skip-it.out .why { opacity: 1; }
.playing.reset .msg, .playing.reset .task, .playing.reset mark { transition-duration: 0.6s; }

@media (max-width: 760px) {
  .demo { grid-template-columns: 1fr; gap: 14px; }
  .pipe { display: none; }
}

/* Connector anatomy diagram */
.anatomy { margin: 40px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(12px, 3vw, 28px); }
.anatomy svg { display: block; width: 100%; height: auto; }
.anatomy .tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 640px) { .anatomy .wide { display: none; } .anatomy .tall { display: block; } }
.anatomy .box { fill: var(--panel); stroke: var(--line); }
.anatomy .hub { fill: var(--sunk); stroke: var(--line); }
.anatomy .wire { fill: none; stroke: var(--wire); stroke-width: 2; }
.anatomy .lbl { fill: var(--ink); font: 600 15px var(--body); }
.anatomy .sub { fill: var(--faint); font: 400 12.5px var(--body); }
.anatomy .f-or { fill: #f2994a; } .anatomy .f-pu { fill: #a855f7; } .anatomy .f-bl { fill: #5b7bf5; }
.anatomy .f-wa { fill: var(--wa); } .anatomy .f-sl { fill: var(--sl); } .anatomy .f-gm { fill: var(--gm); }
.anatomy .big { fill: var(--ink); font: 700 22px var(--display); letter-spacing: -0.02em; }

/* Sections */
section { padding: clamp(56px, 8vw, 112px) 0; }
.rule { border-top: 1px solid var(--line); }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 20px; max-width: 18em; }
h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 38em; margin: 0 0 40px; font-size: 18px; }

.why-block { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.why-block .big { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; letter-spacing: -0.025em; margin: 0; }
.why-block .big q { quotes: '\201C' '\201D'; background: var(--mark); border-radius: 4px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.why-block p:not(.big) { color: var(--muted); margin: 0 0 16px; }

/* How it works */
.diagram { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(12px, 3vw, 32px); margin: 0 0 12px; }
.diagram img { width: 100%; }
.note { font-size: 14px; color: var(--faint); margin: 0 0 48px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 16px; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.04em; margin-bottom: 14px; color: var(--accent); }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Tour */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tabs button { font: inherit; font-size: 15px; font-weight: 600; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.no-js .tabs { display: none; }
.shot { margin: 0; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.shot + .shot { margin-top: 48px; }
.js .shot + .shot { margin-top: 0; }
.shot[hidden] { display: none; }
.shot .frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #f6f6f8; }
.shot figcaption p { color: var(--muted); margin: 0 0 12px; }
@media (max-width: 860px) { .shot { grid-template-columns: minmax(0, 1fr); } }

/* Connectors */
.conn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.conn-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.conn-list li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.conn-list li span { color: var(--muted); }
.conn-list li.yours { border-bottom: 0; }
.conn-list li.yours b { background: var(--ai-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slogan { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.2; margin: 28px 0 0; }
@media (max-width: 860px) { .conn, .why-block { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .conn-list li { grid-template-columns: 1fr; gap: 2px; } }

/* Safety */
.safety { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; }
.safety li p { margin: 0; color: var(--muted); font-size: 15px; }

/* Install */
.install { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.term { position: relative; background: #121119; color: #ecebf5; border-radius: var(--radius); padding: 54px 22px 22px; font: 14.5px/1.75 var(--mono); overflow-x: auto; border: 1px solid #262433; }
.term pre { margin: 0; font: inherit; white-space: pre; }
.term .c { color: #8a88a0; }
.term .p { color: #b39dff; user-select: none; }
.copy { position: absolute; top: 12px; right: 12px; font: 600 13px var(--body); color: #ecebf5; background: #24222f; border: 1px solid #36334a; border-radius: 8px; min-height: 34px; padding: 0 12px; cursor: pointer; }
.copy:hover { background: #2e2b3c; }
.no-js .copy { display: none; }
.needs { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.needs li { padding-left: 22px; position: relative; color: var(--muted); }
.needs li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 10px; height: 10px; border-radius: 3px; background: var(--ai); }
.needs b { color: var(--ink); }
.after { margin: 28px 0 0; color: var(--muted); }

/* Contribute */
.contrib { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.issues { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.issues li { border-bottom: 1px solid var(--line); }
.issues a { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; color: var(--ink); text-decoration: none; }
.issues a:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.issues .n { font-family: var(--mono); font-size: 14px; color: var(--faint); min-width: 2.6em; }
.issues .lbl { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.docs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; padding: 0; list-style: none; font-size: 15px; }
@media (max-width: 860px) { .contrib, .install { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer img { height: 26px; width: auto; }
footer a { color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }


.notfound { padding-top: 12vh; padding-bottom: 12vh; }
