@font-face { font-family: 'General Sans'; src: url('fonts/general-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fragment Mono'; src: url('fonts/fragment-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* Colours, radius and buttons come from the app (DESIGN.md); light mode only, as in the app. */
:root {
	--ground: #FBFBFA;
	--panel: #F3F3F0;
	--hairline: #E4E4E0;
	--ink: #1C1C1A;
	--prose: #3A3A36;
	--muted: #6E6E68;
	--accent: #2A47D1;
	--accent-deep: #2239AE;
	--radius: 6px;
	--mono: 'Fragment Mono', ui-monospace, monospace;
	--sans: 'Fragment Mono', ui-monospace, monospace;
	--display: 'General Sans', system-ui, sans-serif;
	--ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
	--frame: 1200px;
	--pad: clamp(16px, 5vw, 64px);
	color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font: 400 15px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.875em; }
::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--ground); padding: 8px 12px; border-radius: var(--radius); z-index: 20; }
.skip:focus { top: 12px; }

/* Frame: the centred column with hairline rails, as in the reference. */
.frame { max-width: var(--frame); margin: 0 auto; border-inline: 1px solid var(--hairline); position: relative; }
section.frame { padding: clamp(56px, 9vw, 112px) var(--pad); }

/* Hatched band between sections, with a diamond where it crosses each rail. */
.band { overflow-x: clip; height: 28px; border-block: 1px solid var(--hairline); background: repeating-linear-gradient(90deg, var(--hairline) 0 1px, transparent 1px 8px); }
.band .frame { height: 100%; border: 0; }
.band .frame::before, .band .frame::after {
	content: ''; position: absolute; width: 7px; height: 7px; background: var(--ground); border: 1px solid var(--hairline);
	transform: rotate(45deg); top: -4px;
}
.band .frame::before { left: -4px; }
.band .frame::after { right: -4px; }

/* Header */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.nav .frame { display: flex; align-items: center; gap: 32px; height: 60px; padding: 0 var(--pad); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--mono); font-size: 17px; letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 22px; transition: transform 400ms var(--ease-out); }
.brand:hover svg { transform: rotate(-8deg); }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav ul a, .lang a { text-decoration: none; color: var(--muted); transition: color 150ms ease-out; }
.nav ul a:hover, .lang a:hover { color: var(--ink); }
.nav .end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lang { font-family: var(--mono); font-size: 13px; display: flex; gap: 6px; color: var(--hairline); }
.lang [aria-current] { color: var(--ink); }

/* Buttons: the app's primary and secondary, one size up for a landing page. */
.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius);
	font: 400 13px/1.4 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer;
	transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: var(--ground); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: #CFCFC9; background: #fff; }
.btn .arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(2px); }
.btn-small { padding: 5px 10px; font-size: 13px; }

