/* VibeSim (redesign/DESIGN.md): the page is a simulation. Dark only. Unbounded over Onest, both self-hosted.
   Shape language: circles and hairlines; no cards, no shadows, no rounded rectangles. */
@font-face { font-family: Unbounded; src: url(fonts/unbounded.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: Onest; src: url(fonts/onest.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
/* Metric-matched fallbacks: a late font does not move the layout. */
@font-face { font-family: "Unbounded fallback"; src: local("Arial Black"), local("Arial Bold"), local("Arial"); size-adjust: 112%; ascent-override: 92%; descent-override: 22%; }
@font-face { font-family: "Onest fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 101%; ascent-override: 98%; descent-override: 26%; }

:root {
    color-scheme: dark;
    --ink: #0b0e12; --paper: #e8edf1; --dim: #95a1ad; --coral: #fa674f; --uv: #a89bfa;
    --grid: #1c232c; --hair: #2a333d; --lift: #11161c;
    --display: Unbounded, "Unbounded fallback", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    --text: Onest, "Onest fallback", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    --gutter: clamp(1.1rem, 3.2vw, 3rem);
    --measure: 1680px;
}
@supports (color: oklch(0 0 0)) {
    :root {
        --ink: oklch(0.16 0.012 250); --paper: oklch(0.94 0.008 240); --dim: oklch(0.71 0.022 245);
        --coral: oklch(0.69 0.19 32); --uv: oklch(0.73 0.14 285);
        --grid: oklch(0.24 0.014 250); --hair: oklch(0.31 0.016 250); --lift: oklch(0.19 0.012 250);
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); scroll-padding-top: 4rem; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 17px/1.55 var(--text); font-feature-settings: "tnum" 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--paper); text-decoration-color: var(--coral); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0.6rem; z-index: 20; background: var(--paper); color: var(--ink); padding: 0.5rem 0.9rem; }
.skip:focus { left: 0.6rem; }
.caption { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

/* the bar: wordmark · phase rail · two links. No fill, no blur: the swarm shows through. */
.bar {
    position: fixed; inset: 0 0 auto; z-index: 10;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem;
    padding: 1rem var(--gutter);
    background: var(--ink); border-bottom: 1px solid var(--hair);
}
/* Over the hero the bar is bare; it fills as the page scrolls on (scroll-driven, where supported). */
@supports (animation-timeline: scroll()) {
    .home .bar { animation: bar-fill linear both; animation-timeline: scroll(root); animation-range: 0 60svh; }
    @keyframes bar-fill { from { background: transparent; border-bottom-color: transparent; } to { background: var(--ink); border-bottom-color: var(--hair); } }
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--paper); text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.brand__word { display: block; height: 26px; width: auto; }
span.brand__word { height: auto; }
.bar__nav { display: flex; gap: 1.4rem; font-size: 0.9rem; }
.bar__nav a { text-decoration: none; color: var(--paper); }
.bar__nav a:hover { color: var(--coral); }
.rail { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; position: relative; gap: 0; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--hair); }
.rail li { position: relative; padding: 0 1.1rem; }
.rail a { background: var(--ink); padding: 0 0.5rem; }
.rail li:first-child { margin-left: auto; } .rail li:last-child { margin-right: auto; }
.rail a { font-size: 0.78rem; color: var(--dim); text-decoration: none; display: inline-flex; gap: 0.45rem; align-items: center; }
.rail a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--dim); }
.rail a[aria-current] { color: var(--paper); }
.rail a[aria-current]::before { background: var(--coral); border-color: var(--coral); }
.rail__n { font-family: var(--display); font-weight: 300; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .rail { visibility: hidden; } }

/* the hero: the swarm, full bleed, type set on it */
.hero { position: relative; min-height: max(100svh, 620px); overflow: hidden; isolation: isolate; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; background: var(--ink); touch-action: pan-y; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(100deg, var(--ink) 8%, color-mix(in srgb, var(--ink) 55%, transparent) 42%, transparent 70%),
                linear-gradient(0deg, var(--ink) 0%, transparent 34%); }
.hero__grid {
    min-height: inherit; max-width: var(--measure); margin-inline: auto;
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto 1fr auto;
    column-gap: 1.2rem; padding: 7.5rem var(--gutter) 2.2rem; pointer-events: none;
}
.hero__grid > * { pointer-events: auto; min-width: 0; }
.hero__title { grid-column: 1 / 10; grid-row: 1; font-size: clamp(2.6rem, 8.6vw, 9.6rem); line-height: 0.88; }
.hero__title span { display: block; }
.hero__title-run { color: var(--coral); }
.hero__lede { grid-column: 1 / 6; grid-row: 2; margin-top: 1.8rem; font-size: clamp(1rem, 1.25vw, 1.2rem); max-width: 34ch; color: var(--paper); }
.readout { grid-column: 10 / 13; grid-row: 1; justify-self: end; align-self: start; margin: 0.4rem 0 0; display: grid; gap: 0.9rem; text-align: end; }
.readout dt { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.readout dd { margin: 0; font-family: var(--display); font-weight: 250; font-size: clamp(1.6rem, 3vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; color: var(--uv); }
.prompt { grid-column: 1 / 9; grid-row: 4; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.prompt__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.prompt__row { display: flex; align-items: center; gap: 0.9rem; border-bottom: 1px solid var(--paper); padding-bottom: 0.6rem; }
.prompt__caret { font-family: var(--display); font-weight: 300; font-size: clamp(1.2rem, 2.2vw, 2rem); color: var(--coral); }
.prompt__input { flex: 1; min-width: 0; background: none; border: 0; color: var(--paper); font: 300 clamp(1.05rem, 2.1vw, 1.9rem)/1.2 var(--display); letter-spacing: -0.02em; padding: 0.2rem 0; }
.prompt__input:focus-visible { outline: none; }
.prompt__row:focus-within { border-bottom-color: var(--coral); box-shadow: 0 1px 0 var(--coral); }
.prompt__understood { font-size: 0.95rem; min-height: 1.5em; }
.prompt__understood output { color: var(--uv); }
.prompt__k { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-inline-end: 0.5rem; }
.prompt__note { font-size: 0.82rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }

/* the one filled control: a circle beside its label */
.disc { display: inline-flex; align-items: center; gap: 0.7rem; background: none; border: 0; padding: 0; color: var(--paper); font-weight: 600; font-size: 0.95rem; flex: none; }
.disc__glyph { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--coral); color: var(--ink); font-size: 1.15rem; transition: transform 0.25s cubic-bezier(.3,1.6,.5,1); }
.disc:hover .disc__glyph { transform: scale(1.08); }
.disc:active .disc__glyph { transform: scale(0.94); }
.disc:focus-visible { outline: none; }
.disc:focus-visible .disc__glyph { outline: 2px solid var(--coral); outline-offset: 4px; }
/* hairline controls: a small ring, then the word */
.hair, .chip { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 0; padding: 0.45rem 0.1rem; color: var(--paper); font-size: 0.92rem; }
.hair::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 1px solid currentColor; }
.hair:hover { color: var(--coral); }
.chip { border-bottom: 1px solid var(--hair); padding: 0.35rem 0; }
.chip:hover { border-bottom-color: var(--coral); }
.arrow { white-space: nowrap; }
.still-only { display: none; }
@media (prefers-reduced-motion: reduce) { .still-only { display: inline-flex; } }
.arrow::after { content: " →"; color: var(--coral); }

/* the four verbs, scrubbed by scroll */
.verbs { position: relative; height: 420vh; }
.verbs__stage {
    position: sticky; top: 0; height: 100svh; max-width: var(--measure); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr auto;
    column-gap: clamp(1rem, 3vw, 3rem); padding: 5.5rem var(--gutter) 2rem;
}
.verbs__title { grid-column: 1; grid-row: 1; font-size: clamp(1.6rem, 3.2vw, 3.2rem); }
.verbs__list { grid-column: 1; grid-row: 2; list-style: none; margin: 2rem 0 0; padding: 0; display: grid; align-content: start; gap: 1.1rem; }
.verbs__list li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 0.6rem; opacity: 0.32; transition: opacity 0.4s; }
.verbs__list li[data-on] { opacity: 1; }
.verbs__n { font-family: var(--display); font-weight: 300; color: var(--coral); font-variant-numeric: tabular-nums; }
.verbs__list strong { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 1.8vw, 1.7rem); letter-spacing: -0.03em; }
.verbs__text { grid-column: 2; color: var(--dim); font-size: 0.95rem; max-width: 42ch; margin-top: 0.25rem; }
.verbs__code { grid-column: 1; grid-row: 3; max-height: 24svh; mask-image: linear-gradient(180deg, #000 70%, transparent); margin: 1rem 0 0; font: 400 0.8rem/1.45 var(--text); font-variant-numeric: tabular-nums; color: var(--hair); white-space: pre; overflow: hidden; }
.verbs__code .lit { color: var(--uv); }
.verbs__arm { grid-column: 2; grid-row: 1 / 3; width: 100%; height: 100%; min-height: 0; display: block; }
.verbs__traces { grid-column: 2; grid-row: 3; width: 100%; height: clamp(120px, 22svh, 220px); display: block; }
.verbs--still { height: auto; }
.verbs--still .verbs__stage { position: static; height: auto; min-height: 100svh; }
.verbs--still .verbs__arm { height: 60svh; }

/* the bench */
.bench { max-width: var(--measure); margin-inline: auto; padding: clamp(4rem, 9vw, 8rem) var(--gutter) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--hair); }
.bench__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 3rem; margin-bottom: 2.4rem; }
.bench__head h2 { font-size: clamp(2.4rem, 7vw, 7rem); }
.bench__head p { color: var(--dim); max-width: 30ch; font-size: 1.05rem; }
.lab { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 3rem); align-items: start; }
#stage { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; border-top: 1px solid var(--hair); }
#stage:active { cursor: grabbing; }
.lab__hud { margin: 0.6rem 0 1.4rem; color: var(--uv); font-size: 0.9rem; font-variant-numeric: tabular-nums; min-height: 1.5em; }
.lab__traces { display: block; width: 100%; height: auto; }
.lab__side { display: grid; gap: 0.75rem; }
.lab__presets { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; }
.lab__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin: 0.4rem 0 0; }
.lab__scene {
    width: 100%; min-height: 23rem; resize: vertical; background: var(--lift); color: var(--paper);
    border: 0; border-left: 2px solid var(--coral); border-radius: 0; padding: 0.9rem 1rem;
    font: 400 0.86rem/1.55 var(--text); font-variant-numeric: tabular-nums slashed-zero;
}
.lab__scene:focus-visible { outline: 2px solid var(--coral); outline-offset: 0; }
.lab__help, .lab__note { color: var(--dim); font-size: 0.84rem; }
.lab__actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.3rem; align-items: center; margin-top: 0.4rem; }
.lab__status { flex-basis: 100%; color: var(--paper); font-size: 0.92rem; min-height: 1.5em; }

