@import "tailwindcss"; /* Fraunces — OFL-1.1, from @fontsource-variable/fraunces. The "full" latin cut carries every axis (wght, opsz, SOFT, WONK) so WONK can be pinned off: at display sizes Fraunces otherwise swaps in swash forms of l, f, d. Display type only; body and code stay on system stacks. */ @font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("@fontsource-variable/fraunces/files/fraunces-latin-full-normal.woff2") format("woff2"); } @font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("@fontsource-variable/fraunces/files/fraunces-latin-full-italic.woff2") format("woff2"); } /* ───────────── Theme tokens ───────────── Semantic colours live on :root and flip with the theme; Tailwind utilities (`bg-bg`, `text-fg-2`, `border-line`, …) reference them through the inline theme below, so `data-theme` and `prefers-color-scheme` both just work. */ :root { color-scheme: dark light; /* Dark: deep plum-black with copper, teal, and rose accents. */ --bg: #0f0c12; --bg-2: #161220; --bg-3: #1e1829; --line: #2b2338; --line-2: #3d3350; --fg: #efe8f3; --fg-2: #b9acc6; --fg-3: #7e7290; --accent: #f0a35a; --accent-2: #ffc384; --accent-ink: #1e1206; --teal: #5fd3c2; --teal-2: #93eadd; --rose: #ff7a9e; --rose-2: #ffa3bc; --violet: #b493ff; --focus: #ffc384; --code-k: #c9a0ff; --code-s: #9be89a; --code-f: #7cc7ff; --code-t: #f0a35a; --code-c: #ff8fa3; --code-m: #6f6484; /* Page glow colour; the shame and bench pages override it. */ --glow: var(--accent); } @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #fbf7f2; --bg-2: #f4eee6; --bg-3: #ece3d7; --line: #e3d8c9; --line-2: #cdbfab; --fg: #1d1620; --fg-2: #5b4f62; --fg-3: #8b7f94; --accent: #c46a1e; --accent-2: #a2540f; --accent-ink: #fff8ee; --teal: #1f8f80; --teal-2: #176e62; --rose: #d5406b; --rose-2: #b12e55; --violet: #6f4fd6; --focus: #c46a1e; --code-k: #7c3aa6; --code-s: #3f7a2a; --code-f: #1f5fa8; --code-t: #a5601a; --code-c: #b13c3c; --code-m: #9a9182; } } :root[data-theme="light"] { color-scheme: light; --bg: #fbf7f2; --bg-2: #f4eee6; --bg-3: #ece3d7; --line: #e3d8c9; --line-2: #cdbfab; --fg: #1d1620; --fg-2: #5b4f62; --fg-3: #8b7f94; --accent: #c46a1e; --accent-2: #a2540f; --accent-ink: #fff8ee; --teal: #1f8f80; --teal-2: #176e62; --rose: #d5406b; --rose-2: #b12e55; --violet: #6f4fd6; --focus: #c46a1e; --code-k: #7c3aa6; --code-s: #3f7a2a; --code-f: #1f5fa8; --code-t: #a5601a; --code-c: #b13c3c; --code-m: #9a9182; } :root[data-theme="dark"] { color-scheme: dark; } @theme inline { --color-*: initial; --color-transparent: transparent; --color-current: currentColor; --color-bg: var(--bg); --color-bg-2: var(--bg-2); --color-bg-3: var(--bg-3); --color-line: var(--line); --color-line-2: var(--line-2); --color-fg: var(--fg); --color-fg-2: var(--fg-2); --color-fg-3: var(--fg-3); --color-accent: var(--accent); --color-accent-2: var(--accent-2); --color-accent-ink: var(--accent-ink); --color-teal: var(--teal); --color-teal-2: var(--teal-2); --color-rose: var(--rose); --color-rose-2: var(--rose-2); --color-violet: var(--violet); --color-focus: var(--focus); --color-discord: #5865f2; --color-npm: #cb3837; --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif; --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif; --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace; --radius-card: 10px; --spacing-gutter: clamp(1.25rem, 4vw, 2.5rem); --spacing-section: clamp(3rem, 7vw, 5.5rem); --container-wrap: 72rem; --container-measure: 66ch; --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1); --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1); /* Slight overshoot; only for properties where undershooting on the way back is harmless — sizes and offsets, not a clipping width. */ --ease-spring: cubic-bezier(0.34, 1.35, 0.5, 1); /* One motion scale for the whole site — retime here, not in the rules. `--dur-1` is for anything that answers a pointer (icon swaps, hover colours), `--dur-2` for a small state change, `--dur-3` for motion the reader is meant to watch: scroll reveals and text morphs. torph animates in JS, so its durations are passed by the `lib/morph.ts` callers instead. The loop diagram in `HowItWorks` keeps its own hand-timed sequence. */ --dur-1: 260ms; --dur-2: 560ms; --dur-3: 900ms; --stagger: 130ms; /* Tailwind's `transition-*` utilities default to this, so hover states in the components stay on the same scale without repeating a duration. */ --default-transition-duration: var(--dur-1); } /* ───────────── Base ───────────── */ @layer base { /* Utility classes set `display`, which would otherwise beat the UA [hidden]. */ [hidden] { display: none !important; } html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; } body { font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; color: var(--fg); background: var(--bg); min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; /* A single glow behind the hero and a fine dot grid over the whole page. The dot is a 1.5px disc on a 1.5rem pitch. */ --dot: color-mix(in oklab, var(--line-2) 85%, transparent); background-image: radial-gradient( 60rem 30rem at 70% -10%, color-mix(in oklab, var(--glow) 14%, transparent), transparent 70% ), radial-gradient(circle, var(--dot) 0.75px, transparent 0.85px); background-size: auto, 1.5rem 1.5rem; background-position: 0 0, 0.75rem 0.75rem; background-attachment: fixed, local; } /* While the theme flips, suspend every transition so the whole page changes in one frame; otherwise hover transitions read as a flash. */ :root.theme-switching *, :root.theme-switching *::before, :root.theme-switching *::after { transition: none !important; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } } a { color: inherit; text-decoration: none; text-underline-offset: 0.18em; text-decoration-thickness: 1px; } a:hover { text-decoration: underline; } :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; } code, kbd, pre { font-family: var(--font-mono); font-size: 0.92em; font-variant-ligatures: none; } p code, li code { padding: 0.08em 0.4em; border-radius: 5px; background: var(--bg-3); border: 1px solid var(--line); color: var(--fg); font-size: 0.86em; } /* At display sizes a boxed chip overwhelms the heading, so code in a heading is set in mono and left unboxed. */ h2 code { font-size: 0.78em; color: var(--fg-2); } h1, h2, h3 { font-weight: 400; letter-spacing: -0.005em; text-wrap: balance; } h1, h2 { font-family: var(--font-serif); font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0; letter-spacing: -0.015em; } h2 { font-size: clamp(1.8rem, 1.25rem + 2vw, 2.6rem); line-height: 1.12; } h1 { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.2rem); line-height: 1.04; } /* Italic emphasis in headings takes the copper→rose gradient. */ h1 em, h2 em { font-style: italic; color: var(--accent-2); background: linear-gradient(100deg, var(--accent-2), var(--rose)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; /* `background-clip: text` clips at the inline box, and Fraunces italic ascenders — the `d` of "distilled" — lean past their advance width, so the box needs padding or the glyph is sliced. The negative margin gives that width back to the layout, keeping the gap before any text that follows the emphasis. */ padding-right: 0.16em; margin-right: -0.12em; } } /* ───────────── Utilities ───────────── */ /* Fraunces at a given optical size, with the swash axis pinned off. */ @utility display-* { font-family: var(--font-serif); font-variation-settings: "opsz" --value(integer), "SOFT" 30, "WONK" 0; } /* Section eyebrow: mono caps above a heading. */ @utility eyebrow { margin-bottom: 1rem; display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); } /* Page-level divider. Sections are not grid multiples, so a bare border lands a pixel off a grid line and reads as doubled; draw the rule as a hairline inside a soft mask that fades the dot grid out around it. */ @utility rule { position: relative; &::before { content: ""; position: absolute; left: 0; right: 0; top: -0.6rem; height: 1.2rem; background: linear-gradient(transparent, var(--bg) 40%, var(--bg) 60%, transparent); pointer-events: none; z-index: 0; } &::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); pointer-events: none; z-index: 0; } & > * { position: relative; z-index: 1; } } /* Bordered translucent panel used by cards, stats and rows. */ @utility panel { border: 1px solid var(--line); border-radius: var(--radius-card); background: color-mix(in oklab, var(--bg-2) 85%, transparent); } /* Mono pill (patch-op kinds, tree-shake chips, variants). */ @utility chip { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg-3); background: var(--bg); & b { color: var(--fg-2); font-weight: 500; } } /* ───────────── Code ───────────── Syntax classes are shared by the hero samples, capability snippets and the evidence panels. Blocks never scroll: `--fit` is set by fitCode() to scale the type down until the widest line fits. */ @layer components { pre[data-fit] { overflow: hidden; white-space: pre; tab-size: 2; color: var(--fg); } pre[data-fit] code { font-size: inherit; } .k { color: var(--code-k); } .s { color: var(--code-s); } .f { color: var(--code-f); } .t { color: var(--code-t); } .v { color: var(--fg); } .c { color: var(--code-c); } .m { color: var(--code-m); font-style: italic; } /* The morph layer paints torph's word spans from a per-character map. */ [data-tok="k"] { color: var(--code-k); } [data-tok="s"] { color: var(--code-s); } [data-tok="f"] { color: var(--code-f); } [data-tok="t"] { color: var(--code-t); } [data-tok="c"] { color: var(--code-c); } [data-tok="m"] { color: var(--code-m); font-style: italic; } } /* ───────────── Hero code window ───────────── Panels share one grid cell so the tallest sets the height. The morph layer is the visible copy while torph animates between providers; the coloured panels remain for reduced-motion and no-JS. */ @layer components { .samples > .sample { grid-area: 2 / 1; min-width: 0; visibility: hidden; opacity: 0; transition: opacity var(--dur-1) ease; } .samples > .sample.is-active { visibility: visible; opacity: 1; } .samples > .sample-morph { grid-area: 2 / 1; visibility: hidden; opacity: 0; color: var(--fg); white-space: pre; /* Swapped with the panel in one frame, not crossfaded: both layers draw the same text in the same colours, so overlapping them only doubles the glyph edges — which is the flash this avoids. */ transition: none; } .samples.is-morphing > .sample-morph { visibility: visible; opacity: 1; } .samples.is-morphing > .sample.is-active { visibility: hidden; } @media (prefers-reduced-motion: reduce) { .samples > .sample-morph { display: none; } .samples.is-morphing > .sample.is-active { visibility: visible; opacity: 1; } } /* Dot stepper: idle providers are dots, the active one expands to its name and a conic ring fills over the auto-advance interval. */ .step { --dot: 0.5rem; display: inline-flex; align-items: center; gap: 0.4rem; height: 1.35rem; padding: 0 0.3rem; border: 0; border-radius: 999px; background: transparent; color: var(--fg-3); font: inherit; font-size: 0.7rem; cursor: pointer; max-width: 1.1rem; overflow: hidden; /* Every property that differs between a dot and the open pill animates; leaving padding or the dot's size out is what made the change snap. */ transition: max-width var(--dur-2) var(--ease-soft), padding var(--dur-2) var(--ease-soft), color var(--dur-1) ease, background-color var(--dur-1) ease; } .step i { flex: none; width: var(--dot); height: var(--dot); border-radius: 50%; background: currentColor; opacity: 0.35; transition: opacity var(--dur-1) ease, width var(--dur-2) var(--ease-spring), height var(--dur-2) var(--ease-spring), transform var(--dur-2) var(--ease-spring); } .step span { white-space: nowrap; opacity: 0; transform: translateX(-0.3rem); transition: opacity var(--dur-2) ease 120ms, transform var(--dur-2) var(--ease-spring) 120ms; } .step:hover i { opacity: 1; transform: scale(1.25); } .step[aria-selected="true"] { max-width: 8rem; padding: 0 0.6rem 0 0.35rem; color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); } .step[aria-selected="true"] i { opacity: 1; width: 0.7rem; height: 0.7rem; background: conic-gradient( var(--accent) calc(var(--p, 0) * 1turn), color-mix(in oklab, var(--accent) 25%, transparent) 0 ) border-box; -webkit-mask: radial-gradient(farthest-side, transparent 55%, #000 58%); mask: radial-gradient(farthest-side, transparent 55%, #000 58%); } .step[aria-selected="true"] span { opacity: 1; transform: none; } } /* ───────────── Theme toggle ───────────── Shows the icon of the scheme you would switch to. */ @layer components { .theme-sun, .theme-moon { grid-area: 1 / 1; transition: opacity var(--dur-1) ease, transform var(--dur-2) var(--ease-soft); } .theme-sun { opacity: 1; transform: none; } .theme-moon { opacity: 0; transform: rotate(-60deg) scale(0.6); } @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-sun { opacity: 0; transform: rotate(60deg) scale(0.6); } :root:not([data-theme="dark"]) .theme-moon { opacity: 1; transform: none; } } :root[data-theme="light"] .theme-sun { opacity: 0; transform: rotate(60deg) scale(0.6); } :root[data-theme="light"] .theme-moon { opacity: 1; transform: none; } :root[data-theme="dark"] .theme-sun { opacity: 1; transform: none; } :root[data-theme="dark"] .theme-moon { opacity: 0; transform: rotate(-60deg) scale(0.6); } } /* ───────────── Provider cards ───────────── Catalogue entries expand in place. The body stays in the DOM so the prerendered HTML carries the numbers either way; `visibility` keeps its links out of the tab order while it is closed, and animating the row is the only way to transition to a height nobody knows in advance. */ @layer components { /* The card surface lives here rather than in utilities: the pinned state has to beat the hover colours, and a utility would win the layer order however specific the rule here was. */ .pkg { border-color: var(--line); background-color: color-mix(in oklab, var(--bg-2) 80%, transparent); transition: border-color var(--dur-1) ease, background-color var(--dur-1) ease, box-shadow var(--dur-1) ease; } .pkg:hover { border-color: color-mix(in oklab, var(--g) 55%, var(--line-2)); background-color: var(--bg-2); } .pkg-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-2) var(--ease-soft); } .pkg.is-open .pkg-body { grid-template-rows: 1fr; } .pkg-body > * { overflow: hidden; visibility: hidden; transition: visibility 0s linear var(--dur-2); } .pkg.is-open .pkg-body > * { visibility: visible; transition-delay: 0s; } .pkg-caret { transition: transform var(--dur-2) var(--ease-soft); } .pkg.is-open .pkg-caret { transform: rotate(180deg); } /* The provider `/p/` pins: held in its group's colour, with a couple of ring pulses so the eye lands on it after the scroll. */ .pkg.is-pinned { border-color: color-mix(in oklab, var(--g) 75%, var(--line-2)); background-color: color-mix(in oklab, var(--g) 11%, var(--bg-2)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--g) 45%, transparent); } @media (prefers-reduced-motion: no-preference) { /* The class is in the prerendered HTML, so nothing changes for a transition to catch: the held colour is eased in by an animation that starts from the plain card and runs as the last pulse fades. */ .pkg.is-pinned { animation: pkg-settle var(--dur-1) ease 2.3s backwards; } /* The pulses ride on their own layer, so ending one never wipes the held ring out from under the card. */ .pkg.is-pinned::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: pkg-pulse 1.4s var(--ease-soft) 2; } } @keyframes pkg-settle { from { border-color: var(--line); background-color: color-mix(in oklab, var(--bg-2) 80%, transparent); box-shadow: 0 0 0 1px transparent; } } @keyframes pkg-pulse { from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--g) 45%, transparent); } to { box-shadow: 0 0 0 0.7rem transparent; } } } /* ───────────── Scroll reveal ───────────── `data-reveal` blocks get `.is-in` as soon as their top edge scrolls into view (see `revealOnScroll` in lib/dom.ts). Children opt in with `.reveal-item`; `--i` staggers them. A `transition-*` utility on the item would land in a later layer and cut the reveal to the default duration, so hover transitions for these items belong here too. */ @layer components { @media (prefers-reduced-motion: no-preference) { [data-reveal] .reveal-item { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-3) var(--ease-soft), transform var(--dur-3) var(--ease-soft), border-color var(--dur-1) ease; transition-delay: calc(var(--i, 0) * var(--stagger)); } [data-reveal].is-in .reveal-item { opacity: 1; transform: none; } } } /* ───────────── The loop diagram ───────────── Three actors, two arrows, one feedback arc. Below 64rem the SVG is hidden and the nodes stack in reading order; wide, the nodes are absolutely placed over the SVG's 1000×360 box. */ @layer components { .loop-edge { fill: none; stroke-width: 3; stroke-linecap: round; } .loop-edge--sub { stroke: var(--fg-2); } .loop-edge--spec { stroke: var(--teal); } .loop-edge--patch { stroke: var(--rose); } .loop-edge--dashes { stroke-dasharray: 14 9; } .loop-tip--sub { fill: var(--fg-2); } .loop-tip--spec { fill: var(--teal); } .loop-tip--patch { fill: var(--rose); } .loop-leg { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--fg-3); } .loop-leg--patch { fill: var(--rose); font-size: 15px; } .loop-leg--sub { font-size: 12.5px; text-transform: none; letter-spacing: 0.04em; fill: color-mix(in oklab, var(--rose) 70%, var(--fg-3)); } .loop-drop { fill: var(--accent); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--accent) 70%, transparent)); } .loop-drop--b { fill: var(--rose); filter: drop-shadow(0 0 6px color-mix(in oklab, var(--rose) 70%, transparent)); } @media (prefers-reduced-motion: no-preference) { /* One hand-timed sequence — nodes, then each edge, then the arc handing over to its dashed twin — so the delays below are literal rather than derived from the motion scale. Keep them in proportion if you retime. */ [data-reveal] .loop-node { opacity: 0; transition: opacity var(--dur-3) var(--ease-soft); } [data-reveal] .loop-node--spec { transition-delay: 0ms; } [data-reveal] .loop-node--distilled { transition-delay: 220ms; } [data-reveal] .loop-node--alchemy { transition-delay: 440ms; } [data-reveal].is-in .loop-node { opacity: 1; } /* pathLength=100 on every edge: a dash of 100 at offset 100 is hidden, sliding the offset to 0 draws it from the path's start. */ [data-reveal] .loop-edge:not(.loop-edge--dashes) { stroke-dasharray: 100; stroke-dashoffset: 100; } [data-reveal].is-in .loop-edge--spec { animation: loop-draw 750ms ease-out 220ms forwards; } [data-reveal].is-in .loop-edge--sub { animation: loop-draw 900ms ease-out 680ms forwards; } [data-reveal].is-in .loop-edge--draw { animation: loop-draw 1350ms ease-out 1350ms forwards; } /* The dashed twin fades in over the solid arc once it has drawn, then the solid arc fades out — the dashes never pop. */ [data-reveal] .loop-edge--dashes { opacity: 0; transition: opacity 520ms ease 2620ms; } [data-reveal].is-in .loop-edge--dashes { opacity: 1; } [data-reveal] .loop-edge--draw { transition: opacity 520ms ease 2850ms; } [data-reveal].is-in .loop-edge--draw { opacity: 0; } /* Marker tips can't be dash-drawn; fade each in as its edge finishes. */ [data-reveal] .loop-tip { opacity: 0; transition: opacity 380ms ease; } [data-reveal].is-in .loop-tip--spec { opacity: 1; transition-delay: 900ms; } [data-reveal].is-in .loop-tip--sub { opacity: 1; transition-delay: 1500ms; } [data-reveal].is-in .loop-tip--patch { opacity: 1; transition-delay: 2620ms; } } @media (prefers-reduced-motion: reduce) { .loop-drop { display: none; } } @keyframes loop-draw { to { stroke-dashoffset: 0; } } } /* ───────────── Copy button ───────────── */ @layer components { .copy svg { grid-area: 1 / 1; transition: opacity var(--dur-1) ease, transform var(--dur-1) var(--ease-soft); } .copy .copy-done { opacity: 0; transform: scale(0.6); } .copy.is-copied { color: var(--teal); border-color: var(--teal); } .copy.is-copied .copy-icon { opacity: 0; transform: scale(0.6); } .copy.is-copied .copy-done { opacity: 1; transform: none; } }