/* Type */
h1, h2, h3, .faq summary { font-family: var(--display); }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; color: var(--prose); text-wrap: pretty; }
h2 + .lead { margin-top: 20px; }
.lead { font-size: clamp(15px, 1.4vw, 16.5px); line-height: 1.7; }
.muted { color: var(--muted); }
.tag { font-family: var(--mono); font-size: 12.5px; color: var(--muted); transition: color 200ms ease-out; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px 64px; align-items: end; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* Product shot on a dotted panel with the animated mesh behind it. */
.stage { position: relative; overflow: hidden; background: var(--panel); border-top: 1px solid var(--hairline); padding: clamp(24px, 5vw, 56px) var(--pad) 0; }
.stage::before {
	content: ''; position: absolute; inset: 0;
	background: radial-gradient(circle, #D6D6D0 1px, transparent 1.2px) 0 0 / 22px 22px;
	mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.mesh { position: absolute; inset: 0; width: 100%; height: 100%; }
.mesh path { fill: none; stroke: #C9C9C2; stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 9s var(--ease-out) infinite; animation-delay: calc(var(--d) * 0.9s); }
.mesh circle { fill: var(--ground); stroke: #B9B9B2; stroke-width: 1; animation: node 9s ease-in-out infinite; animation-delay: calc(var(--d) * 0.9s); opacity: 0.35; }
.mesh circle.ink { fill: var(--ink); stroke: none; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 10% { opacity: 1; } 40%, 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes node { 0%, 100% { opacity: 0.35; } 40%, 70% { opacity: 1; } }

.window { position: relative; max-width: 1040px; margin: 0 auto; background: var(--ground); border: 1px solid var(--hairline); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; box-shadow: 0 30px 60px -30px rgb(28 28 26 / 0.18); }
.window .bar { display: flex; align-items: center; gap: 16px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--hairline); background: var(--panel); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #D2D2CC; }
.window .url { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle { display: inline-flex; padding: 2px; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--ground); }
.toggle button { font: 12px/1 var(--mono); padding: 5px 9px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; transition: color 150ms ease-out, background-color 150ms ease-out; }
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed='true'] { background: var(--panel); color: var(--accent); }
.screens { display: grid; }
.screens img { grid-area: 1 / 1; transition: opacity 400ms ease-out; }
.screens img[hidden] { display: block; opacity: 0; pointer-events: none; }
.caption { text-align: center; padding: 14px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); position: relative; }

/* Split sections: heading left, text right. */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px 64px; align-items: start; }
.split > div > p + p { margin-top: 16px; }

/* Hairline grid of cells */
.cells { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 1px; padding-top: 1px; background: var(--hairline); margin-inline: calc(var(--pad) * -1); }
/* The 1px gap over a hairline background draws every inner border. */
.cells > * { padding: 32px var(--pad); background: var(--ground); transition: background-color 200ms ease-out; }
.cells > *:hover { background: var(--panel); }
.cells > *:hover .tag { color: var(--accent); }
.features .cells > * { padding: 28px 24px; }
.features .cells > :nth-child(4n+1) { padding-left: var(--pad); }
.cells h3 { margin: 0 0 8px; }
.cells .tag { display: block; margin-top: 16px; }
.cells p { font-size: 15px; }
.with-cells { padding-bottom: 0 !important; }
.with-cells > header { margin-bottom: clamp(40px, 6vw, 64px); }

/* Steps and the git log card */
.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--hairline); color: var(--prose); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 3px; }
.card { background: var(--ground); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.card .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--hairline); background: var(--panel); font-family: var(--mono); font-size: 12px; color: var(--muted); }
pre { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.75 var(--mono); color: var(--ink); }
pre .c { color: var(--muted); }
pre .a { color: var(--accent); }
.copy { font: 12px/1 var(--mono); color: var(--muted); background: var(--ground); border: 1px solid var(--hairline); border-radius: 4px; padding: 4px 8px; cursor: pointer; transition: color 150ms ease-out, border-color 150ms ease-out; }
.copy:hover { color: var(--ink); border-color: #CFCFC9; }

.agents { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px 64px; align-items: center; }
.agents .card { margin-top: 28px; }
.endpoints { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.endpoints b { font-weight: 400; color: var(--ink); }
.shot { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -36px rgb(28 28 26 / 0.2); }

.link { color: var(--accent); text-decoration: none; display: inline-flex; gap: 6px; margin-top: 20px; font-size: 15px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 500; transition: color 150ms ease-out; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); color: var(--muted); transition: transform 250ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 32px 20px 0; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 300ms var(--ease-out), content-visibility 300ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
html { interpolate-size: allow-keywords; }

/* Closing call to action */
.closing { padding-bottom: 0 !important; }
.closing .cells { --cols: 2; margin-top: clamp(40px, 6vw, 56px); }
.closing .cells p { font-size: 17px; color: var(--muted); }
.closing .cells strong { color: var(--ink); font-weight: 400; }
.closing .cells .btn { margin-top: 24px; }

/* Creator */
.creator { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px 64px; align-items: start; }
.who { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; }
.who img { width: 96px; height: 96px; border-radius: var(--radius); border: 1px solid var(--hairline); object-fit: cover; }
.hero .lead strong { color: var(--ink); font-weight: 400; }

/* Footer */
footer .frame { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 40px var(--pad) 56px; }
footer p { font-size: 14px; color: var(--muted); margin-top: 10px; }
footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; font-size: 14px; }
footer ul a { color: var(--muted); text-decoration: none; transition: color 150ms ease-out; }
footer ul a:hover { color: var(--ink); }

/* Reveal on scroll: only with JS and when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), filter 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
	.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.mesh path { stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
	.features .cells > * { padding-inline: var(--pad) !important; }
	.nav ul { display: none; }
	.hero, .split, .agents, .creator { grid-template-columns: 1fr; }
	.cells { --cols: 1 !important; }
	.window .url { display: none; }
}
@media (min-width: 901px) and (max-width: 1100px) {
	.features .cells { --cols: 2 !important; }
	.features .cells > :nth-child(odd) { padding-left: var(--pad); }
}

/* Body text is mono, so inline code needs its own chip to stand out. */
:is(p, li) code { background: var(--panel); border: 1px solid var(--hairline); padding: 0 4px; border-radius: 4px; }

/* Workflow page: the architecture diagram, wide SVG above 900px, tall SVG below. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.flow { margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px); background: var(--panel); border-top: 1px solid var(--hairline); }
.flow svg { display: block; width: 100%; height: auto; max-width: 1100px; margin: 0 auto; }
.flow .flow-tall { display: none; max-width: 420px; }
.flow figcaption { margin-top: 20px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.flow .box { fill: var(--ground); stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.flow .box.core { stroke: var(--ink); }
.flow .zone { fill: none; stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-width: 1; stroke-dasharray: 4 4; }
.flow text { text-anchor: middle; font-family: var(--mono); font-size: 12.5px; fill: var(--muted); }
.flow text.t { font-family: var(--display); font-weight: 500; font-size: 16px; fill: var(--ink); }
.flow text.m { font-size: 14px; fill: var(--ink); }
.flow text.start { text-anchor: start; }
.flow text.l { text-anchor: start; font-size: 12px; }
.flow text.l.end { text-anchor: end; }
.flow .wire { fill: none; stroke: var(--muted); stroke-width: 1.25; }
.flow .wire.accent { stroke: var(--accent); stroke-width: 1.5; }
.flow .head { fill: var(--muted); }
.flow .head.accent { fill: var(--accent); }
.flow .flow-tall text { font-size: 12px; }
.flow .flow-tall text.t { font-size: 15px; }
.flow .flow-tall text.m { font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
	.flow .wire { stroke-dasharray: 6 4; animation: flow 1.4s linear infinite; }
	@keyframes flow { from { stroke-dashoffset: 10; } to { stroke-dashoffset: 0; } }
}
@media (max-width: 900px) {
	.flow .flow-wide { display: none; }
	.flow .flow-tall { display: block; }
}
/* Six nav links: tighten them before the 900px cut-off so the French labels stay on one line. */
.nav ul a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1040px) { .nav .frame { gap: 20px; } .nav ul { gap: 14px; font-size: 13px; } }
