/* ==========================================================
   Hetuh LLC  |  hetuhai.com
   Dark studio theme: ink, electric blue, amber signal.
   ========================================================== */

:root {
  --ink: #06080d;
  --ink-2: #0a0e16;
  --ink-3: #0f1520;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --text: #e8edf5;
  --muted: #9aa6b8;
  --dim: #6b778a;

  --blue: #4f8cff;
  --blue-2: #2f6bff;
  --blue-soft: rgba(79, 140, 255, 0.14);
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, 0.14);
  --green: #43d692;

  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --paper-ink: #121620;
  --paper-muted: #4d5566;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--amber); color: var(--ink); }

em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 550; font-size: 15.5px; line-height: 1; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 10px 30px -10px rgba(79,140,255,.65);
}
.btn-primary:hover { background: #6199ff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.06); }
.btn-sm { padding: 10px 16px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6, 8, 13, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { width: 32px; height: 32px; }
.brand-word { font-weight: 650; font-size: 20px; letter-spacing: -0.02em; }

.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 18px; height: 1.8px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: 150px;
  background:
    radial-gradient(1000px 520px at 78% 10%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(700px 420px at 8% 90%, rgba(255,181,71,.07), transparent 60%),
    var(--ink);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  opacity: .55;
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding-bottom: 96px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--muted);
  padding: 7px 14px 7px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255,255,255,.03);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(67,214,146,.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(67,214,146,.55); }
  70% { box-shadow: 0 0 0 10px rgba(67,214,146,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,214,146,0); }
}

.hero h1 {
  margin-top: 26px;
  font-size: clamp(46px, 7.2vw, 96px);
  line-height: .98; letter-spacing: -0.045em; font-weight: 600;
}
.hero h1 em {
  font-size: 1.08em; letter-spacing: -0.02em; padding-right: .06em;
  background: linear-gradient(100deg, var(--amber) 10%, #ffd9a0 55%, var(--amber) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin-top: 26px; max-width: 540px; font-size: clamp(17px, 1.6vw, 19.5px); color: var(--muted); line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Console card */
.console {
  position: relative;
  border-radius: var(--radius); border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(20,27,40,.88), rgba(10,14,22,.92));
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: 13.5px;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform .6s var(--ease);
}
.console:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.console::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(79,140,255,.6), transparent 35%, transparent 65%, rgba(255,181,71,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.console-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); }
.console-title { margin-left: 10px; color: var(--dim); font-size: 12.5px; }
.console-body { padding: 22px 22px 20px; }
.cmd { color: var(--text); }
.prompt { color: var(--green); margin-right: 6px; }
.flag { color: var(--blue); }
.str { color: var(--amber); }

.steps { list-style: none; margin: 20px 0 18px; padding: 0; display: grid; gap: 4px; }
.steps li {
  display: grid; grid-template-columns: 22px 92px 1fr; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 10px; color: var(--dim);
  transition: background-color .4s, color .4s;
}
.steps li b { font-weight: 500; color: var(--muted); transition: color .4s; }
.steps li span:last-child { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--dim); position: relative; transition: all .4s; }
.steps li.done .st { border-color: var(--green); background: var(--green); }
.steps li.done .st::after {
  content: ""; position: absolute; left: 3.2px; top: 1.2px; width: 3px; height: 6px;
  border: solid var(--ink); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.steps li.active { background: var(--blue-soft); color: var(--muted); }
.steps li.active b { color: var(--text); }
.steps li.active .st { border-color: var(--blue); border-top-color: transparent; animation: spin .9s linear infinite; }
.steps li.done b { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.console-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line-2); color: var(--muted); }
.ok { color: var(--green); }
.caret { display: inline-block; width: 8px; height: 16px; background: var(--amber); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Ribbon */
.ribbon { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.ribbon-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding-block: 22px; }
.ribbon span { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.ribbon span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--amber); transform: rotate(45deg); }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(88px, 11vw, 140px); }
.section-alt { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 18%, var(--ink-2) 82%, var(--ink) 100%); }

