Files

343 lines
31 KiB
CSS

/* Functions: see Functions.jsx. Built on components/v2/Keynote*. Deck values only (docs/build-notes/MASTER.md section 3): no
accent (the old indigo, then grey accent, is ink and hollow-against-filled now), surfaces are an outline or a fill
(never both), no shadows, radii 6/8/12/16/24/999, sizes from the deck scale, no overshoot curves. Hover lives inside
@media (hover: hover); presses scale to .97 in 90 ms. Hidden-until-written states are scoped to html.js, so with JS
off every word stands. */
/* dark (Hanzo's :not(.light)): Keynote.css pins .kn's greys to light values, so the page hands them back to Hanzo's
tokens; --fn-on is the word or mark on an ink fill. The warm-pool object (.kn-obj.ink) and the graphite close stay dark. */
.fn { --fn-on: light-dark(#fafafa, var(--primary-foreground)); }
html:not(.light) .fn { --ink: var(--foreground); --soft: var(--muted-foreground); --faint: var(--text-tertiary); --line: var(--border); --body: var(--muted-foreground); --quiet: var(--text-tertiary); --hair: var(--border); --ac: var(--muted-foreground); --ac-text: var(--muted-foreground); --ac-ink: var(--primary-foreground); background: var(--bg); }
/* ---------- the hero: words on 5 columns, the life on 7 bleeding right (not /cloud/containers' title-over-window) ---------- */
.fn-hero { position: relative; padding: clamp(32px, calc(30svh - 150px), 116px) 0 clamp(44px, 6vw, 72px); }
.fn-hero-g { align-items: center; row-gap: 27px; min-height: min(calc(100svh - 160px), 700px); }
.fn-hero-t { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 17px; padding-bottom: 6svh; }
.fn-hero-t .kn-lede { max-width: 22ch; }
.fn-hero-acts { margin-top: 10px; }
.fn-hero-acts .x-arrow { min-height: 44px; }
.fn .fn-go { height: 48px; padding: 0 27px; font-size: 16px; transition: background-color .15s var(--e-out), transform .15s var(--e-out); }
.fn .fn-go::after { content: ''; width: 14px; height: 14px; margin-left: 2px; background: currentColor; clip-path: polygon(0 44%, 66% 44%, 40% 18%, 50% 8%, 100% 50%, 50% 92%, 40% 82%, 66% 56%, 0 56%); transition: transform .3s var(--e-in); }
@media (hover: hover) { .fn .fn-go:hover { background: light-dark(#000, var(--primary-hover)); border-color: light-dark(#000, var(--primary-hover)); color: var(--fn-on); transform: translateY(1px); } .fn .fn-go:hover::after { transform: translateX(4px); } }
.fn .fn-go:active { transform: scale(.97); transition-duration: 90ms; }
.fn-hero-meta { display: flex; align-items: center; gap: 12px; margin-top: 17px; }
.fn-hero-mt { display: flex; flex-direction: column; gap: 4px; font: 500 13px/1.45 var(--mono); color: light-dark(#737373, var(--text-tertiary)); letter-spacing: .02em; }
/* the object ends inside the container with its full radius (no cut edge at the screen's side) */
.fn-hero-o { grid-column: 5 / -1; min-width: 0; }
.fn-hero-o .fn-life { border-radius: 24px; }
.fn-hero-oi { transform-origin: 50% 50%; }
/* the docs link answers more than colour: its arrow travels and the words underline */
@media (hover: hover) { .fn-hero-acts .x-arrow:hover svg { transform: translateX(4px); } }
.fn-hero-acts .x-arrow:active { transform: translateY(1px); }
.js .fn-hero-in { animation: fn-in .5s var(--e-in) both; animation-delay: var(--d, 0s); }
.js .fn-hero-o { animation: fn-rise .9s var(--e-in) .18s both; }
@keyframes fn-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@keyframes fn-rise { from { opacity: 0; transform: translate3d(24px, 0, 0); } to { opacity: 1; transform: none; } }
/* the object settles from 1.04 to rest over the first 420px of scroll (a CSS scroll timeline; static where unsupported) */
@supports (animation-timeline: scroll()) {
.js .fn-hero-oi { animation: fn-settle linear both; animation-timeline: scroll(root); animation-range: 0px 420px; }
@keyframes fn-settle { from { transform: scale(1.04); } to { transform: none; } }
}
.fn-hero[data-paused] .fn-life *, .fn-hero[data-paused] .fn-life *::before, .fn-hero[data-paused] .fn-life *::after { animation-play-state: paused !important; }
/* ---------- the hero object: a function's life, flat fills on the quiet room (no outline inside an outline) ---------- */
.fn-life.kn-obj { border: 0; background: light-dark(#f5f5f5, var(--muted)); }
.fn-life { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); grid-template-areas: 'trig trig' 'code k8s'; column-gap: 17px; row-gap: 27px; padding: clamp(24px, 2.6vw, 36px); }
.fn-col-k { margin: 0 0 12px; font: 606 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: light-dark(#737373, var(--text-tertiary)); }
.fn-trigs { grid-area: trig; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
.fn-trigs .fn-col-k { margin: 0; }
.fn-trig-b { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
/* the triggers are buttons: pick the one that fires (pressed again, the hero goes back to taking turns) */
.fn-trig-b button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: light-dark(#fff, var(--secondary)); font: 400 13px/1.1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); white-space: nowrap; cursor: pointer; transition: color .3s var(--e-out), background-color .3s var(--e-out), transform .4s var(--e-move); }
.fn-trig-b button i { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid light-dark(#737373, var(--text-tertiary)); transition: background-color .3s var(--e-out), border-color .3s var(--e-out); }
.fn-trig-b button.on { color: var(--fn-on); background: var(--ink); transform: translateY(-3px); }
.fn-trig-b button.on i { background: var(--fn-on); border-color: var(--fn-on); }
.fn-trig-b button[aria-pressed='true'] { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.fn-trig-b button:active { transform: scale(.97); transition-duration: 90ms; }
.fn-trig-b button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .fn-trig-b button.on:hover { background: light-dark(#262626, var(--primary-hover)); } .fn-trig-b button:not(.on):hover { color: var(--ink); background: light-dark(#fafafa, var(--secondary-hover)); } .fn-trig-b button:not(.on):hover i { border-color: var(--ink); } }
/* calls travel down from the trigger row into the file */
.fn-calls { position: absolute; left: calc(31% - 0px); bottom: -27px; width: 1px; height: 27px; background: light-dark(rgba(0, 0, 0, .14), var(--border-control)); }
.fn-calls i { position: absolute; left: -3.5px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0; }
.fn-life[data-burst] .fn-calls i { animation: fn-call .9s linear infinite; }
.fn-life[data-burst] .fn-calls i:nth-child(2) { animation-delay: .18s; }
.fn-life[data-burst] .fn-calls i:nth-child(3) { animation-delay: .36s; }
.fn-life[data-burst] .fn-calls i:nth-child(4) { animation-delay: .54s; }
.fn-life[data-burst] .fn-calls i:nth-child(5) { animation-delay: .72s; }
@keyframes fn-call { 0% { opacity: 0; transform: translateY(-6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(27px); } }
.fn-code { grid-area: code; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-radius: 16px; background: light-dark(#fff, var(--secondary)); overflow: hidden; }
.fn-file { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 17px; border-bottom: 1px solid var(--hair); }
.fn-dots { display: flex; gap: 6px; }
.fn-dots i { width: 10px; height: 10px; border-radius: 50%; background: light-dark(#e5e5e5, var(--muted)); }
.fn-file b { font: 606 14px/1 var(--mono); color: var(--ink); }
.fn-file em { margin-left: auto; padding: 6px 10px; border-radius: 999px; background: light-dark(#f5f5f5, var(--muted)); font: 400 13px/1 var(--mono); font-style: normal; color: light-dark(#525252, var(--muted-foreground)); transition: background-color .3s var(--e-out), color .3s var(--e-out); }
.fn-file em.on { background: var(--ink); color: var(--fn-on); }
/* the file's state is a shape: a hollow dot while it is being written, a filled one and Hanzo's word once deployed */
.fn-file em { display: inline-flex; align-items: center; gap: 8px; min-height: 26px; }
.fn-file em i { flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid light-dark(#737373, var(--text-tertiary)); transition: background-color .3s var(--e-out), border-color .3s var(--e-out); }
.fn-file em.on i { position: relative; background: var(--fn-on); border-color: var(--fn-on); }
.fn-file em i::after { content: ''; position: absolute; inset: -1.5px; border-radius: 50%; border: 1.5px solid var(--fn-on); opacity: 0; }
.fn-life[data-burst] .fn-file em i::after { animation: fn-pulse 1.1s var(--e-out) infinite; }
@keyframes fn-pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
.fn-nodes { transform-origin: 50% 40%; transition: transform .9s var(--e-in); }
.fn-life[data-grow] .fn-nodes { transform: scale(1.05); transition-duration: .6s; }
.fn-code pre { flex: 1; margin: 0; padding: 17px; font: 400 13.5px/1.65 var(--mono); color: var(--ink); white-space: pre; overflow: hidden; }
.js .fn-ln { animation: fn-ln .15s var(--e-out) both; animation-delay: calc(.3s + var(--i) * .38s); }
.js .fn-ln::after { content: ''; display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: var(--ink); opacity: 0; animation: fn-cur .38s steps(1, end) both; animation-delay: calc(.3s + var(--i) * .38s); }
@keyframes fn-ln { from { opacity: 0; } to { opacity: 1; } }
@keyframes fn-cur { 0% { opacity: 1; } 100% { opacity: 0; } }
.fn-code .k { color: light-dark(#525252, var(--muted-foreground)); }
.fn-code .f { font-weight: 606; }
.fn-code .c { color: light-dark(#737373, var(--text-tertiary)); }
.fn-k8s { grid-area: k8s; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.fn-k8s .fn-col-k { margin: 0; }
/* state as a shape and a word: a filled ink dot while replicas run, a hollow one at zero */
.fn-count { margin: 0; display: flex; align-items: center; gap: 10px; font: 497 17px/1.2 var(--sans); color: var(--ink); }
.fn-count i { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--ink); transition: background-color .3s var(--e-out); }
.fn-count[data-zero] i { background: transparent; }
/* the words are Hanzo's state at rest; while replicas run they fade back and the filled dot carries the state */
.fn-count span { color: light-dark(#525252, var(--muted-foreground)); text-decoration: line-through; text-decoration-thickness: 1px; transition: color .3s var(--e-out); }
.fn-count[data-zero] span { color: var(--ink); text-decoration: none; }
.fn-nodes { display: grid; gap: 8px; }
.fn-node { display: block; padding: 10px 12px; border-radius: 12px; background: light-dark(#fff, var(--secondary)); }
.fn-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.fn-slots i { aspect-ratio: 1; border-radius: 6px; border: 1.5px solid light-dark(#d4d4d4, var(--border-selected)); transform: scale(.7); transition: transform .3s var(--e-in), background-color .15s var(--e-out), border-color .15s var(--e-out); }
.fn-slots i.on { background: var(--ink); border-color: var(--ink); transform: none; }
.fn-warm { margin: 0; display: flex; align-items: center; gap: 8px; font: 400 13px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.fn-warm i { width: 10px; height: 10px; border-radius: 999px; border: 1.5px dashed var(--ink); }
/* ---------- chapters ---------- */
.fn .knc-count { font-size: 13px; }
/* one section-padding step between the hero and the chapters' heading (the hero's own bottom padding), not two */
.fn-ch .knc-head { padding-top: 17px; }
.fn-ch-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--kn-g); align-items: end; row-gap: 27px; }
.fn-ch-hw { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 10px; }
.fn-join { grid-column: 7 / -1; display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.fn-join-n { flex: none; padding: 12px 16px; border-radius: 999px; background: light-dark(#f5f5f5, var(--muted)); font: 400 14px/1 var(--mono); color: var(--ink); }
.fn-join-n.ink { background: var(--ink); color: var(--fn-on); }
.fn-join svg { flex: 1; min-width: 17px; height: 2px; overflow: visible; }
.fn-join path { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
/* type order: chapter titles rest at 26px, never above the section headings */
.fn-ch .knc-h { font-size: 26px; letter-spacing: -.02em; }
/* hovering a chapter number tells you which chapter it is (its own title, set on the button after mount, as a tip) */
@media (min-width: 900px) and (hover: hover) {
.fn-ch .knc-rail button[data-tip]::before { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--fn-on); font: 400 13px/1.2 var(--sans); letter-spacing: 0; white-space: nowrap; opacity: 0; transform: translate3d(0, 4px, 0); pointer-events: none; transition: opacity .15s var(--e-out), transform .15s var(--e-out); z-index: 4; }
.fn-ch .knc-rail button[data-tip]:hover::before, .fn-ch .knc-rail button[data-tip]:focus-visible::before { opacity: 1; transform: none; }
}
/* the kit's chapter rail sits under the words; with the words on the right its grid area has to follow them */
.fn-ch.knc.right .knc-rail { grid-column: 8 / span 5; left: 0; right: auto; }
.fn-sc { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: clamp(24px, 3.4vw, 44px); }
.fn-sc-k { margin: 0; font: 606 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: light-dark(#737373, var(--text-tertiary)); }
.kn-obj.ink .fn-sc-k { color: #a3a3a3; }
.fn-rts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fn-rt { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 17px; min-height: 120px; padding: 24px; border: 0; border-radius: 16px; background: light-dark(#f5f5f5, var(--secondary)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .4s var(--e-move), color .4s var(--e-move), transform .5s var(--e-move); }
.fn-rt:active { transform: scale(.97); transition-duration: 90ms; }
.fn-rt:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .fn-rt:not(.on):hover { background: light-dark(#e4e4e7, var(--secondary-hover)); } }
.fn-rt b { font-size: 26px; font-weight: 497; letter-spacing: -.02em; line-height: 1; }
.fn-rt span { font: 400 14px/1.3 var(--mono); white-space: nowrap; color: light-dark(#525252, var(--muted-foreground)); transition: color .4s var(--e-move); }
.fn-rt.box { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: baseline; background: transparent; border: 1.5px dashed light-dark(rgba(0, 0, 0, .2), var(--border-focus)); }
.fn-rt.on { background: var(--ink); color: var(--fn-on); }
@media (hover: hover) { .fn-rt.on:hover { background: light-dark(#262626, var(--primary-hover)); } }
.fn-rt.on span { color: light-dark(rgba(255, 255, 255, .78), var(--secondary)); }
.fn-rt.box.on { border-color: var(--ink); }
.fn-pool { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.fn-pool i { aspect-ratio: 1 / 1.35; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .3); transition: background-color .3s var(--e-out), transform .5s var(--e-move); }
.fn-pool i.hit { background: #fafafa; border-color: #fafafa; transform: translateY(-6px); }
/* the request: its word stays put at the rail's start; the dot travels the rail (sized to the rail, never past it) */
.fn-req { position: relative; height: 44px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; container-type: inline-size; }
.fn-req-dot, .fn-req-l { position: absolute; top: 50%; }
.fn-req-dot { left: 8px; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: #fafafa; transition: transform .9s var(--e-move), opacity .3s var(--e-out); }
.fn-req-l { left: 48px; transform: translateY(-50%); font: 400 14px/1 var(--mono); color: rgba(255, 255, 255, .78); white-space: nowrap; transition: opacity .3s var(--e-out); }
.fn-sc-warm[data-k='0'] .fn-req-dot { transform: translateX(calc(100cqw - 44px)); }
.fn-sc-warm[data-k='1'] .fn-req-dot { transform: translateX(calc(50cqw - 22px)); }
.fn-sc-warm[data-k='0'] .fn-req-l, .fn-sc-warm[data-k='1'] .fn-req-l { opacity: .55; }
.fn-sc-warm[data-k='2'] .fn-req-dot, .fn-sc-warm[data-k='3'] .fn-req-dot { opacity: .3; }
.fn-zero { margin: 8px 0 0; display: flex; align-items: center; gap: 17px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.fn-zero-i { flex: none; display: flex; gap: 6px; }
.fn-zero-i i { width: 14px; height: 18px; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .55); transition: background-color .4s var(--e-out); }
.fn-sc-warm[data-k='3'] .fn-zero-i i { background: transparent; }
.fn-zero > span:last-child { font-size: 16px; line-height: 1.5; color: #a3a3a3; max-width: 34ch; transition: color .4s var(--e-out); }
.fn-sc-warm[data-k='3'] .fn-zero > span:last-child { color: #fafafa; }
.fn-cl-top { display: flex; align-items: center; gap: 12px; font: 400 14px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.fn-helm { padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--fn-on); }
.fn-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fn-tags span { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--hair); font: 400 14px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); transition: background-color .3s var(--e-out), color .3s var(--e-out), border-color .3s var(--e-out); }
.fn-tags span.on { background: var(--ink); border-color: var(--ink); color: var(--fn-on); }
.fn-pools { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: light-dark(#f5f5f5, var(--background)); }
.fn-pool-r { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 10px; border-radius: 12px; background: light-dark(#fff, var(--secondary)); outline: 1.5px dashed transparent; outline-offset: -1.5px; transition: outline-color .4s var(--e-out); }
.fn-pool-r.lit { outline-color: var(--ink); }
.fn-pool-r i { aspect-ratio: 1.5; border-radius: 6px; background: light-dark(#e5e5e5, var(--muted)); }
.fn-pool-r i.fn { background: var(--ink); }
.fn-cl-f { margin: 0; display: flex; align-items: center; gap: 10px; font: 400 14px/1.3 var(--mono); color: light-dark(#525252, var(--muted-foreground)); }
.fn-cl-f i { width: 12px; height: 12px; border-radius: 6px; background: var(--ink); }
.fn-want { align-self: flex-start; display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 14px 20px 14px 14px; border-radius: 16px; border: 1.5px dashed var(--ink); background: transparent; font: 400 14px/1 var(--mono); color: var(--ink); cursor: pointer; transition: background-color .15s var(--e-out), transform .15s var(--e-out); }
.fn-want[aria-pressed='true'] { border-style: solid; }
.fn-want:active { transform: scale(.97); transition-duration: 90ms; }
.fn-want:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .fn-want:hover { background: light-dark(#f5f5f5, var(--secondary)); } }
.fn-pod { display: block; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); transition: opacity .4s var(--e-out), transform .5s var(--e-in); }
/* the nodes hold pods the way the hero's cluster does: filled slots are work already running, hollow ones are free */
.fn-gnodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fn-gnode { display: flex; flex-direction: column; gap: 17px; padding: 17px; border-radius: 16px; background: light-dark(#f5f5f5, var(--secondary)); outline: 1.5px solid transparent; outline-offset: 4px; transition: outline-color .4s var(--e-out); }
.fn-gnode-k { min-height: 1.2em; font-size: 17px; font-weight: 497; letter-spacing: -.01em; }
.fn-gslots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fn-gslots i { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid light-dark(#d4d4d4, var(--border-selected)); transition: background-color .3s var(--e-out), border-color .3s var(--e-out), transform .5s var(--e-in), opacity .3s var(--e-out); }
.fn-gslots i.on { background: var(--ink); border-color: var(--ink); }
.fn-gnode.gpu { background: var(--ink); color: var(--fn-on); }
.fn-gnode.gpu .fn-gslots i { border-color: light-dark(rgba(255, 255, 255, .24), var(--muted-foreground)); }
.fn-gnode.gpu .fn-gslots i.in { background: transparent; border-color: light-dark(rgba(255, 255, 255, .24), var(--muted-foreground)); }
.fn-sc-gpu[data-k='2'] .fn-gnode.gpu .fn-gslots i.in { background: var(--fn-on); border-color: var(--fn-on); animation: fn-land .6s var(--e-in); }
@keyframes fn-land { from { transform: translate3d(0, -32px, 0) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.fn-sc-gpu[data-k='1'] .fn-gnode.gpu { outline-color: var(--ink); }
.fn-sc-gpu[data-k='2'] .fn-want .fn-pod { opacity: .15; transform: scale(.8); }
.fn-sc-tr { justify-content: center; gap: 0; }
.fn-sc-tr .fn-tr-l { margin-bottom: -1px; }
.fn-tr-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fn-tr-l li { padding: 14px 6px; border-radius: 12px; background: light-dark(#f5f5f5, var(--secondary)); text-align: center; font: 400 13px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
.fn-tr-lines { width: 100%; height: clamp(160px, 26svh, 280px); overflow: visible; }
.fn-tr-lines path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.fn-tr-h { position: relative; margin-top: -18px; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 44px; border-radius: 16px; background: var(--ink); color: var(--fn-on); }
.fn-tr-h b { font: 606 21px/1 var(--mono); }
.fn-tr-h span { font-size: 14px; color: light-dark(#a3a3a3, var(--secondary-hover)); }
.fn-modes { display: flex; gap: 6px; }
.fn-modes button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hair); background: transparent; font: 400 14px/1 var(--mono); color: light-dark(#525252, var(--muted-foreground)); cursor: pointer; transition: background-color .3s var(--e-out), color .3s var(--e-out), border-color .3s var(--e-out), transform .15s var(--e-out); }
.fn-modes button.on { background: var(--ink); border-color: var(--ink); color: var(--fn-on); }
.fn-modes button:active { transform: scale(.97); transition-duration: 90ms; }
.fn-modes button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .fn-modes button:not(.on):hover { border-color: var(--ink); color: var(--ink); } }
.fn-vers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* each version is a shape: its pods, filled for the share of traffic it carries (no invented name) */
.fn-ver { padding: 24px; border-radius: 16px; background: light-dark(#f5f5f5, var(--secondary)); transition: background-color .5s var(--e-move); }
.fn-ver-p { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fn-ver-p i { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid light-dark(#d4d4d4, var(--border-selected)); transition: background-color .4s var(--e-out), border-color .4s var(--e-out); }
.fn-ver-p i.on { background: var(--ink); border-color: var(--ink); }
.fn-ver.on { background: var(--ink); }
.fn-ver.on .fn-ver-p i { border-color: light-dark(rgba(255, 255, 255, .24), var(--muted-foreground)); }
.fn-ver.on .fn-ver-p i.on { background: var(--fn-on); border-color: var(--fn-on); }
/* the traffic: two segments that share the bar, the next version's slice growing as you choose */
.fn-traffic { display: flex; gap: 4px; height: 44px; }
.fn-traffic i { flex: 0 0 0; flex-basis: 0; min-width: 0; border-radius: 10px; transition: flex-grow .9s var(--e-move); }
.fn-traffic i { background: var(--ink); }
/* ---------- common use cases: see functions/FnUses ---------- */
/* the close's buttons on deck values (the shared room draws them in Apple greys) */
.fn .knx .x-btn.solid { background: #fafafa; border-color: #fafafa; color: #0a0a0a; height: 48px; }
@media (hover: hover) { .fn .knx .x-btn.solid:hover { background: #e4e4e7; border-color: #e4e4e7; } }
.fn .knx .x-btn.solid:active { transform: scale(.97); }
.fn .knx .x-copy { height: 44px; padding: 0 16px; background: transparent; border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .78); font-size: 13px; transition: background-color .15s var(--e-out), color .15s var(--e-out), transform .15s var(--e-out); }
@media (hover: hover) { .fn .knx .x-copy:hover { background: rgba(255, 255, 255, .1); color: #fafafa; } }
.fn .knx .x-copy:active { transform: scale(.97); transition-duration: 90ms; }
.fn .knx-code pre { overscroll-behavior: auto; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; }
/* the close on the deck's scale: "Get Functions" rests at the h1 size (the closing moment), the room ends without dead black */
.fn .knx-h { font-size: 52px; letter-spacing: -.03em; }
.fn .knx { padding-bottom: clamp(72px, 7vw, 116px); }
/* related, on the graphite close: name with Hanzo's line under it, the path drawing in on hover */
.fn-rel { margin-top: 10px; }
.fn-rel > .kn-kick { color: #a3a3a3; margin-bottom: 10px; }
.fn-rel ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.fn-rel li { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.fn-rel-a { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 17px; min-height: 56px; padding: 10px 8px; color: #fafafa; text-decoration: none; transition: background-color .15s var(--e-out), transform .15s var(--e-out); }
.fn-rel-w { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fn-rel-a b { font-size: 17px; font-weight: 497; }
.fn-rel-w span { font-size: 14px; color: #a3a3a3; }
.fn-rel-p { font: 400 13px/1 var(--mono); font-style: normal; color: rgba(255, 255, 255, .55); opacity: 0; transform: translate3d(-8px, 0, 0); transition: opacity .3s var(--e-out), transform .3s var(--e-in); }
.fn-rel-a svg { transition: transform .3s var(--e-move); }
.fn-rel-a:active { transform: scale(.99); transition-duration: 90ms; }
.fn-rel-a:focus-visible { outline: 2px solid #fafafa; outline-offset: 2px; border-radius: 8px; }
.fn-rel-a:focus-visible .fn-rel-p { opacity: 1; transform: none; }
@media (hover: hover) { .fn-rel-a:hover { background: rgba(255, 255, 255, .06); } .fn-rel-a:hover svg { transform: translateX(4px); } .fn-rel-a:hover .fn-rel-p { opacity: 1; transform: none; } }
[data-off] .fn-calls i { animation-play-state: paused; }
@media (max-width: 899px) {
.fn-hero { padding: 24px 0 44px; }
.fn-hero-g { min-height: 0; row-gap: 27px; }
.fn-hero-t, .fn-hero-o { grid-column: 1 / -1; margin: 0; padding: 0; }
.fn-hero-o .fn-life { border-radius: 20px; }
.fn-hero-t .kn-lede { max-width: none; }
.fn-hero-acts > * { flex: 1 1 auto; }
.fn-hero-acts .x-btn { width: 100%; }
.fn-hero-meta { margin-top: 6px; }
.fn-hero-mt { font-size: 14px; }
.js .fn-hero-oi { animation: none; }
@keyframes fn-rise { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
.fn-life { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'trig' 'code' 'k8s'; padding: 17px; gap: 17px; }
.fn-trigs { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
.fn-trig-b { grid-template-columns: 1fr 1fr; gap: 8px; }
.fn-calls { display: none; }
.fn-ch-hw, .fn-join { grid-column: 1 / -1; }
.fn-join-n { padding: 8px 10px; font-size: 14px; }
.fn-join { gap: 4px; }
.fn-join svg { min-width: 8px; }
/* phones: the six chapters run top to bottom, each its words then its drawing, played as it is reached */
.fn-ch .knc-a:first-child { padding-top: 17px; }
.fn-ch .knc-h, .fn-ch .knc-body p { overflow-wrap: normal; hyphens: none; }
.fn-ch .knc-v { aspect-ratio: auto; height: auto; margin-top: 27px; }
.fn-ch .knc-v > .fn-sc { height: auto; min-height: 280px; }
.fn-ch .knc-t { gap: 10px; }
.fn-ch .knc-body p { font-size: 15px; line-height: 1.55; }
.fn-ch .knc-h { font-size: 21px; }
.fn-col-k { margin-bottom: 10px; }
.fn-code pre { padding: 14px; font-size: 12px; white-space: pre; overflow-x: auto; overscroll-behavior-x: auto; }
.fn-warm { font-size: 14px; }
.fn .knc-count { font-size: 14px; }
.fn-sc { padding: 17px; gap: 14px; }
.fn-rts { gap: 8px; }
.fn-rt { min-height: 80px; padding: 12px 14px; gap: 8px; }
.fn-rt b { font-size: 17px; }
.fn-rt span { font-size: 13px; }
.fn-rt.box { min-height: 0; }
.fn-rt.box { flex-direction: column; }
.fn-pool { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fn-pool i:nth-child(n+5) { display: none; }
.fn-zero > span:last-child { font-size: 14px; }
.fn-pool-r { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fn-pool-r i:nth-child(n+6) { display: none; }
.fn-gnodes { gap: 8px; }
.fn-gnode { padding: 12px; gap: 12px; }
.fn-gnode-k { font-size: 14px; }
.fn-gslots { gap: 6px; }
.fn-gslots i { border-radius: 8px; }
.fn-tr-l { grid-template-columns: 1fr 1fr; }
.fn-tr-lines { height: 110px; }
.fn-tr-h { padding: 16px 24px; }
.fn-tr-h b { font-size: 17px; }
.fn-ver { padding: 14px; }
.fn-ver-p { gap: 6px; }
.fn-ver-p i { border-radius: 8px; }
.fn-modes button { padding: 0 14px; }
.fn-tr-l li { font-size: 13px; }
.fn .knx-h { font-size: 32px; }
.fn-rel-a { padding: 10px 6px; }
.fn-rel-p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.fn-calls i, .js .fn-ln, .js .fn-ln::after, .js .fn-hero-oi, .js .fn-hero-in, .js .fn-hero-o { animation: none !important; }
.fn-rel-p { transition: none !important; }
.js .fn-ln::after { display: none; }
.fn-rt, .fn-pool i, .fn-req-dot, .fn-req-l, .fn-slots i, .fn-pod, .fn-traffic i, .fn-ver, .fn-gnode, .fn-nodes, .fn-gslots i { transition: none !important; }
.fn-life[data-burst] .fn-file em i::after, .fn-gslots i.in { animation: none !important; }
}
/* the narrowest phones: the three nouns wrap rather than run off the edge */
@media (max-width: 359px) {
.fn-trig-b { grid-template-columns: minmax(0, 1fr); }
.fn-join-n { padding: 7px 8px; font-size: 12px; }
.fn-join { gap: 3px; }
.fn-join svg { min-width: 6px; }
}
/* dark: the filled marks (running pods, the next version's share, the GPU pod) draw in Hanzo's muted foreground, so a
cluster reads as data rather than a field of light tiles; a chosen version's card is Hanzo's primary fill with dark marks */
html:not(.light) .fn-slots i.on, html:not(.light) .fn-gnode:not(.gpu) .fn-gslots i.on, html:not(.light) .fn-ver-p i.on { background: var(--muted-foreground); border-color: var(--muted-foreground); }
html:not(.light) .fn-pool-r i.fn, html:not(.light) .fn-pod, html:not(.light) .fn-traffic i { background: var(--muted-foreground); }
html:not(.light) .fn-ver.on { color: var(--primary-foreground); }