/* Seam site: the comfy.org world (ink, yellow, condensed uppercase, nodes and wires), same tokens as the app. */
:root {
  --ink: #211927;
  --ink-deep: #19131e;
  --ink-raise: #2a2132;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f0efed;
  --muted: #c2bfb9;
  --dim: #9a94a0;
  --yellow: #f2ff59;
  --on-yellow: #211927;
  --sock-image: #64b5f6;
  --sock-effect: #ffa931;
  --font: 'Archivo', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.55 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
a { color: var(--yellow); text-underline-offset: 3px; }
::selection { background: var(--yellow); color: var(--on-yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
code, pre { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

/* Display voice */
h1, h2, h3, .tag, .chip, .btn, .nav a, .step-name, dt, .fx-list li {
  font-stretch: 70%; text-transform: uppercase; letter-spacing: 0.01em; word-spacing: 0.14em;
}
.tag {
  display: inline-block; padding: 0.04em 0.32em 0; background: var(--yellow); color: var(--on-yellow); font-weight: 800;
  border-radius: 0.14em; transform: skewX(-12deg); line-height: 1.05;
}
.tag-sm { font-size: 22px; font-stretch: 62%; padding: 2px 12px 1px; border-radius: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 9px; border-radius: 7px;
  background: var(--ink-raise); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sock, var(--yellow)); }
.s-image { --sock: var(--sock-image); }
.s-effect { --sock: var(--sock-effect); }
.s-video { --sock: var(--yellow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 12px;
  font-size: 17px; font-weight: 700; text-decoration: none; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 15px; }
.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { background: #f7ff8f; }
.btn-outline { border-color: var(--text); color: var(--yellow); }
.btn-outline:hover { border-color: var(--yellow); background: rgba(242, 255, 89, 0.08); }
.btn:active { transform: translateY(1px); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 var(--gutter);
  background: rgba(33, 25, 39, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; fill: var(--yellow); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 700; }
.nav a:hover { color: var(--yellow); }

/* Hero */
.hero { padding: clamp(32px, 5vw, 64px) var(--gutter) 40px; text-align: center; }
.hero-title { margin: 0; display: grid; justify-items: center; gap: 10px; font-size: clamp(40px, 5.6vw, 76px); font-weight: 800; line-height: 1; font-stretch: 62%; }
.hero-title .tag-2 { margin-left: 0.6em; }
.lede { max-width: 62ch; margin: 22px auto 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.caption { margin: 14px auto 0; max-width: 70ch; color: var(--dim); font-size: 14px; }

/* The graph: two shot nodes → effect → output, on ComfyUI's dot-grid canvas */
.graph {
  position: relative; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 0.9fr) minmax(320px, 2.6fr);
  grid-template-areas: 'a fx out' 'b fx out'; gap: 28px 64px; align-items: center; max-width: 1240px; margin: 40px auto 0;
  padding: 36px; text-align: left; border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.4px) 0 0 / 22px 22px, var(--ink);
}
.node { position: relative; z-index: 1; background: var(--ink-deep); border: 1px solid var(--line); border-radius: 14px; }
.node-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; }
.node-meta { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node img { margin: 0 10px 10px; width: calc(100% - 20px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.n-a { grid-area: a; } .n-b { grid-area: b; } .n-fx { grid-area: fx; } .n-out { grid-area: out; border-color: var(--line-strong); }
.fx-list { list-style: none; margin: 0; padding: 0 10px 12px; display: grid; gap: 6px; }
.fx-list li { padding: 9px 12px; border-radius: 9px; background: var(--ink-raise); color: var(--muted); font-size: 17px; font-weight: 800; transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.fx-list li.on { color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
.out-stage { margin: 0 10px 10px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0e0a11; }
.out-stage video { width: 100%; height: 100%; object-fit: cover; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wires path { fill: none; stroke: var(--yellow); stroke-width: 2; opacity: 0.7; }
.wires .pulse { stroke: #fbffc4; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 46; opacity: 1; }
.wires circle { fill: var(--ink); stroke: var(--yellow); stroke-width: 2; }

/* Sections */
.band { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 800; line-height: 1; font-stretch: 62%; }
.section-lede { max-width: 64ch; margin: 16px 0 0; color: var(--muted); }
h3 { margin: 18px 0 6px; font-size: 26px; font-weight: 800; line-height: 1.05; }

.inputs { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.inputs li { padding: 28px 28px 8px 0; }
.inputs li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.inputs p { margin: 0; color: var(--muted); }
.icon-lg { width: 52px; height: 52px; fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg .orbit { stroke: var(--sock-image); stroke-dasharray: 3 4; }

.showcase { margin: 36px 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--ink-deep); }
.showcase video { width: 100%; aspect-ratio: 982 / 540; object-fit: cover; background: #0e0a11; }
.showcase figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; color: var(--dim); font-size: 14px; }
.reel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.take { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--ink-deep); transition: border-color 0.3s, transform 0.4s var(--ease); }
.take:hover { border-color: var(--yellow); transform: translateY(-4px); }
.take video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #0e0a11; }
.take figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; color: var(--dim); font-size: 14px; }

.facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.facts > div { padding: 28px 32px 28px 0; border-top: 1px solid var(--line); }
.facts > div:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
dt { color: var(--yellow); font-size: 24px; font-weight: 800; }
dd { margin: 8px 0 0; color: var(--muted); max-width: 52ch; }

.steps { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; align-items: center; }
.steps li::before {
  content: counter(step); grid-row: span 2; align-self: start; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--yellow); color: var(--on-yellow); font-weight: 800; font-size: 20px;
}
.step-name { font-size: 20px; font-weight: 800; }
pre { margin: 0; padding: 14px 16px; overflow-x: auto; background: var(--ink-deep); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-size: 14px; line-height: 1.6; }
.caption code, .section-lede code { padding: 1px 6px; border-radius: 6px; background: var(--ink-raise); font-size: 0.9em; }

.foot { max-width: 1240px; margin: clamp(64px, 9vw, 120px) auto 0; padding: 28px var(--gutter) 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 14px; }
.foot p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .graph { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'a b' 'fx fx' 'out out'; gap: 28px 14px; padding: 14px; }
  .hero-title .tag-2 { margin-left: 0; }
  .node-meta { display: none; }
  .fx-list { grid-template-columns: repeat(3, 1fr); }
  .fx-list li { text-align: center; padding: 9px 6px; font-size: 15px; }
  .inputs, .reel, .facts { grid-template-columns: 1fr; }
  .inputs li, .inputs li + li { padding: 24px 0 8px; border-left: 0; }
  .inputs li + li { border-top: 1px solid var(--line); }
  .facts > div, .facts > div:nth-child(even) { padding: 24px 0; border-left: 0; }
  .take video { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