/* the interval: one generated clip, the whole viewport, one line */
.interval { position: relative; height: 100svh; min-height: 520px; overflow: hidden; display: grid; align-content: end; padding: var(--gutter); isolation: isolate; }
.interval__video, .fields__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.interval::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--ink) 0%, transparent 45%); }
.interval__line { font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.92; font-size: clamp(2rem, 6.4vw, 6.6rem); max-width: 14ch; text-wrap: balance; }
.interval .caption { margin-top: 1.2rem; }

/* the format: three keys, set large, over the flock */
.fields { position: relative; overflow: hidden; isolation: isolate; padding: clamp(5rem, 10vw, 9rem) var(--gutter); }
.fields__video { opacity: 0.4; }
.fields::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--ink), transparent 30%, transparent 70%, var(--ink)); }
.fields > * { max-width: var(--measure); margin-inline: auto; }
.fields__title { font-size: clamp(1.6rem, 3.2vw, 3.2rem); }
.fields__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem clamp(1.2rem, 3vw, 3rem); margin: 3rem auto; }
.fields__list dt { font-family: var(--display); font-weight: 300; font-size: clamp(1.4rem, 3.4vw, 3.6rem); letter-spacing: -0.04em; color: var(--uv); overflow-wrap: anywhere; border-bottom: 1px solid var(--hair); padding-bottom: 0.8rem; }
.fields__list dd { margin: 1rem 0 0; color: var(--paper); max-width: 36ch; }
.fields__engine { color: var(--dim); max-width: 64ch; margin-inline: 0; }
.fields .caption { margin-top: 2rem; }
.fields > p { margin-inline: auto; }
.fields > .fields__engine { max-width: var(--measure); }

