:root {
  --bg: #050607;
  --ink: #f3f4f1;
  --dim: #9aa0a8;
  --faint: #5d636b;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(14, 16, 20, 0.62);
  --amber: #ffad40;
  --ice: #9fdcff;
  /* accent washes on the dark ground */
  --ice-wash: rgba(159, 220, 255, 0.08);
  --ice-edge: rgba(159, 220, 255, 0.18);
  --ice-strong: rgba(159, 220, 255, 0.5);
  --amber-wash: rgba(255, 173, 64, 0.11);
  --amber-edge: rgba(255, 173, 64, 0.3);
  --amber-strong: rgba(255, 173, 64, 0.7);
  /* the same accents, deepened for marks drawn on light screenshots (3:1 or more on --paper) */
  --ice-deep: #1a73e8;
  --amber-deep: #c76a00;
  /* surfaces */
  --ink-hi: #ffffff;
  --surface: #0d0f12;
  --paper: #f6f6f6;
  --veil: rgba(255, 255, 255, 0.04);
  --veil-hi: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  /* the two soft hazes behind the field */
  --haze-blue: rgba(70, 150, 255, 0.16);
  --haze-teal: rgba(40, 200, 220, 0.1);

  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;

  --margin: clamp(1.25rem, 3.2vw, 3rem);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); overflow-x: clip; color-scheme: dark; scrollbar-color: var(--line-strong) var(--bg); caret-color: var(--ice); accent-color: var(--ice); }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--ink); }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.01em; color: var(--dim); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the field behind everything */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(40vmax 30vmax at 78% 18%, var(--haze-blue), transparent 70%),
    radial-gradient(36vmax 28vmax at 12% 82%, var(--haze-teal), transparent 70%); }
main, footer, .nav { position: relative; z-index: 1; }

/* ---------- nav: one floating bar ---------- */
.nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; width: max-content; white-space: nowrap; display: flex; align-items: center; gap: 4px; padding: 6px; background: rgba(16, 18, 22, 0.6); border: 1px solid var(--line); border-radius: 999px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 0.875rem; }
.nav .mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 500; font-size: 0.75rem; letter-spacing: -0.02em; text-decoration: none; margin-right: 6px; }
.nav a.l { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--dim); transition: color 180ms ease, background-color 180ms ease; }
.nav .btn { min-height: 34px; padding: 0 16px; margin-left: 6px; font-size: 0.875rem; }
@media (hover: hover) and (pointer: fine) { .nav a.l:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; text-decoration: none; transition: transform 140ms var(--ease-out), background-color 180ms ease, border-color 180ms ease; }
.btn.ghost { background: var(--veil); color: var(--ink); border: 1px solid var(--line-strong); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink-hi); }
  .btn.ghost:hover { background: var(--veil-hi); border-color: rgba(255, 255, 255, 0.3); }
  .btn:hover svg { transform: translateX(3px); }
}
.text-link { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); text-underline-offset: 0.25em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .text-link:hover { text-decoration-color: var(--ink); } }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; padding: 120px var(--margin) 64px; }
.hero-main { grid-column: 1 / 9; }
.hero .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 12px var(--ice); flex: none; }
h1 { font-size: clamp(3.1rem, 6.2vw, 6.6rem); font-weight: 300; letter-spacing: -0.055em; line-height: 0.92; }
h1 .line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
h1 .line > span { display: block; }
h1 .dimmed { color: var(--dim); }
.hero-side { grid-column: 9 / 13; padding-bottom: 10px; }
.hero-side p { color: var(--dim); max-width: 34ch; }
.hero-side .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue i { width: 1px; height: 34px; background: rgba(255, 255, 255, 0.18); overflow: hidden; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: translateY(-100%); }