.section-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 72px); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.kicker.center { text-align: center; }
.section-head h2 {
  margin-top: 18px; font-size: clamp(36px, 5vw, 64px); line-height: 1.02;
  letter-spacing: -0.035em; font-weight: 600;
}
.section-head h2 em { color: var(--blue); font-size: 1.06em; }
.section-head p:not(.kicker) { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 600px; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden;
  padding: 30px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .3s, transform .4s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(79,140,255,.14), transparent 45%);
}
.tile:hover { border-color: var(--line-2); }
.tile:hover::before { opacity: 1; }
.tile > * { position: relative; }
.tile-xl { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; background:
  radial-gradient(600px 300px at 100% 0%, rgba(79,140,255,.12), transparent 60%), var(--surface); }
.tile-xl h3 { font-size: clamp(28px, 3vw, 38px); }
.tile-xl p { font-size: 18px; max-width: 520px; }
.tile-xl .chips { margin-top: 0; padding-top: 8px; }
.flow {
  margin: auto 0; display: flex; align-items: flex-start; padding: 30px 22px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(6,8,13,.55);
}
.flow-node { flex: 0 1 112px; min-width: 72px; display: grid; justify-items: center; text-align: center; gap: 4px; }
.fn-dot {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 10px; position: relative;
  border: 1px solid var(--line-2); background: var(--surface-2);
}
.fn-dot::after { content: ""; position: absolute; inset: 16px; border-radius: 4px; background: var(--muted); }
.flow-node.hot .fn-dot { border-color: rgba(255,181,71,.55); background: var(--amber-soft); box-shadow: 0 0 24px -4px rgba(255,181,71,.45); }
.flow-node.hot .fn-dot::after { background: var(--amber); border-radius: 50%; }
.flow-node b { font-size: 14.5px; font-weight: 600; }
.flow-node small { font-size: 12px; color: var(--dim); font-family: var(--mono); line-height: 1.3; }
.flow-link { flex: 1; min-width: 12px; height: 1px; margin-top: 23px; background: var(--line-2); position: relative; overflow: hidden; }
.flow-link i { position: absolute; top: 0; left: -30%; width: 30%; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), transparent); animation: flowpulse 2.4s linear infinite; }
.flow-link:nth-child(4) i { animation-delay: .6s; }
.flow-link:nth-child(6) i { animation-delay: 1.2s; }
.flow-link:nth-child(8) i { animation-delay: 1.8s; }
@keyframes flowpulse { to { left: 100%; } }

.tile-wide { grid-column: span 3; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.tile-wide .tile-icon { margin: 0; }
.tile-wide .chips { margin-top: 0; justify-content: flex-end; max-width: 420px; }

.tile-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 26px;
  background: var(--blue-soft); border: 1px solid rgba(79,140,255,.25); color: var(--blue);
}
.tile-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.tile p { margin-top: 10px; color: var(--muted); font-size: 16px; }

.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,.025);
}

/* ---------- Demo ---------- */
.demo {
  display: grid; grid-template-columns: 320px 1fr; gap: 20px;
  padding: 16px; border-radius: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.demo-tabs { display: flex; flex-direction: column; gap: 6px; position: relative; }
.demo-tabs button {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; cursor: pointer;
  padding: 16px; border-radius: 14px; border: 1px solid transparent; background: transparent;
  transition: background-color .25s, border-color .25s;
}
.demo-tabs button:hover { background: rgba(255,255,255,.03); }
.demo-tabs button[aria-selected="true"] { background: var(--surface-2); border-color: var(--line-2); }
.tab-num {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line-2);
}
.demo-tabs button[aria-selected="true"] .tab-num { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.demo-tabs b { display: block; font-weight: 600; font-size: 16px; }
.demo-tabs small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.demo-stage { min-height: 460px; border-radius: 18px; background: var(--ink-3); border: 1px solid var(--line); padding: clamp(18px, 3vw, 34px); display: flex; }
.panel { width: 100%; display: flex; flex-direction: column; gap: 22px; animation: fadeUp .5s var(--ease); }
.panel[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mock { border-radius: 14px; border: 1px solid var(--line-2); background: var(--ink-2); overflow: hidden; flex: 1; }
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--dim); }
.mock-bar .dot { width: 8px; height: 8px; }
.mock-bar span:last-child { margin-left: 8px; }