/* contact: the address is the headline */
.contact { max-width: var(--measure); margin-inline: auto; padding: clamp(5rem, 12vw, 11rem) var(--gutter) clamp(3rem, 7vw, 6rem); }
.contact h2 { font-size: clamp(1.2rem, 2.2vw, 2rem); font-weight: 400; letter-spacing: -0.02em; color: var(--dim); }
.contact__mail { display: inline-block; margin-top: 1rem; font: 800 clamp(1.5rem, 7.4vw, 8rem)/1 var(--display); letter-spacing: -0.045em; text-decoration: none; overflow-wrap: anywhere; }
.contact__mail:hover { color: var(--coral); }
.contact__by { margin-top: 1.4rem; color: var(--dim); }

.foot { border-top: 1px solid var(--hair); padding: 1.4rem var(--gutter) 2rem; }
.foot__row { max-width: var(--measure); margin-inline: auto; display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: center; justify-content: space-between; }
.foot p { color: var(--dim); font-size: 0.86rem; }

.lang-btn { background: none; color: var(--paper); border: 1px solid var(--hair); border-radius: 50%; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; line-height: 1; padding: 0; }
.lang-btn__glyph { font-size: 0.85rem; letter-spacing: 0.02em; }
.lang-btn__glyph span:first-child { opacity: 0.55; }
.lang-btn:hover { border-color: var(--coral); }
.lang-links { display: flex; gap: 0.8rem; font-size: 0.86rem; }
.lang-dialog { border: 0; border-top: 2px solid var(--coral); border-radius: 0; background: var(--lift); color: var(--paper); padding: 0; width: min(92vw, 22rem); }
.lang-dialog::backdrop { background: color-mix(in srgb, var(--ink) 75%, transparent); }
.lang-dialog__box { padding: 1rem 1.1rem 1.1rem; }
.lang-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lang-dialog__head h2 { font-size: 1rem; }
.lang-dialog__close { background: none; border: 0; color: var(--dim); font-size: 1rem; padding: 0.3rem; }
.lang-list { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; }
.lang-list a { display: block; color: var(--paper); text-decoration: none; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--hair); }
.lang-list a:hover, .lang-list a:focus-visible { color: var(--coral); }
.lang-list a[aria-current="true"] { color: var(--coral); font-weight: 650; }

