@font-face { font-family: SFM; src: url("../fonts/SF-Mono-Regular.otf"); font-weight: 400; font-display: swap; }
@font-face { font-family: SFM; src: url("../fonts/SF-Mono-Semibold.otf"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #141417;
  --ink: #f2efe8;
  --mute: #a6a39f;
  --dim: #777673;
  --line: rgba(242, 239, 232, .13);
  --red: #ff4d2e;
  --lime: #c6ff3d;
  --mono: SFM, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code { font-family: var(--mono); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
.shell { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.page-grid {
  position: absolute;
  inset: 0 0 auto;
  height: 880px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 56% at 78% 40%, rgba(255, 77, 46, .08), transparent 70%),
    linear-gradient(rgba(242, 239, 232, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 239, 232, .025) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px;
  mask-image: linear-gradient(#000 55%, transparent);
}

.site-header {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 80px));
  margin: auto;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 16px; white-space: nowrap; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--ink);
  font: 600 23px/1 var(--mono);
  letter-spacing: -.1em;
}
.brand-mark span { color: var(--red); }
.brand-name { font: 600 14px/1.4 var(--mono); letter-spacing: .13em; }
.brand-name small { color: var(--dim); font: inherit; }
.site-header nav { display: flex; align-items: center; gap: 34px; font-size: 14px; color: var(--mute); }
.site-header nav a { transition: color .2s; }
.site-header nav a:hover { color: var(--ink); }
.site-header .nav-watch {
  padding: 12px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
}
.nav-watch span { margin-left: 16px; color: var(--red); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, .95fr);
  align-items: center;
  gap: clamp(36px, 5vw, 86px);
  min-height: 665px;
  padding-block: 90px 75px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--mute);
  font: 600 12px/1.4 var(--mono);
  letter-spacing: .19em;
}
.eyebrow-line { display: inline-block; width: 25px; height: 2px; background: var(--red); }
.hero h1 {
  margin: 26px 0 28px;
  font-size: clamp(58px, 5.55vw, 94px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -.06em;
  white-space: nowrap;
}
.hero h1 .accent { color: var(--red); }
.hero h1 .period { color: var(--lime); }
.hero-lead { max-width: 590px; margin: 0; color: var(--mute); font-size: 18px; line-height: 1.9; }
.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 46px;
  margin-top: 38px;
  padding: 16px 21px;
  background: var(--red);
  color: #111;
  font-weight: 700;
  font-size: 15px;
  transition: background .2s, transform .2s;
}
.primary-link:hover { background: #ff775e; transform: translateY(-2px); }
.primary-link span { font-size: 22px; line-height: .7; }

.render-console {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #121215;
  border: 1px solid rgba(242, 239, 232, .21);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .33), 12px 12px 0 rgba(255, 77, 46, .06);
}
.console-top {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 48px;
  padding: 0 19px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font: 11px var(--mono);
}
.window-dots { display: flex; gap: 5px; }
.window-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #59595c; }
.window-dots i:first-child { background: var(--red); }
.console-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-state { margin-left: auto; white-space: nowrap; color: var(--lime); font-size: 10px; }
.console-state i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.console-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(198, 255, 61, .08), transparent 50%),
    linear-gradient(rgba(242, 239, 232, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 239, 232, .055) 1px, transparent 1px),
    #0b0b0d;
  background-size: auto, 48px 48px, 48px 48px, auto;
}
.stage-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
}
.stage-label { align-self: stretch; display: flex; justify-content: space-between; margin: 0; color: var(--dim); font: 10px var(--mono); letter-spacing: .12em; }
.stage-label span { color: #a7a6a2; }
.stage-visual { display: flex; align-items: center; width: 75%; margin-top: auto; }
.visual-node {
  display: grid;
  place-items: center;
  flex: 0 0 74px;
  height: 53px;
  border: 1px solid rgba(198, 255, 61, .48);
  background: #171b14;
  color: var(--lime);
  font: 600 11px var(--mono);
}
.visual-node-b { border-color: rgba(242, 239, 232, .31); background: #19191b; color: var(--ink); }
.visual-node-c { border-color: rgba(255, 77, 46, .58); background: #251815; color: var(--red); }
.visual-line { height: 1px; flex: 1; background: linear-gradient(90deg, var(--lime), rgba(242,239,232,.3)); }
.visual-line-b { background: linear-gradient(90deg, rgba(242,239,232,.3), var(--red)); }
.stage-scene { margin: 25px 0 0; font-size: clamp(27px, 3vw, 42px); font-weight: 700; letter-spacing: -.04em; }
.stage-caption { margin: 5px 0 auto; font: 11px var(--mono); color: var(--red); letter-spacing: .13em; }
.stage-cross { position: absolute; width: 1px; height: 100%; top: 0; background: rgba(242,239,232,.035); }
.stage-cross-a { left: 33.333%; }
.stage-cross-b { left: 66.666%; }
.stage-corner { position: absolute; width: 11px; height: 11px; border: 1px solid rgba(242,239,232,.34); }
.corner-tl { left: 15px; top: 15px; border-right: 0; border-bottom: 0; }
.corner-tr { right: 15px; top: 15px; border-left: 0; border-bottom: 0; }
.corner-bl { left: 15px; bottom: 15px; border-right: 0; border-top: 0; }
.corner-br { right: 15px; bottom: 15px; border-left: 0; border-top: 0; }
.console-controls { padding: 22px 25px 25px; border-top: 1px solid var(--line); }
.control-line { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 16px; color: var(--dim); font: 11px var(--mono); letter-spacing: .08em; }
.control-line output { margin-left: 8px; color: var(--ink); }
.frame-slider { display: block; width: 100%; height: 20px; margin: 0; cursor: pointer; background: transparent; appearance: none; }
.frame-slider::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--red) var(--fill, 40.8%), #464648 var(--fill, 40.8%)); }
.frame-slider::-moz-range-track { height: 3px; background: #464648; }
.frame-slider::-moz-range-progress { height: 3px; background: var(--red); }
.frame-slider::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -5px; border: 2px solid var(--red); border-radius: 0; background: var(--ink); appearance: none; }
.frame-slider::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid var(--red); border-radius: 0; background: var(--ink); }
.seek-code { display: flex; align-items: center; gap: 0; margin-top: 15px; padding: 12px 14px; border: 1px solid var(--line); background: #0a0a0c; color: var(--lime); font: 12px var(--mono); white-space: nowrap; }
.code-muted { color: var(--mute); }
.code-comment { margin-left: auto; color: var(--dim); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics > div { display: flex; align-items: baseline; gap: 15px; padding: 32px 26px; }
.metrics > div:first-child { padding-left: 0; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics strong { font: 600 clamp(28px, 3vw, 42px)/1 var(--mono); letter-spacing: -.06em; }
.metric-unit { margin-left: 4px; color: var(--red); font-size: .47em; letter-spacing: 0; }
.metrics span:not(.metric-unit) { color: var(--mute); font-size: 13px; white-space: nowrap; }

.pipeline, .roles { padding-top: 145px; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: end; column-gap: 50px; margin-bottom: 40px; }
.section-intro .eyebrow { grid-column: 1 / -1; margin-bottom: 17px; }
.section-intro h2 { margin: 0; font-size: clamp(40px, 4.5vw, 66px); line-height: 1.2; letter-spacing: -.055em; }
.section-intro > p:last-child { max-width: 455px; justify-self: end; margin: 0 0 5px; color: var(--mute); font-size: 16px; line-height: 1.85; }
.flow-main { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.flow-card { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 25px; border: 1px solid var(--line); background: #141417; }
.flow-card:not(:last-child)::after { content: "→"; position: absolute; z-index: 1; right: -18px; top: 43%; display: grid; place-items: center; width: 25px; height: 25px; color: var(--red); background: var(--bg); font: 20px var(--mono); }
.flow-number, .role-index { color: var(--red); font: 11px var(--mono); letter-spacing: .13em; }
.flow-icon { height: 73px; margin: 30px 0 23px; }
.flow-icon-scene { display: flex; align-items: center; gap: 8px; }
.flow-icon-scene i { width: 48px; height: 40px; border: 1px solid var(--lime); background: rgba(198,255,61,.065); transform: skewY(-9deg); }
.flow-icon-scene i:nth-child(2) { border-color: var(--ink); transform: translateY(8px) skewY(-9deg); }
.flow-icon-scene i:nth-child(3) { border-color: var(--red); transform: translateY(16px) skewY(-9deg); }
.flow-icon-seek { display: flex; align-items: center; gap: 8px; color: var(--lime); font: 600 30px var(--mono); }
.flow-icon-seek b { color: var(--dim); font-weight: 400; }
.flow-icon-seek span:last-child { font-size: 19px; }
.flow-icon-capture { position: relative; display: grid; place-items: center; }
.flow-icon-capture::before { content: ""; display: block; width: 72px; height: 48px; border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(255,77,46,.65); }
.flow-icon-capture span { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; border: 1px solid var(--lime); border-radius: 50%; transform: translate(-50%, -50%); }
.flow-icon-encode { display: flex; align-items: center; gap: 6px; }
.flow-icon-encode span { width: 13px; height: 38px; background: var(--lime); transform: skewY(-18deg); }
.flow-icon-encode span:nth-child(2) { background: var(--ink); height: 51px; }
.flow-icon-encode span:nth-child(3) { background: var(--red); height: 64px; }
.flow-card h3, .audio-card h3, .output-card h3 { margin: 0 0 10px; font-size: 23px; letter-spacing: -.03em; }
.flow-card p, .audio-card p, .output-card p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.8; }
.flow-card > code, .audio-card code, .output-card code { display: block; margin-top: auto; padding-top: 20px; color: var(--lime); font-size: 11px; white-space: normal; }
.flow-card p code { color: var(--ink); font-size: .94em; }
.flow-merge { display: grid; grid-template-columns: 1fr 54px 1fr; align-items: stretch; margin-top: 11px; }
.audio-card, .output-card { min-height: 205px; padding: 28px 32px; border: 1px solid var(--line); background: #141417; }
.audio-card { display: grid; grid-template-columns: 155px 1fr; align-items: center; gap: 25px; }
.audio-card .flow-number { color: var(--lime); }
.audio-card h3, .output-card h3 { margin-top: 11px; }
.wave-art { display: flex; align-items: center; justify-content: center; gap: 5px; height: 100px; padding: 15px; border: 1px solid rgba(198,255,61,.22); background: rgba(198,255,61,.035); }
.wave-art i { width: 3px; height: 20%; background: var(--lime); }
.wave-art i:nth-child(2), .wave-art i:nth-child(12) { height: 43%; }
.wave-art i:nth-child(3), .wave-art i:nth-child(11) { height: 66%; }
.wave-art i:nth-child(4), .wave-art i:nth-child(10) { height: 34%; }
.wave-art i:nth-child(5), .wave-art i:nth-child(9) { height: 84%; }
.wave-art i:nth-child(6), .wave-art i:nth-child(8) { height: 56%; }
.wave-art i:nth-child(7) { height: 100%; background: var(--red); }
.merge-arrow { display: grid; place-items: center; color: var(--red); font: 28px var(--mono); }
.output-card { border-color: rgba(255,77,46,.42); background: linear-gradient(125deg, rgba(255,77,46,.09), #141417 60%); }
.output-card h3 { font-size: 30px; }
.output-card h3 span { float: right; color: var(--red); font-weight: 400; }
.output-card code { color: var(--ink); font-size: 13px; }

.roles { padding-bottom: 135px; }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.role-grid article { min-height: 214px; padding: 27px 25px; }
.role-grid article:first-child { padding-left: 0; }
.role-grid article + article { border-left: 1px solid var(--line); }
.role-grid h3 { margin: 26px 0 10px; font: 600 22px var(--mono); letter-spacing: -.05em; }
.role-grid p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.8; }
.role-grid p code { color: var(--lime); font-size: .9em; }

.closing { display: flex; justify-content: space-between; align-items: end; gap: 35px; padding-block: 70px 80px; border-top: 1px solid var(--line); }
.closing h2 { margin: 22px 0 10px; font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -.05em; }
.closing h2 span { color: var(--red); }
.closing p:last-child { margin: 0; color: var(--mute); font-size: 17px; }
.closing > a { flex: 0 0 auto; padding-bottom: 10px; border-bottom: 1px solid var(--red); font-weight: 600; }
.closing > a span { margin-left: 24px; color: var(--red); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 29px 42px; border-top: 1px solid var(--line); color: var(--dim); font: 11px var(--mono); letter-spacing: .11em; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-block: 85px 70px; }
  .hero-copy { max-width: 700px; }
  .render-console { width: min(650px, 100%); }
  .flow-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-card:nth-child(2)::after { content: none; }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .role-grid article:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .shell, .site-header { width: min(100% - 36px, 1280px); }
  .site-header { min-height: 72px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; font-size: 20px; }
  .brand-name { font-size: 11px; }
  .brand-name small { display: none; }
  .site-header nav { gap: 0; }
  .site-header nav a:not(.nav-watch) { display: none; }
  .site-header .nav-watch { padding: 9px 10px; font-size: 12px; }
  .nav-watch span { margin-left: 4px; }
  .hero { gap: 45px; min-height: 0; padding-block: 75px 45px; }
  .hero h1 { font-size: clamp(43px, 10vw, 66px); white-space: normal; }
  .hero-lead { font-size: 15px; line-height: 1.85; }
  .render-console { width: 100%; }
  .console-stage { padding: 16px; }
  .stage-label { font-size: 8px; }
  .stage-visual { width: 87%; }
  .visual-node { flex-basis: 48px; height: 37px; font-size: 9px; }
  .stage-scene { margin-top: 18px; font-size: clamp(22px, 7vw, 32px); }
  .stage-caption { font-size: 8px; }
  .console-controls { padding: 17px; }
  .code-comment { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics > div { padding: 24px 15px; flex-direction: column; gap: 7px; }
  .metrics > div:first-child { padding-left: 15px; }
  .metrics > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metrics > div:nth-child(4) { border-top: 1px solid var(--line); }
  .pipeline, .roles { padding-top: 95px; }
  .section-intro { grid-template-columns: 1fr; gap: 14px; }
  .section-intro .eyebrow { margin-bottom: 0; }
  .section-intro > p:last-child { justify-self: start; }
  .flow-main { grid-template-columns: 1fr; }
  .flow-card { min-height: 260px; }
  .flow-card:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -18px; transform: translateX(50%); }
  .flow-merge { grid-template-columns: 1fr; gap: 11px; }
  .audio-card { grid-template-columns: 90px 1fr; gap: 14px; padding: 22px; }
  .wave-art { padding: 5px; gap: 3px; }
  .merge-arrow { height: 24px; }
  .output-card { min-height: 190px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-grid article, .role-grid article:first-child, .role-grid article:nth-child(3) { min-height: 0; padding: 25px 0; }
  .role-grid article + article, .role-grid article:nth-child(3), .role-grid article:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .role-grid h3 { margin-top: 12px; }
  .roles { padding-bottom: 90px; }
  .closing { flex-direction: column; align-items: start; padding-block: 58px; }
  .closing p:last-child { font-size: 15px; }
  .site-footer { flex-direction: column; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