.panel-notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.panel-notes li { font-size: 14px; color: var(--muted); padding-left: 16px; position: relative; line-height: 1.45; }
.panel-notes li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* chat */
.chat { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.bot b { color: var(--amber); font-weight: 600; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cites span { font-family: var(--mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: rgba(79,140,255,.14); color: #9fc0ff; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bob 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* documents */
.mock-split { display: grid; grid-template-columns: 1fr 1.1fr; }
.doc { position: relative; overflow: hidden; margin: 18px; padding: 22px; border-radius: 10px; background: #eef1f6; display: flex; flex-direction: column; gap: 10px; }
.doc-line { height: 8px; border-radius: 4px; background: #cfd6e2; }
.doc-line.strong { height: 12px; background: #9aa6b8; }
.doc-line.hl { background: var(--amber); box-shadow: 0 0 0 4px rgba(255,181,71,.25); }
.doc-box { padding: 10px; border: 1.5px dashed #9fc0ff; border-radius: 8px; display: grid; gap: 8px; background: rgba(79,140,255,.08); }
.w30{width:30%}.w35{width:35%}.w40{width:40%}.w45{width:45%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w90{width:90%}
.scan { position: absolute; left: 0; right: 0; height: 40px; top: -40px; background: linear-gradient(180deg, transparent, rgba(79,140,255,.35), transparent); animation: scan 3.2s var(--ease) infinite; }
@keyframes scan { to { top: 100%; } }

.fields { padding: 22px 22px 22px 6px; }
.fields-title { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 12px; }
.fields dl { margin: 0; display: grid; gap: 8px; }
.fields dl > div {
  display: grid; grid-template-columns: 96px 1fr 56px; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}
.fields dt { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.fields dd { margin: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag-warn { color: var(--amber); }
.conf { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.conf::after { content: ""; position: absolute; inset: 0; width: calc(var(--c) * 100%); background: var(--green); border-radius: inherit; }
.conf.low::after { background: var(--amber); }

/* chart */
.chart { width: 100%; height: auto; padding: 14px 14px 0; }
.grid-lines path { stroke: var(--line); stroke-width: 1; }
.band { fill: rgba(255,181,71,.14); }
.actual { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.forecast { fill: none; stroke: var(--amber); stroke-width: 3; stroke-dasharray: 7 7; stroke-linecap: round; }
.now { stroke: var(--line-2); stroke-dasharray: 3 5; }
.now-label { fill: var(--dim); font-family: var(--mono); font-size: 12px; }
.pt { fill: var(--ink-2); stroke: var(--text); stroke-width: 2; }
.panel:not([hidden]) .actual { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 8px 20px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend span::before { content: ""; width: 18px; height: 3px; border-radius: 2px; }
.lg-actual::before { background: var(--blue); }
.lg-forecast::before { background: repeating-linear-gradient(90deg, var(--amber) 0 5px, transparent 5px 9px); }
.lg-band::before { height: 10px !important; background: rgba(255,181,71,.25); }

/* in-app */
.app { display: grid; grid-template-columns: 56px 1fr; min-height: 300px; }
.app-side { border-right: 1px solid var(--line); padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.app-side i { width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); }
.app-side i:first-child { background: var(--blue-soft); outline: 1px solid rgba(79,140,255,.3); }
.app-main { padding: 20px; display: grid; gap: 14px; align-content: start; }
.ticket { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 9px; }
.ticket .doc-line { background: rgba(255,255,255,.08); }
.ticket-h { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.ai-card {
  padding: 16px 18px; border-radius: 12px; position: relative;
  background: linear-gradient(135deg, rgba(79,140,255,.14), rgba(255,181,71,.08));
  border: 1px solid rgba(79,140,255,.3);
}
.ai-h { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #9fc0ff; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.spark { color: var(--amber); font-size: 14px; }
.ai-card p:not(.ai-h) { font-size: 15px; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-actions span { font-size: 12.5px; padding: 5px 10px; border-radius: 8px; background: rgba(0,0,0,.25); color: var(--muted); }
.ai-actions b { color: var(--text); font-weight: 600; }

.footnote { margin-top: 18px; font-size: 13px; color: var(--dim); font-family: var(--mono); }

/* ---------- Process (paper) ---------- */
.section-paper { background: var(--paper); color: var(--paper-ink); }
.section-paper .kicker { color: #b86a00; }
.section-paper .section-head h2 em { color: var(--blue-2); }
.section-paper .section-head p:not(.kicker) { color: var(--paper-muted); }

.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; position: relative; }
.process::before { content: ""; position: absolute; left: 0; right: 0; top: 36px; height: 1px; background: rgba(18,22,32,.16); }
.process li { position: relative; padding: 0 28px 0 0; }
.p-num {
  display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--paper); border: 1px solid rgba(18,22,32,.18);
  font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--paper-ink);
  position: relative; transition: background-color .3s, color .3s, border-color .3s;
}
.process li:hover .p-num { background: var(--paper-ink); color: var(--amber); border-color: var(--paper-ink); }
.process h3 { margin-top: 24px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.process p { margin-top: 8px; color: var(--paper-muted); font-size: 16px; }

.engage { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.engage article {
  padding: 28px; border-radius: var(--radius); background: #fbf9f4; border: 1px solid rgba(18,22,32,.1);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.engage article:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(18,22,32,.35); }
.engage article.featured { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.engage article.featured p:not(.e-tag) { color: #b7bfcc; }
.engage article.featured .e-tag { color: var(--amber); border-color: rgba(255,181,71,.4); }
.e-tag { display: inline-block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #b86a00; padding: 4px 10px; border: 1px solid rgba(184,106,0,.3); border-radius: 999px; }
.engage h3 { margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -0.01em; line-height: 1; }
.engage p:not(.e-tag) { margin-top: 12px; color: var(--paper-muted); font-size: 16px; }

/* ---------- Principles ---------- */
.why { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.why .section-head { margin-bottom: 0; position: sticky; top: 120px; }
.principles { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principles article { padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .3s; }
.principles article:hover { background: rgba(255,255,255,.025); }
.pr-i { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--amber); line-height: 1; }
.principles h3 { margin-top: 18px; font-size: 20px; letter-spacing: -0.015em; font-weight: 600; }
.principles p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* ---------- Stack marquee ---------- */
.stack { padding-block: 24px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.stack .kicker { margin-bottom: 22px; }
.marquee {
  overflow: hidden; padding-block: 8px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; gap: 12px; width: max-content; animation: marquee 60s linear infinite; }
.marquee.reverse .track { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .track { animation-play-state: paused; }
.track span {
  font-family: var(--mono); font-size: 14px; color: var(--muted); white-space: nowrap;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font-size: 19px; font-weight: 550; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--text), var(--text)) center / 11px 1.6px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 1.6px 11px no-repeat;
  transition: transform .3s var(--ease), background-color .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--amber-soft); }
.faq summary:hover { color: #fff; }
.faq details p { padding: 0 48px 24px 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(800px 400px at 15% 100%, rgba(79,140,255,.16), transparent 60%),
    radial-gradient(600px 300px at 90% 0%, rgba(255,181,71,.07), transparent 60%),
    var(--ink-2);
  border-top: 1px solid var(--line);
}
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact-copy h2 { margin-top: 18px; font-size: clamp(38px, 5.4vw, 68px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.contact-copy h2 em { color: var(--amber); font-size: 1.06em; }
.contact-copy > p:not(.kicker) { margin-top: 22px; color: var(--muted); font-size: 18px; max-width: 460px; }
.contact-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list small { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 6px; }
.contact-list li > span:last-child { color: var(--text); font-size: 16px; line-height: 1.55; }
.ci { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); color: var(--amber); }
.ci svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.contact-form {
  padding: clamp(22px, 3vw, 34px); border-radius: 22px; border: 1px solid var(--line-2);
  background: rgba(10,14,22,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; gap: 18px;
}
.interest { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.interest legend { font-size: 14px; color: var(--muted); margin-bottom: 10px; padding: 0; }
.interest label { cursor: pointer; }
.interest input { position: absolute; opacity: 0; pointer-events: none; }
.interest span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--line-2); color: var(--muted); transition: all .2s;
}
.interest label:hover span { border-color: rgba(255,255,255,.3); color: var(--text); }
.interest input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.interest input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 14px; color: var(--muted); }
.field em { font-family: var(--sans); font-style: normal; color: var(--dim); font-size: 13px; margin-left: 4px; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.03); color: var(--text); font-size: 16px; resize: vertical;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: rgba(79,140,255,.06); box-shadow: 0 0 0 4px rgba(79,140,255,.15); }
.field.invalid input, .field.invalid textarea { border-color: #ff7a7a; }
.form-status { min-height: 1.4em; font-size: 14px; color: var(--muted); text-align: center; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #ff9a9a; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: 64px; background: var(--ink); }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 48px; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 15px; }
.footer-site { display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 13.5px; color: var(--amber); }
.footer-site:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-links { display: flex; gap: clamp(40px, 8vw, 96px); }
.footer-links div { display: grid; gap: 10px; align-content: start; }
.footer-links p { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 4px; }
.footer-links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 24px 32px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--dim); }
.legal { display: flex; gap: 20px; }
.legal a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .console { max-width: 560px; transform: none; }
  .demo { grid-template-columns: 1fr; }
  .demo-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .demo-tabs::-webkit-scrollbar { display: none; }
  .demo-tabs button { flex: 0 0 auto; min-width: 230px; }
  .why, .faq-wrap { grid-template-columns: 1fr; }
  .why .section-head { position: static; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 24px; background: rgba(6,8,13,.97); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease), visibility 0s linear .25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
  .nav a:not(.btn) { padding: 14px 4px; font-size: 18px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; padding: 14px; }
  .site-header.menu-open { background: rgba(6,8,13,.97); border-bottom-color: var(--line); }

  .bento { grid-template-columns: 1fr; }
  .tile-xl, .tile-wide { grid-column: auto; grid-row: auto; }
  .tile-wide { grid-template-columns: 1fr; }
  .tile-wide .chips { justify-content: flex-start; }
  .process { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .process::before { display: none; }
  .engage { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .panel-notes { grid-template-columns: 1fr; gap: 8px; }
  .mock-split { grid-template-columns: 1fr; }
  .fields { padding: 0 18px 18px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 120px; }
  .hero-inner { padding-bottom: 64px; }
  .eyebrow { font-size: 12px; }
  .steps li { grid-template-columns: 20px 80px 1fr; font-size: 12.5px; }
  .ribbon-inner { justify-content: flex-start; }
  .principles { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .demo { padding: 10px; }
  .demo-tabs button { min-width: 200px; }
  .msg { max-width: 92%; font-size: 14.5px; }
  .fields dl > div { grid-template-columns: 84px 1fr; }
  .fields .conf { grid-column: 1 / -1; }
  .faq summary { font-size: 17px; }
  .faq details p { padding-right: 0; }
  .tile { padding: 24px; }
  .flow { flex-direction: column; align-items: stretch; padding: 16px; margin-top: 24px; }
  .flow-node { flex: none; width: auto; grid-template-columns: 46px 1fr; justify-items: start; text-align: left; column-gap: 12px; row-gap: 0; align-items: center; }
  .fn-dot { grid-row: span 2; margin: 0; }
  .flow-link { flex: none; width: 1px; min-width: 0; height: 16px; margin: 4px 0 4px 23px; }
  .tile-xl .chips { padding-top: 24px; }
  .flow-link i { left: 0; top: -40%; width: 1px; height: 40%; background: linear-gradient(180deg, transparent, var(--blue), transparent); animation-name: flowdown; }
}
@keyframes flowdown { to { top: 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .marquee { mask-image: none; -webkit-mask-image: none; padding-inline: var(--gutter); }
  .track { animation: none !important; flex-wrap: wrap; width: auto; max-width: var(--wrap); margin: 0 auto; justify-content: center; }
  .track span[aria-hidden="true"] { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