/* ---------- process: the field does the work, the words follow ---------- */
.process { position: relative; height: 400svh; }
.process .marks { position: absolute; inset: 0; pointer-events: none; }
.process .marks > div { height: 100svh; }
.process-pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 0 var(--margin); align-items: end; padding-bottom: 12svh; }
.process-pin::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 6, 7, 0.82), rgba(5, 6, 7, 0.0) 55%); pointer-events: none; }
.stages { grid-column: 1 / 6; position: relative; min-height: 18rem; }
.stage { position: absolute; left: 0; right: 0; bottom: 0; transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out), filter 520ms var(--ease-out); }
.stage h3 { font-size: clamp(2.4rem, 4.6vw, 4.75rem); font-weight: 300; letter-spacing: -0.045em; line-height: 0.98; }
.stage p { margin-top: 20px; color: var(--dim); max-width: 38ch; }
.stage .legend { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.stage .legend .dot { background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.js .stage:not(.on) { opacity: 0; visibility: hidden; transform: translateY(18px); filter: blur(6px); pointer-events: none; transition: opacity 360ms var(--ease-out), transform 420ms var(--ease-out), filter 360ms var(--ease-out), visibility 0s linear 360ms; }
.js .stage.past:not(.on) { transform: translateY(-18px); }
.steps { position: absolute; top: 96px; left: var(--margin); right: var(--margin); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.steps li { position: relative; padding-top: 12px; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, 0.12); }
.steps li i { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.steps li span { transition: color 240ms ease; }
.steps li.on span { color: var(--ink); }
.no-js-steps { display: none; }

/* ---------- work ---------- */
.work { padding: 22svh var(--margin) 10svh; }
.work-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; margin-bottom: 14svh; }
.work-head h2 { grid-column: 1 / 8; font-size: clamp(2.6rem, 5.4vw, 5.75rem); font-weight: 300; letter-spacing: -0.05em; line-height: 0.95; }
.work-head p { grid-column: 9 / 13; color: var(--dim); max-width: 34ch; }
.project { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; min-height: 92svh; padding: 6svh 0; }
.project .copy { grid-column: 1 / 5; }
.project .panel { grid-column: 6 / 13; }
.project.flip .copy { grid-column: 9 / 13; grid-row: 1; }
.project.flip .panel { grid-column: 1 / 8; grid-row: 1; }
.project h3 { margin-top: 14px; font-size: clamp(2rem, 3.1vw, 3.1rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.project .desc { margin-top: 18px; color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.stats dt { font-size: clamp(1.9rem, 2.6vw, 2.5rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd { margin-top: 8px; font-size: 0.8125rem; line-height: 1.4; color: var(--dim); }
.project .stack { margin-top: 26px; line-height: 1.7; }
.project .more { margin-top: 22px; }

/* glass panels, like a window onto the running system */
.panel { position: relative; padding: 8px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transform-origin: 50% 100%; will-change: transform; }
.panel .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 12px; }
.panel .bar span:last-child { display: inline-flex; align-items: center; gap: 8px; }
.panel .bar .dot { width: 6px; height: 6px; box-shadow: 0 0 10px var(--ice); }
.panel img { border-radius: 11px; width: 100%; background: var(--surface); }
.runs { margin-top: 8px; padding: 6px 10px 6px; }
.runs li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
.runs li b { font-weight: 400; color: var(--ink); }
.runs .mk { width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.runs .mk.ok { background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.runs .mk.stop { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* the PM bot's flow, drawn as a small graph */
[data-ui].flow { padding: 18px 14px 14px; font-family: var(--mono); font-size: 0.8125rem; }
[data-ui] .path { position: relative; display: grid; gap: 8px; }
[data-ui] .path::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1px; background: linear-gradient(var(--line), var(--ice-strong), var(--line)); }
[data-ui] .node { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
[data-ui] .glyph { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
[data-ui] .k-t .glyph { background: var(--ink); }
[data-ui] .k-m .glyph { background: var(--ice); box-shadow: 0 0 10px var(--ice); }
[data-ui] .k-g .glyph { border-radius: 2px; transform: rotate(45deg); background: var(--ink); }
[data-ui] .branch-label { margin: 16px 0 8px 2px; color: var(--amber); }
[data-ui] .fallback .node { border-color: var(--amber-edge); color: var(--dim); }
[data-ui] .fallback .glyph { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
[data-ui] .label { flex: 1; }

.two { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; padding: 12svh 0 6svh; }
.two .head { grid-column: 1 / 5; }
.two .head h3 { font-size: clamp(2rem, 3.1vw, 3.1rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1; margin-top: 14px; }
.two article { grid-column: span 4; }
.two article:first-of-type { grid-column: 5 / 9; }
.two article h4 { margin-top: 18px; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; }
.two article p { margin-top: 6px; color: var(--dim); font-size: 0.9375rem; }

/* ---------- about: the field draws the portrait ---------- */
.about { min-height: 130svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; padding: 14svh var(--margin); }
.about .copy { grid-column: 1 / 6; }
.about h2 { margin-top: 18px; font-size: clamp(2.4rem, 4.6vw, 4.75rem); font-weight: 300; letter-spacing: -0.05em; line-height: 0.96; }
.about .copy p { margin-top: 22px; color: var(--dim); max-width: 42ch; }
.facts { margin-top: 34px; display: grid; gap: 12px; }
.facts div { display: grid; grid-template-columns: 7rem 1fr; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.facts dt { font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); padding-top: 2px; }
.about .still { grid-column: 8 / 12; display: none; }
.no-webgl .about .still { display: block; }
.about .still img { border-radius: 18px; filter: grayscale(1); }
.about .caption { grid-column: 8 / 13; align-self: end; text-align: right; }
.no-webgl .about .caption { display: none; }

/* ---------- contact ---------- */
.contact { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14svh var(--margin); }
.contact h2 { font-size: clamp(3rem, 7vw, 7.5rem); font-weight: 300; letter-spacing: -0.055em; line-height: 0.94; }
.contact p { margin-top: 24px; color: var(--dim); max-width: 44ch; }
.contact .mail { margin-top: 34px; font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 300; letter-spacing: -0.02em; }
.contact .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--margin) 28px; border-top: 1px solid var(--line); }
footer a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { footer a:hover { color: var(--ink); } }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  .nav .l { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); align-content: end; padding-bottom: 56px; }
  h1 { font-size: 8.8vw; }
  h1 .line > span { white-space: nowrap; }
  .hero-main, .hero-side { grid-column: 1 / -1; }
  .hero-side { margin-top: 26px; }
  .scroll-cue { display: none; }
  .process-pin { grid-template-columns: 1fr; padding-bottom: 9svh; }
  .process-pin::before { background: linear-gradient(0deg, rgba(5, 6, 7, 0.92) 30%, rgba(5, 6, 7, 0) 65%); }
  .stages { grid-column: 1 / -1; min-height: 20rem; }
  .steps { top: 80px; }
  .work-head h2, .work-head p { grid-column: 1 / -1; }
  .work-head p { margin-top: 20px; }
  .project, .project.flip { grid-template-columns: 1fr; min-height: 0; padding: 8svh 0; row-gap: 32px; }
  .project .copy, .project .panel, .project.flip .copy, .project.flip .panel { grid-column: 1 / -1; grid-row: auto; }
  .two .head, .two article, .two article:first-of-type { grid-column: 1 / -1; }
  .about { grid-template-columns: 1fr; min-height: 0; padding-top: 70svh; }
  .about .copy, .about .still, .about .caption { grid-column: 1 / -1; }
  .about .caption { text-align: left; margin-top: 24px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .js [data-r] { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-expo), filter 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-r].in { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js h1 .line > span { transform: translateY(105%); animation: rise 1100ms var(--ease-expo) forwards; animation-delay: calc(var(--i) * 120ms + 150ms); }
  .js [data-load] { opacity: 0; transform: translateY(12px); filter: blur(6px); animation: settle 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 600ms); }
  .js .nav { opacity: 0; animation: fadein 800ms ease 300ms forwards; }
  .scroll-cue i::after { animation: cue 2.2s var(--ease-in-out) infinite 1.6s; }
}
@media (prefers-reduced-motion: reduce) {
  .stage { transition: opacity 200ms ease; }
  .js .stage:not(.on), .js .stage.past:not(.on) { transform: none; filter: none; }
}
@keyframes rise { to { transform: none; } }
@keyframes settle { to { opacity: 1; transform: none; filter: none; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- production additions ---------- */
[hidden] { display: none !important; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; transition: top 200ms var(--ease-out); }
.skip:focus { top: 16px; }
.mk { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mk.ok { background: var(--ice); box-shadow: 0 0 10px var(--ice); }
.mk.stop { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.mk.idle { background: var(--faint); }
.swap { opacity: 0.35; filter: blur(2px); }

/* try a total: the number rule, live inside the invoice panel */
.try { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; margin: 2px 10px 8px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.8125rem; color: var(--dim); }
.try input { width: 100%; min-height: 40px; padding: 0 12px; background: var(--veil); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font: inherit; transition: border-color 180ms ease; }
.try input:focus-visible { outline: 2px solid var(--ice); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .try input:hover { border-color: rgba(255, 255, 255, 0.18); } }
.try output { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 1.6em; transition: opacity 160ms ease, filter 160ms ease; }
.try output b { color: var(--ink); font-weight: 400; }
.contact .links { display: flex; justify-content: center; gap: 22px; margin-top: 26px; }
footer .links { display: flex; gap: 20px; }
.hero-side { position: relative; isolation: isolate; }
.hero-side::before { content: ""; position: absolute; inset: -60px -48px -40px; z-index: -1; background: radial-gradient(closest-side, rgba(5, 6, 7, 0.82), rgba(5, 6, 7, 0)); pointer-events: none; }
@media (max-width: 899px) { .hero-side::before { inset: -40px 0 -30px; } }

/* the title line under the nav: one line on wide screens, name then roles on phones */
.hero .meta { align-items: flex-start; }
.hero .meta .dot { margin-top: 0.45em; }
.meta-text { min-width: 0; }
.m-br { display: none; }
@media (max-width: 899px) { .m-br { display: inline; } .meta-text .sep { display: none; } }

/* process: the lead line under the step bar, and each step's creative-operations twin */
.process-lead { position: absolute; top: 150px; left: var(--margin); max-width: 44ch; color: var(--dim); font-size: 1.0625rem; line-height: 1.5; z-index: 1; }
.steps li small { font-size: inherit; color: var(--dim); transition: color 240ms ease; }
.steps li.on small { color: var(--ink); }
.process-lead-m { display: none; }
@media (max-width: 899px) {
  .process-lead { display: none; }
  .process-lead-m { display: block; position: relative; z-index: 2; margin: 0; padding: 4.5rem 20px 1rem; color: var(--dim); font-size: 1.0625rem; line-height: 1.5; }
  .steps li small { display: none; }
}
@media (max-width: 899px) {
  .process-lead-m { isolation: isolate; }
  .process-lead-m::before { content: ""; position: absolute; inset: 2.5rem 0 -1rem; z-index: -1; background: radial-gradient(closest-side, rgba(5, 6, 7, 0.85), rgba(5, 6, 7, 0)); pointer-events: none; }
}

/* more automations: identical frames so cards line up, and new ones wrap two per row */
.two { align-items: start; }
.two .head { grid-row: 1 / span 9; align-self: start; }
.two article, .two article:first-of-type { grid-column: span 4; }
.two article:nth-of-type(odd) { grid-column: 5 / 9; }
.two article:nth-of-type(even) { grid-column: 9 / 13; }
.two article .panel { padding: 8px; }
.two article .panel img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: contain; background: var(--paper); padding: 6%; border-radius: 11px; }
@media (max-width: 899px) {
  .two .head { grid-row: auto; }
  .two article:nth-of-type(odd), .two article:nth-of-type(even) { grid-column: 1 / -1; }
}

/* contact */
.contact .actions { margin-top: 20px; }

/* about: the longer story needs a wider, calmer column */
.about .copy { grid-column: 1 / 7; }
.about .copy p { max-width: 52ch; }
@media (max-width: 899px) { .about .copy { grid-column: 1 / -1; } }

/* about: the story in grey, the statement in white and bold */
.about .copy p.about-intro { margin-top: 26px; color: var(--dim); font-size: 1.0625rem; line-height: 1.6; max-width: 52ch; }
.about .copy p.about-strong { color: var(--ink); font-weight: 600; font-size: 1.0625rem; line-height: 1.6; letter-spacing: -0.005em; max-width: 52ch; }

/* hero: "know when to escalate." stays on one line, sized to clear the paragraph */
h1 .line > span { white-space: nowrap; }

/* the name in the hero title line, in the page's own type */
.meta-name { font-family: var(--sans); font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; color: var(--ink); }

/* the scroll hint belongs to the first screen */
.hero { position: relative; }
.scroll-cue { left: auto; right: var(--margin); transform: none; bottom: 18px; }
@media (max-width: 899px) { h1 { font-size: 7.9vw; } }

/* chat replay (Office Management Bot) */
.chat { margin: 2px 2px 10px; padding: 0 12px 12px; border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ice-edge); color: var(--ice); font-size: 0.75rem; font-weight: 500; }
.chat-head b { display: block; font-weight: 500; font-size: 0.9375rem; }
.chat-head small { display: block; color: var(--dim); font-size: 0.8125rem; }
.chat-replay { flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); border: 1px solid var(--line); transition: transform 140ms var(--ease-out), color 180ms ease, border-color 180ms ease; }
.chat-replay svg { width: 15px; height: 15px; }
.chat-replay:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .chat-replay:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.24); } }
.chat-log { height: 330px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; padding-top: 12px; transition: opacity 300ms ease; }
.chat-log.fading { opacity: 0; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 0.9375rem; line-height: 1.45; transform-origin: var(--o, 0 100%); }
.msg.agent { align-self: flex-end; background: rgba(255, 255, 255, 0.09); border-bottom-right-radius: 4px; --o: 100% 100%; }
.msg.bot { align-self: flex-start; background: var(--ice-wash); border: 1px solid var(--ice-edge); border-bottom-left-radius: 4px; }
.msg .who { display: block; font-size: 0.75rem; color: var(--dim); margin-bottom: 2px; }
.msg .chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 3px 8px; border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; color: var(--ice); background: var(--ice-wash); }
.msg .chip.esc { color: var(--amber); background: var(--amber-wash); }
.msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: typing 1s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: no-preference) {
  .msg { animation: msg-in 280ms var(--ease-out) both; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* hover to inspect */
.zoom { position: relative; overflow: hidden; border-radius: 11px; }
.zoom img { display: block; transition: transform 280ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .zoom { cursor: none; }
  .zoom::after { content: "hover to inspect"; position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(5, 6, 7, 0.72); color: var(--dim); font: 400 0.75rem/1 var(--mono); opacity: 1; transition: opacity 200ms ease; pointer-events: none; }
  .zoom.on::after { opacity: 0; }
}

/* about: the portrait comes apart into the career graph */
.about-morph .about { min-height: 230svh; align-items: start; position: relative; }
.about-morph .about .copy { position: sticky; top: 22svh; }
.about-morph .about-marks { position: absolute; inset: 0; pointer-events: none; }
.about-morph .about-marks > div { height: 115svh; }
#graph-overlay { display: none; }
.about-morph #graph-overlay { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.graph-hover, .graph-hover body { cursor: pointer; }
@media (max-width: 899px) {
  .about-morph .about .copy { position: static; }
  .about-morph .about { padding-top: 64svh; }
}


/* magnifier lens */
.lens { position: absolute; left: 0; top: 0; width: 144px; height: 144px; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 3;
  background: var(--paper);
  opacity: 0; scale: 0.9; transition: opacity 160ms ease, scale 200ms var(--ease-out); }
.lens img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; }
.zoom.on .lens { opacity: 1; scale: 1; box-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 0 0 5px rgba(5,6,7,0.35), 0 12px 30px rgba(0,0,0,0.45); }

/* invoice workflow trace */
.trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.trace .trail { stroke: var(--ice-deep); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.trace .dot { fill: var(--ice-deep); stroke: var(--ink-hi); stroke-width: 3; }
.trace .ring { fill: none; stroke: var(--ice-deep); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 900ms var(--ease-out) forwards; }
.trace .ring.end { animation: ring-hold 1200ms var(--ease-out) forwards; }
.trace.bad .trail { stroke: var(--amber-deep); }
.trace.bad .dot { fill: var(--amber-deep); }
.trace.bad .ring { stroke: var(--amber-deep); }
@keyframes ring { 0% { opacity: 0.9; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes ring-hold { 0% { opacity: 0.9; transform: scale(0.6); } 100% { opacity: 0.9; transform: scale(1); } }

/* PM bot pulse */
[data-ui] .node { transition: border-color 260ms ease, background-color 260ms ease, color 260ms ease; }
[data-ui] .node .glyph { transition: transform 260ms var(--ease-out), box-shadow 260ms ease; }
[data-ui] .node.lit { border-color: var(--ice-strong); background: var(--ice-wash); }
[data-ui] .node.lit .glyph { transform: scale(1.5); box-shadow: 0 0 14px var(--ice); }
[data-ui] .k-g.lit .glyph { transform: rotate(45deg) scale(1.5); }
[data-ui] .node.done { border-color: var(--ice-edge); }
[data-ui] .fallback .node.lit { border-color: var(--amber-strong); background: var(--amber-wash); color: var(--ink); }
[data-ui] .fallback .node.lit .glyph { box-shadow: 0 0 16px var(--amber); }
[data-ui] .branch-label { transition: opacity 260ms ease; }
#pm-flow .flow:has(.node.lit) .branch-label:not(.lit) { opacity: 0.45; }

/* pause / play motion */
.motion-toggle { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 4px; border-radius: 50%; color: var(--dim); background: var(--veil); transition: color 180ms ease, background-color 180ms ease, transform 140ms var(--ease-out); }
.motion-toggle svg { width: 14px; height: 14px; }
.motion-toggle .i-play, .motion-toggle[aria-pressed="true"] .i-pause { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] { color: var(--ink); }
.motion-toggle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .motion-toggle:hover { color: var(--ink); background: var(--veil-hi); } }
/* only the looping animations pause; one-time entrances always finish */
.motion-paused .scroll-cue i::after, .motion-paused .msg.typing i { animation-play-state: paused; }
/* without WebGL the About section needs no scroll room for the morph */
.no-webgl.about-morph .about { min-height: 0; }
.no-webgl.about-morph .about .copy { position: static; }

/* phones: glass panels without the blur, made a touch denser to compensate */
@media (max-width: 899px) {
  .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 16, 20, 0.88); }
}

/* touch screens: 16px in the input (iOS zooms below that), and 44px tap areas without changing the look */
@media (pointer: coarse) {
  .try input { font-size: 16px; }
  .nav .mark, .nav .btn, .motion-toggle, .chat-replay, footer a, .text-link { position: relative; }
  .nav .mark::after, .nav .btn::after, .motion-toggle::after, .chat-replay::after { content: ""; position: absolute; inset: -5px; }
  footer a::after { content: ""; position: absolute; inset: -12px -8px; }
  .text-link::after { content: ""; position: absolute; inset: -11px -4px; }
  .chat-replay { width: 40px; height: 40px; }
}