/* the format pages (docs/) */
.doc { max-width: 72ch; margin-inline: auto; padding: 7rem var(--gutter) 4rem; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); margin-bottom: 1.4rem; }
.doc h2 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin: 3rem 0 1rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc .lede { font-size: 1.15rem; color: var(--paper); }
.doc code, .doc pre { font-family: var(--text); font-variant-numeric: tabular-nums slashed-zero; font-size: 0.92em; }
.doc code { color: var(--uv); }
.doc pre { background: var(--lift); border-left: 2px solid var(--coral); padding: 1rem 1.1rem; overflow-x: auto; }
.doc pre code { color: var(--paper); }
.doc table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.94rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: start; border-bottom: 1px solid var(--hair); padding: 0.55rem 0.6rem 0.55rem 0; vertical-align: top; }
.doc th { font-weight: 600; color: var(--dim); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.doc .small, .small { color: var(--dim); font-size: 0.92rem; }

/* 768 and below: one column, the verbs as a sequence, the bench stacked */
@media (max-width: 900px) {
    .hero__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 6rem; }
    .hero__title { grid-column: 1 / -1; }
    .hero__lede { grid-column: 1 / 6; }
    .readout { grid-column: 1 / -1; grid-row: 3; justify-self: start; align-self: end; display: flex; gap: 2rem; text-align: start; margin: 1.6rem 0 1.6rem; }
    .prompt { grid-column: 1 / -1; }
    .verbs { height: 400vh; }
    .verbs__stage { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto; padding-top: 4.5rem; }
    .verbs__title, .verbs__list, .verbs__arm, .verbs__traces { grid-column: 1; }
    .verbs__list { grid-row: 2; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
    .verbs__list li { grid-template-columns: auto; }
    .verbs__n { display: none; }
    .verbs__list strong { font-size: 0.95rem; }
    .verbs__text { display: none; }
    .verbs__arm { grid-row: 3; }
    .verbs__traces { grid-row: 4; height: 16svh; }
    .verbs__code { display: none; }
    .lab { grid-template-columns: 1fr; }
    .fields__list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    body { font-size: 16px; }
    .bar { gap: 1rem; padding-block: 0.8rem; }
    .bar__nav { gap: 1rem; font-size: 0.85rem; }
    .hero__title { font-size: clamp(2.1rem, 11.4vw, 3rem); }
    .hero__lede { grid-column: 1 / -1; font-size: 0.98rem; }
    .disc__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .disc__glyph { width: 3rem; height: 3rem; }
    .prompt__input { font-size: 1rem; }
    .lab__actions .disc__label { position: static; width: auto; height: auto; clip-path: none; }
    .lab__scene { min-height: 17rem; }
}
