@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #04060A;
  --ink-surface: #080E1A;
  --panel: #0E1628;
  --panel-glass: rgba(14, 22, 40, 0.88);
  --panel-border: rgba(0, 240, 255, 0.18);
  --panel-border-bright: rgba(0, 240, 255, 0.5);

  --line: rgba(0, 240, 255, 0.15);
  --line-bright: rgba(0, 240, 255, 0.45);

  --text: #F1F5F9;
  --muted: #8498AE;
  --cyan: #00F0FF;
  --cyan-bright: #38BDF8;
  --blue: #3B82F6;
  --green: #00FF9D;
  --violet: #8B5CF6;
  --amber: #FF9F43;
  --red: #EF4444;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); overflow-x: hidden; }
body {
  margin: 0; background: var(--ink); color: var(--text); font: 15px/1.6 var(--font-sans);
  width: 100%; max-width: 100%; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(0, 240, 255, 0.07) 1px, transparent 0);
  background-size: 32px 32px;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
[x-cloak] { display: none !important; }

/* -------------------------------------------------------------------------- */
/* HEADER                                                                    */
/* -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; width: 100%;
  color: var(--text); background: rgba(4, 6, 10, 0.94); border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(20px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.site-header-inner {
  width: 100%; max-width: 1280px; min-height: 112px; margin: 0 auto; padding: 12px 48px;
  display: grid; grid-template-columns: 224px 1fr auto; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; text-decoration: none; width: 224px; position: relative; }
.brand-glow {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; background: rgba(0, 240, 255, 0.6);
  border-radius: 50%; filter: blur(10px); animation: pulse 2s ease-in-out infinite; pointer-events: none;
}
.brand img { display: block; height: 72px; width: auto; position: relative; z-index: 2; filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.35)); transition: filter 0.3s ease; }
.brand:hover img { filter: drop-shadow(0 0 22px rgba(0, 240, 255, 0.7)) brightness(1.15); }

.primary-nav { display: flex; justify-content: center; gap: clamp(20px, 3vw, 42px); }
.primary-nav a { position: relative; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; transition: color 0.2s; }
.primary-nav a:hover, .primary-nav a.active { color: #FFF; }

.header-actions { display: flex; align-items: center; gap: 16px; }

/* Language Dropdown */
.lang-dropdown-wrapper { position: relative; }
.lang-dropdown-btn {
  border: 1px solid var(--panel-border); background: var(--ink-surface); color: #FFF;
  border-radius: 8px; padding: 7px 14px; font: 700 11px var(--font-mono); letter-spacing: 0.1em;
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.lang-dropdown-btn:hover { background: rgba(0, 240, 255, 0.1); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 240, 255, 0.2); }
.lang-dropdown-btn svg { width: 12px; height: 12px; stroke: var(--muted); }
.lang-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); width: 100px;
  background: var(--ink-surface); border: 1px solid var(--panel-border-bright); border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.9); overflow: hidden; padding: 4px 0; z-index: 100;
}
.lang-dropdown-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 14px;
  border: 0; background: transparent; color: var(--muted); font: 700 11px var(--font-mono);
  cursor: pointer; transition: all 0.15s;
}
.lang-dropdown-menu button:hover { background: rgba(0, 240, 255, 0.15); color: #FFF; }
.lang-dropdown-menu button.active { color: var(--cyan); }

.header-cta { text-decoration: none; padding: 10px 20px; border-radius: 8px; background: #FFF; color: var(--ink); font-size: 13px; font-weight: 800; transition: all 0.2s; }
.header-cta:hover { background: #E2E8F0; transform: translateY(-1px); box-shadow: 0 0 20px rgba(255,255,255,0.4); }
.mobile-menu-toggle, .mobile-nav { display: none; }

/* -------------------------------------------------------------------------- */
/* HERO SECTION                                                               */
/* -------------------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; min-height: calc(100vh - 76px); overflow: hidden;
  display: grid; grid-template-columns: minmax(420px, .86fr) minmax(620px, 1.14fr); align-items: center;
  gap: clamp(28px, 4vw, 70px); padding: 72px clamp(28px, 5vw, 96px) 82px;
  background: radial-gradient(circle at 75% 45%, rgba(0, 240, 255, 0.14), transparent 45%),
              linear-gradient(135deg, #04060A 0%, #070D1A 55%, #0A1224 100%);
}
.hero-copy { max-width: 690px; }
.kicker { margin: 0; color: var(--cyan); font: 700 11px/1.3 var(--font-mono); letter-spacing: 0.22em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.kicker-pip { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hero h1 { margin: 22px 0 27px; font-size: clamp(52px, 5.5vw, 92px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 850; }
.hero h1 span, .section-heading h2 span { color: transparent; background: linear-gradient(105deg, #FFF 0%, var(--cyan) 50%, var(--green) 100%); background-clip: text; -webkit-background-clip: text; }
.hero-lead { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(16px, 1.2vw, 20px); line-height: 1.65; }

.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border: 1px solid var(--panel-border); border-radius: 8px;
  text-decoration: none; color: var(--text); font-weight: 700; cursor: pointer;
  transition: all 0.2s ease; font-size: 14px;
}
.button:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: var(--shadow-glow-cyan); }
.button-primary { border-color: var(--cyan); background: linear-gradient(115deg, #0284C7, #0369A1 50%, #0F766E); color: #FFF; }
.button-ghost { background: var(--panel-glass); backdrop-filter: blur(12px); }

.trust-strip { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; margin: 38px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.trust-strip li { display: flex; align-items: center; gap: 8px; }
.trust-strip i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Orchestration HUD Module */
.orchestration {
  position: relative; width: min(100%, 820px); margin-inline: auto;
  border: 1px solid var(--panel-border-bright); background: var(--panel-glass);
  backdrop-filter: blur(20px); box-shadow: 0 35px 100px rgba(0, 0, 0, 0.95), inset 0 0 60px rgba(0, 240, 255, 0.08);
  border-radius: 12px; overflow: hidden;
}
.orchestration-header {
  height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  border-bottom: 1px solid var(--line); color: var(--muted); font: 700 10px var(--font-mono); letter-spacing: 0.14em;
}
.orchestration-header > span { display: flex; align-items: center; gap: 9px; color: var(--green); }
.header-meta { display: flex; gap: 8px; }
.header-tag { padding: 3px 8px; border: 1px solid rgba(0,240,255,0.15); border-radius: 4px; color: var(--muted); font-size: 8px; letter-spacing: 0.1em; }
.header-tag.tag-ok { color: var(--green); border-color: rgba(0,255,157,0.3); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); animation: pulse 1.8s ease-in-out infinite; }
.signal-network { display: block; width: 100%; height: auto; }

/* Scan line animation */
.scan-line { animation: scanDown 6s linear infinite; }
@keyframes scanDown { 0% { transform: translateY(0); } 100% { transform: translateY(640px); } }

/* Orbital rings */
.orbit circle { fill: none; stroke: rgba(0, 240, 255, 0.18); stroke-width: 1; stroke-dasharray: 4 8; transform-origin: 380px 240px; animation: rotate 28s linear infinite; }
.orbit circle:nth-child(2) { animation-duration: 21s; animation-direction: reverse; stroke: rgba(139, 92, 246, 0.22); }
.orbit circle:nth-child(3) { animation-duration: 16s; stroke-dasharray: 18 6; }
.orbit circle:nth-child(4) { animation-duration: 12s; stroke-dasharray: 2 12; stroke: rgba(0,255,157,0.12); }

/* Data flow routes */
.routes path { fill: none; stroke: url(#cyanLine); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.75; animation: route 1.1s linear infinite; }
.moving-packets circle { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.moving-packets .packet-green { fill: var(--green); filter: drop-shadow(0 0 6px var(--green)); }
.moving-packets .packet-violet { fill: var(--violet); filter: drop-shadow(0 0 6px var(--violet)); }

/* Stream labels / direction arrows */
.stream-label { fill: rgba(0,240,255,0.4); font: 700 10px var(--font-mono); }

/* Junction dots at core boundary */
.jdot-in { fill: var(--cyan); opacity: 0.6; }
.jdot-out { fill: var(--green); opacity: 0.6; }

/* ============ NODE CARDS (Information-Dense) ============ */
.source-node rect { fill: rgba(6, 10, 20, 0.96); stroke: rgba(0,240,255,0.35); stroke-width: 1; }
.result-node rect { fill: rgba(6, 10, 20, 0.96); stroke: rgba(0,255,157,0.4); stroke-width: 1; }
.node-divider { stroke: rgba(0,240,255,0.15); stroke-width: 1; }
.node-divider-green { stroke: rgba(0,255,157,0.2); stroke-width: 1; }

/* Node title row */
.node-title { fill: #FFF; font: 700 10px var(--font-mono); letter-spacing: 0.1em; }
.node-title-result { fill: #FFF; font: 700 10px var(--font-mono); letter-spacing: 0.1em; }

/* Node data rows */
.node-data-label { fill: rgba(132,152,174,0.7); font: 700 7px var(--font-mono); letter-spacing: 0.12em; }
.node-data-value { fill: rgba(241,245,249,0.85); font: 400 8px var(--font-mono); letter-spacing: 0.04em; }
.node-val-cyan { fill: var(--cyan); }
.node-val-green { fill: var(--green); }
.node-val-amber { fill: var(--amber); }

/* Node sparkline */
.node-spark { fill: none; stroke: var(--cyan); stroke-width: 1.2; opacity: 0.6; }
.node-spark.spark-green { stroke: var(--green); }

/* ============ CORE: AI CONTROL PLANE ============ */
.core-mark .core-shield { fill: rgba(0, 240, 255, 0.06); stroke: rgba(0,240,255,0.3); stroke-width: 1; }
.core-mark polygon { fill: rgba(0, 240, 255, 0.12); stroke: var(--cyan); stroke-width: 1.4; filter: url(#softGlow); }
.core-mark .core-inner { fill: rgba(14, 22, 40, 0.92); stroke: var(--violet); stroke-width: 1.2; }
.core-mark .core-process { fill: rgba(139, 92, 246, 0.15); stroke: rgba(139,92,246,0.5); stroke-width: 1; }
.core-mark .core-pulse { fill: rgba(0,240,255,0.25); stroke: none; animation: corePulse 2.2s ease-in-out infinite; }
.core-mark .core-dot { fill: var(--cyan); filter: url(#strongGlow); }
@keyframes corePulse { 0%,100% { r: 12; opacity: 0.2; } 50% { r: 16; opacity: 0.5; } }

/* Crosshair lines */
.crosshair { stroke: rgba(0,240,255,0.12); stroke-width: 1; stroke-dasharray: 3 4; }

/* Core text labels */
.core-label { fill: #FFF; font: 900 16px var(--font-mono); text-anchor: middle; letter-spacing: 0.15em; }
.core-sublabel { fill: var(--cyan); font: 700 7px var(--font-mono); text-anchor: middle; letter-spacing: 0.18em; }
.core-version { fill: rgba(132,152,174,0.5); font: 400 6px var(--font-mono); text-anchor: middle; letter-spacing: 0.1em; }

/* Operation readout bar (between SVG and footer) */
.operation-readout-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px;
  border-top: 1px solid var(--line); background: rgba(5, 7, 11, 0.9);
}
.readout-indicator i {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 1.8s ease-in-out infinite;
}
.readout-content { flex: 1; }
.readout-content p { margin: 0; color: var(--muted); font: 700 8px var(--font-mono); letter-spacing: 0.15em; }
.readout-content strong { display: block; margin-top: 2px; font-size: 13px; line-height: 1.25; color: #FFF; }
.readout-stage b { color: var(--green); font: 700 10px var(--font-mono); letter-spacing: 0.1em; }

/* Footer: expanded to 5 columns */
.orchestration-footer { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: rgba(5, 7, 11, 0.8); }
.orchestration-footer span { padding: 12px 14px; border-right: 1px solid var(--line); }
.orchestration-footer span:last-child { border: 0; }
.orchestration-footer small, .orchestration-footer b { display: block; font-family: var(--font-mono); }
.orchestration-footer small { color: var(--muted); font-size: 7px; letter-spacing: 0.15em; }
.orchestration-footer b { margin-top: 3px; color: var(--green); font-size: 10px; }
.footer-val-green { color: var(--green) !important; }
.footer-val-cyan { color: var(--cyan) !important; }

/* -------------------------------------------------------------------------- */
/* SECTOR FILTER & OUTCOME CONSOLE                                           */
/* -------------------------------------------------------------------------- */
.outcome-section { padding: 90px clamp(28px, 6vw, 112px); background: var(--ink-surface); border-top: 1px solid var(--line); }
.section-heading { max-width: 900px; margin-bottom: 42px; }
.section-heading h2 { margin: 15px 0 18px; font-size: clamp(38px, 4vw, 68px); line-height: 1.04; letter-spacing: -0.05em; font-weight: 850; }
.section-heading > p:last-child { max-width: 760px; color: var(--muted); font-size: 18px; }

/* Industry Sector Bar */
.sector-bar-wrapper { margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.sector-bar { display: flex; gap: 10px; padding-bottom: 8px; }
.sector-chip {
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--panel-border);
  background: var(--panel-glass); color: var(--muted); font: 700 11px var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.sector-chip:hover, .sector-chip.active { border-color: var(--cyan); color: #FFF; background: rgba(0, 240, 255, 0.14); box-shadow: var(--shadow-glow-cyan); }

.outcome-console { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 580px; border: 1px solid var(--panel-border-bright); background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8); }
.outcome-selector { padding: 16px; background: #050810; border-right: 1px solid var(--line); }
.outcome-tab {
  width: 100%; position: relative; text-align: left; border: 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent; color: var(--muted); padding: 18px 16px 18px 48px; cursor: pointer; transition: all 0.2s; border-radius: 6px;
}
.outcome-tab span { position: absolute; left: 14px; top: 18px; color: var(--cyan); font: 700 11px var(--font-mono); }
.outcome-tab b { display: block; color: var(--text); font-size: 15px; }
.outcome-tab small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.outcome-tab.active { background: rgba(0, 240, 255, 0.14); color: #FFF; }
.outcome-tab.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* Outcome Detail Panel with entrance animation */
.outcome-detail { position: relative; overflow: hidden; padding: clamp(34px, 4vw, 64px); background: radial-gradient(circle at 85% 20%, rgba(0, 240, 255, 0.08), transparent 35%), var(--panel); }
.detail-code { color: var(--cyan); font: 700 10px var(--font-mono); letter-spacing: 0.16em; }
.outcome-detail h3 { margin: 14px 0 15px; font-size: clamp(28px, 2.8vw, 46px); line-height: 1.06; letter-spacing: -0.04em; }
.outcome-detail > p { color: var(--muted); font-size: 16px; max-width: 680px; }

/* Scan-line sweep on selection */
.detail-scan-line {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0; pointer-events: none;
}
.detail-enter .detail-scan-line { animation: detailScanSweep 0.6s ease-out forwards; }
@keyframes detailScanSweep { 0% { opacity: 0.8; top: 0; } 100% { opacity: 0; top: 100%; } }

/* Content fade-in-up entrance */
.detail-content-animated { opacity: 0; transform: translateY(12px); }
.detail-enter .detail-content-animated { animation: detailFadeIn 0.5s ease-out 0.1s forwards; }
@keyframes detailFadeIn { to { opacity: 1; transform: translateY(0); } }

/* 5-Stage Governed Pipeline Flow with connectors */
.pipeline-flow { display: flex; align-items: stretch; gap: 0; margin: 36px 0 28px; }
.pipeline-step {
  flex: 1; min-height: 160px; padding: 14px; border: 1px solid var(--panel-border);
  background: var(--ink-surface); border-radius: 8px; position: relative;
  opacity: 0; transform: translateY(16px) scale(0.97);
}
.detail-enter .pipeline-step { animation: stepEnter 0.4s ease-out forwards; animation-delay: calc(0.15s + var(--step-i) * 0.12s); }
@keyframes stepEnter { to { opacity: 1; transform: translateY(0) scale(1); } }

/* Pipeline connector arrows */
.pipeline-connector {
  display: flex; align-items: center; width: 24px; flex-shrink: 0;
  opacity: 0;
}
.detail-enter .pipeline-connector { animation: connectorEnter 0.3s ease-out forwards; animation-delay: calc(0.25s + var(--step-i) * 0.12s); }
@keyframes connectorEnter { to { opacity: 1; } }
.pipeline-connector svg { width: 100%; height: 24px; }
.connector-path { animation: connectorDash 1.5s linear infinite; }
@keyframes connectorDash { to { stroke-dashoffset: -12; } }

/* Step header with icon */
.step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.step-icon { color: var(--cyan); display: flex; align-items: center; }
.pipeline-step small { color: var(--cyan); font: 700 8px var(--font-mono); letter-spacing: 0.15em; }
.pipeline-step b { display: block; font-size: 13px; color: #FFF; margin-bottom: 4px; }
.pipeline-step span { color: var(--muted); font-size: 11px; line-height: 1.4; display: block; }

/* Step status indicators */
.step-status { display: flex; align-items: center; gap: 5px; margin-top: 10px; font: 700 8px var(--font-mono); letter-spacing: 0.1em; }
.step-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.status-done { color: var(--green); }
.status-done i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-active { color: var(--amber); }
.status-active i { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 1.4s ease-in-out infinite; }
.status-ready { color: var(--muted); }
.status-ready i { background: var(--muted); opacity: 0.5; }

/* Step progress bar */
.step-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.04); border-radius: 0 0 8px 8px; overflow: hidden; }
.step-progress-fill { height: 100%; width: 0; border-radius: 0 0 8px 8px; }
.status-done ~ .step-progress .step-progress-fill,
.detail-enter .pipeline-step:nth-child(-n+3) .step-progress-fill { background: var(--green); animation: progressFill 0.6s ease-out forwards; animation-delay: calc(0.4s + var(--step-i) * 0.12s); }
.detail-enter .pipeline-step:nth-child(4) .step-progress-fill { background: var(--amber); animation: progressFillPartial 0.6s ease-out forwards; animation-delay: 0.76s; }
.detail-enter .pipeline-step:nth-child(5) .step-progress-fill { background: var(--muted); opacity: 0.3; }
@keyframes progressFill { to { width: 100%; } }
@keyframes progressFillPartial { to { width: 60%; } }

/* Human gate special styling */
.pipeline-step.human-gate { border-color: var(--amber); background: rgba(255, 159, 67, 0.08); }
.pipeline-step.human-gate small { color: var(--amber); }
.pipeline-step.human-gate .step-icon { color: var(--amber); }

.outcome-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.outcome-meta div { padding: 16px 16px 16px 0; }
.outcome-meta small { color: var(--muted); font: 700 8px var(--font-mono); letter-spacing: 0.13em; }
.outcome-meta b { margin-top: 4px; font-size: 13px; color: #FFF; display: block; }

/* -------------------------------------------------------------------------- */
/* TRANSFORMATION SECTION                                                    */
/* -------------------------------------------------------------------------- */
.transformation-section { padding: 90px clamp(28px, 6vw, 112px); background: var(--ink); border-top: 1px solid var(--line); }
.transformation-grid { display: grid; grid-template-columns: 1fr 180px 1fr; align-items: center; gap: 20px; }
.command-panel-scroll { max-width: 100%; }
.state-panel { min-height: 400px; padding: 32px; border: 1px solid var(--panel-border); background: var(--panel-glass); border-radius: 12px; }
.state-panel.before { border-top: 2px solid var(--amber); }
.state-panel.after { border-top: 2px solid var(--green); box-shadow: inset 0 0 45px rgba(0, 255, 157, 0.04); }
.state-label { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 700 10px var(--font-mono); letter-spacing: 0.13em; }
.state-panel ul { list-style: none; padding: 0; margin: 30px 0 0; }
.state-panel li { position: relative; min-height: 56px; padding: 14px 10px 14px 34px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.state-panel li::before { content: ""; position: absolute; left: 5px; top: 20px; width: 8px; height: 8px; border: 1px solid var(--amber); transform: rotate(45deg); }
.state-panel.after li::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 10px var(--green); }

.transformation-engine { display: flex; align-items: center; color: var(--cyan); }
.transformation-engine > i { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--cyan)); }
.transformation-engine div { width: 110px; height: 110px; margin: 0 -1px; display: grid; place-items: center; align-content: center; border: 1px solid var(--cyan); transform: rotate(45deg); background: var(--panel); box-shadow: var(--shadow-glow-cyan); }
.transformation-engine span, .transformation-engine small { transform: rotate(-45deg); }
.transformation-engine span { font-weight: 900; font-size: 18px; color: #FFF; }
.transformation-engine small { margin-top: 4px; color: var(--cyan); font: 700 6px var(--font-mono); letter-spacing: 0.12em; }

/* -------------------------------------------------------------------------- */
/* WORKFLOW CHECK BRIEFING CONSOLE                                            */
/* -------------------------------------------------------------------------- */
.workflow-check { padding: 90px clamp(28px, 6vw, 112px); background: var(--ink-surface); border-top: 1px solid var(--line); }
.check-shell {
  max-width: 1540px; margin: 0 auto; display: grid; grid-template-columns: minmax(390px, .78fr) minmax(600px, 1.22fr);
  border: 1px solid var(--panel-border-bright); background: var(--panel); border-radius: 12px; overflow: hidden;
  box-shadow: 0 35px 100px rgba(0,0,0,0.9); transition: box-shadow 0.4s ease;
}
.check-shell.highlighted {
  animation: pulseHighlight 1.5s ease-out;
}

.brief-console { position: relative; overflow: hidden; padding: 40px; border-right: 1px solid var(--line); background: linear-gradient(150deg, #0A1222, #060910); }
.console-status { display: flex; align-items: center; gap: 9px; color: var(--green); font: 700 9px var(--font-mono); letter-spacing: 0.14em; margin-bottom: 34px; }
.console-status i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 14px var(--green); }
.brief-console h2 { margin: 14px 0 15px; font-size: clamp(32px, 3vw, 48px); line-height: 1.04; letter-spacing: -0.04em; }

.brief-map { position: relative; z-index: 1; margin-top: 36px; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 20px; }
.brief-core { width: 110px; height: 110px; border: 1px solid var(--cyan); display: grid; place-items: center; align-content: center; transform: rotate(45deg); background: rgba(0, 240, 255, 0.08); box-shadow: var(--shadow-glow-cyan); }
.brief-core b, .brief-core span { transform: rotate(-45deg); text-align: center; }
.brief-core b { font-size: 18px; color: var(--cyan); }
.brief-core span { max-width: 90px; color: var(--muted); font-size: 8px; }
.brief-map ol { list-style: none; padding: 0; margin: 0; }
.brief-map li { position: relative; height: 38px; display: grid; grid-template-columns: 14px 1fr 24px; align-items: center; gap: 8px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; }
.brief-map li i { width: 6px; height: 6px; border: 1px solid var(--muted); border-radius: 50%; }
.brief-map li b { font: 700 8px var(--font-mono); }
.brief-map li.active { color: #FFF; }
.brief-map li.active i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.brief-map li.done { color: var(--green); }
.brief-map li.done i { background: var(--green); border-color: var(--green); }

.brief-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 32px; border: 1px solid var(--line); background: rgba(5,7,11,0.5); }
.brief-facts div { padding: 12px; border-right: 1px solid var(--line); }
.brief-facts div:last-child { border: 0; }
.brief-facts small { color: var(--muted); font: 700 7px var(--font-mono); letter-spacing: 0.13em; display: block; }
.brief-facts b { margin-top: 5px; font-size: 11px; color: #FFF; display: block; }

#workflow-form { padding: 40px; min-height: 740px; }
.form-header { margin-bottom: 34px; }
.progress-copy { display: flex; align-items: baseline; gap: 14px; }
.progress-copy span { color: var(--cyan); font: 700 11px var(--font-mono); letter-spacing: 0.13em; }
.progress-copy b { font-size: 14px; color: #FFF; }
.progress-track { height: 3px; margin-top: 12px; background: rgba(255,255,255,0.08); }
.progress-track i { display: block; height: 100%; width: 14.28%; background: linear-gradient(90deg, var(--cyan), var(--green)); box-shadow: 0 0 12px var(--cyan); transition: width 0.3s ease; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin: 0 0 8px; color: #FFF; font-size: clamp(26px, 2.8vw, 42px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 800; }
.step-help { margin: 0 0 28px; color: var(--muted); font-size: 14px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fields label, .full-field { display: block; color: var(--text); font-size: 12px; font-weight: 700; }

/* Custom High-Density Glass Inputs & Selects */
input, select, textarea {
  display: block; width: 100%; margin-top: 8px; padding: 13px 15px;
  border: 1px solid var(--panel-border); border-radius: 8px; outline: 0;
  color: #FFF; background: var(--ink-surface); transition: all 0.2s;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2300F0FF%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  padding-right: 38px;
}
option { background: #080E1A; color: #FFF; }
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18), inset 0 1px 3px rgba(0,0,0,0.5); }

.pain-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.pain-option {
  position: relative; min-height: 72px; padding: 14px 14px 14px 44px;
  border: 1px solid var(--panel-border); border-radius: 8px; background: var(--ink-surface);
  color: var(--muted); text-align: left; cursor: pointer; transition: all 0.2s;
}
.pain-option i { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; border: 1px solid var(--muted); transform: rotate(45deg); }
.pain-option b { display: block; font-size: 13px; color: #FFF; }
.pain-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.pain-option.active { border-color: var(--cyan); background: rgba(0, 240, 255, 0.14); color: #FFF; box-shadow: var(--shadow-glow-cyan); }
.pain-option.active i { border-color: var(--cyan); background: var(--cyan); }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; }
.notice { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--amber); background: rgba(255, 159, 67, 0.1); color: #FFEAA7; border-radius: 4px; }
.notice.error { border-color: var(--red); background: rgba(239, 68, 68, 0.1); color: #FCA5A5; }

/* -------------------------------------------------------------------------- */
/* LIVE TERMINAL LOG TICKER & INSPECTOR DRAWER                                */
/* -------------------------------------------------------------------------- */
.terminal-ticker {
  background: #04060A; border-top: 1px solid var(--line); padding: 8px 20px;
  font: 700 10px var(--font-mono); color: var(--green); display: flex; justify-content: space-between; align-items: center;
}
.ticker-stream { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 80%; }

.json-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 440px; background: var(--ink-surface);
  border-left: 1px solid var(--panel-border-bright); box-shadow: -20px 0 60px rgba(0,0,0,0.9);
  padding: 24px; z-index: 200; overflow-y: auto; font-family: var(--font-mono); font-size: 12px;
}
.json-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.json-drawer pre { color: var(--cyan); white-space: pre-wrap; word-break: break-all; }

/* -------------------------------------------------------------------------- */
/* FOOTER                                                                    */
/* -------------------------------------------------------------------------- */
.site-footer {
  padding: 64px clamp(28px, 6vw, 112px) 30px;
  background: #02050a;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.1);
}
.site-footer-grid {
  max-width: 1280px; margin: 0 auto 48px; display: grid;
  grid-template-columns: 2fr repeat(3, 1fr); gap: clamp(32px, 5vw, 72px);
}
.site-footer-brand img { display: block; width: 170px; height: auto; margin-bottom: 24px; opacity: .82; }
.site-footer-brand .site-footer-tagline { max-width: 440px; margin: 0 0 10px; color: #e2e8f0; font-weight: 600; font-size: 14px; line-height: 1.4; }
.site-footer-brand .site-footer-desc { max-width: 440px; margin: 0; color: #94a3b8; font-size: 13px; line-height: 1.6; }
.site-footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.site-footer-column h2 { margin: 0 0 7px; color: #fff; font: 700 13px/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; }
.site-footer-column a { color: #94a3b8; text-decoration: none; font-size: 14px; transition: color .18s ease; }
.site-footer-column a:hover, .site-footer-column a:focus-visible { color: var(--cyan); outline: 0; }
.site-footer-meta {
  max-width: 1280px; margin: 0 auto; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-footer-meta p { margin: 0; color: #64748b; font: 400 11px/1.5 var(--font-mono); }
.site-footer-status { display: flex; align-items: center; gap: 9px; color: #64748b; font: 400 11px/1.5 var(--font-mono); }
.site-footer-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(0,255,157,.65); }

/* -------------------------------------------------------------------------- */
/* SCROLL-TRIGGERED ENTRANCE ANIMATIONS                                       */
/* -------------------------------------------------------------------------- */

/* Base: invisible until scroll triggers .in-view */
.scroll-fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-fade-up.in-view { opacity: 1; transform: translateY(0); }

/* Staggered items (list items, facts, etc.) */
.scroll-stagger-item {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
  transition-delay: calc(var(--item-i, 0) * 0.1s);
}
.scroll-stagger-item.in-view { opacity: 1; transform: translateY(0); }

/* Transformation: state panels slide from sides */
.state-panel.scroll-fade-up { transform: translateX(-40px); }
.state-panel.after.scroll-fade-up { transform: translateX(40px); }
.state-panel.scroll-fade-up.in-view,
.state-panel.after.scroll-fade-up.in-view { transform: translateX(0); }

/* Transformation: engine diamond entrance */
.transformation-engine.scroll-fade-up { opacity: 0; transform: scale(0.7) rotate(45deg); transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s; }
.transformation-engine.scroll-fade-up.in-view { opacity: 1; transform: scale(1) rotate(0deg); }

/* Transformation: list item dots light up on entrance */
.state-panel li.scroll-stagger-item::before { opacity: 0; transition: opacity 0.3s ease-out; transition-delay: calc(var(--item-i, 0) * 0.12s + 0.3s); }
.state-panel li.scroll-stagger-item.in-view::before { opacity: 1; }

/* Workflow check: check-shell entrance */
.check-shell.scroll-fade-up { transform: translateY(40px) scale(0.98); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.check-shell.scroll-fade-up.in-view { transform: translateY(0) scale(1); }

/* Section headings: stagger children */
.section-heading.scroll-fade-up { transition-delay: 0s; }
.section-heading h2.scroll-fade-up { transition-delay: 0.1s; }
.section-heading > p.scroll-fade-up { transition-delay: 0.2s; }
.kicker.scroll-fade-up { transition-delay: 0s; }

/* Outcome console entrance */
.outcome-console.scroll-fade-up { transform: translateY(30px) scale(0.99); transition: opacity 0.6s ease-out 0.15s, transform 0.6s ease-out 0.15s; }
.outcome-console.scroll-fade-up.in-view { transform: translateY(0) scale(1); }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-fade-up, .scroll-stagger-item { opacity: 1; transform: none; transition: none; }
}

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes route { to { stroke-dashoffset: -14; } }
@keyframes pulse { 0%,100% { opacity:.55; transform:scale(.88) } 50% { opacity:1; transform:scale(1.15) } }
@keyframes pulseHighlight { 0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.8); } 50% { box-shadow: 0 0 40px 10px rgba(0, 240, 255, 0.5); } 100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); } }

@media (max-width: 1600px) {
  .hero h1 { font-size: clamp(44px, 4.5vw, 72px); }
  .hero { padding: 56px clamp(24px, 4vw, 72px) 64px; gap: clamp(24px, 3vw, 50px); }
  .hero-copy { max-width: 600px; }
  .section-heading h2 { font-size: clamp(34px, 3.5vw, 56px); }
  .outcome-detail h3 { font-size: clamp(26px, 2.4vw, 40px); }
  .outcome-section, .transformation-section, .workflow-check { padding: 72px clamp(24px, 5vw, 90px); }
  .orchestration { width: min(100%, 720px); }
}
@media (max-width: 1440px) {
  .hero { grid-template-columns: minmax(360px, .82fr) minmax(500px, 1.18fr); padding: 48px clamp(20px, 3.5vw, 56px) 56px; }
  .hero h1 { font-size: clamp(40px, 4vw, 60px); margin: 18px 0 22px; }
  .hero-lead { font-size: clamp(14px, 1.1vw, 17px); }
  .hero-copy { max-width: 520px; }
  .section-heading h2 { font-size: clamp(30px, 3vw, 48px); margin: 12px 0 14px; }
  .section-heading > p:last-child { font-size: 16px; }
  .outcome-section, .transformation-section, .workflow-check { padding: 60px clamp(20px, 4vw, 72px); }
  .section-heading { margin-bottom: 32px; }
  .outcome-console { grid-template-columns: 300px minmax(0, 1fr); min-height: 500px; }
  .outcome-detail { padding: clamp(28px, 3vw, 48px); }
  .outcome-detail h3 { font-size: clamp(24px, 2.2vw, 36px); }
  .outcome-tab { padding: 14px 14px 14px 42px; }
  .outcome-tab b { font-size: 13px; }
  .outcome-tab span { left: 12px; top: 14px; font-size: 10px; }
  .sector-chip { padding: 8px 14px; font-size: 10px; }
  .pipeline-step { min-height: 140px; padding: 12px; }
  .orchestration { width: min(100%, 640px); }
  .check-shell { grid-template-columns: minmax(320px, .72fr) minmax(500px, 1.28fr); }
  .brief-console { padding: 32px; }
  .brief-console h2 { font-size: clamp(28px, 2.5vw, 40px); }
  #workflow-form { padding: 32px; min-height: 640px; }
  .transformation-grid { gap: 16px; }
  .transformation-engine div { width: 90px; height: 90px; }
  .transformation-engine span { font-size: 15px; }
}
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .check-shell { grid-template-columns: 1fr; }
  .brief-console { border-right: 0; border-bottom: 1px solid var(--line); }
  #workflow-form { min-height: auto; }
}
@media (max-width: 1050px) {
  .site-header-inner { min-height: 96px; padding: 12px 16px; grid-template-columns: 1fr auto; gap: 16px; }
  .primary-nav { display: none; }
  .header-actions .lang-dropdown-wrapper, .header-actions .header-cta { display: none; }
  .header-actions { gap: 0; }
  .brand { width: 175px; }
  .brand img { height: 56px; }
  .mobile-menu-toggle {
    width: 42px; height: 42px; display: grid; place-content: center; gap: 5px; padding: 0;
    border: 1px solid var(--panel-border); border-radius: 8px; background: var(--ink-surface); cursor: pointer;
  }
  .mobile-menu-toggle span { display: block; width: 19px; height: 2px; background: #fff; transition: transform .18s ease, opacity .18s ease; }
  .mobile-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav {
    width: 100%; padding: 16px 24px 22px; border-top: 1px solid var(--line);
    flex-direction: column; gap: 4px;
  }
  .mobile-nav:not([hidden]) { display: flex; }
  .mobile-nav a { padding: 11px 8px; color: #cbd5e1; text-decoration: none; font-size: 17px; font-weight: 650; }
  .mobile-nav a.active { color: var(--cyan); }
  .mobile-nav .mobile-nav-cta { margin-top: 8px; border: 1px solid var(--cyan); border-radius: 8px; color: #fff; text-align: center; background: rgba(0,240,255,.1); }
  .hero, .outcome-section, .transformation-section, .workflow-check { padding-left: 20px; padding-right: 20px; }
  .orchestration { width: 100%; min-width: 0; }
  .command-panel-scroll {
    width: calc(100% + 40px);
    max-width: none;
    margin-inline: -20px;
    padding: 0 20px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 20px;
    scrollbar-color: var(--cyan) rgba(15, 34, 48, .82);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .command-panel-scroll::-webkit-scrollbar { height: 7px; }
  .command-panel-scroll::-webkit-scrollbar-track { background: rgba(15, 34, 48, .82); border-radius: 999px; }
  .command-panel-scroll::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 999px; }
  .command-panel-scroll > .outcome-console {
    width: 980px;
    min-width: 980px;
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .command-panel-scroll > .transformation-grid {
    width: 920px;
    min-width: 920px;
    grid-template-columns: 1fr 180px 1fr;
    gap: 20px;
  }
  .command-panel-scroll > .check-shell {
    width: 1100px;
    min-width: 1100px;
    grid-template-columns: minmax(360px, .72fr) minmax(620px, 1.28fr);
  }
  .command-panel-scroll > .check-shell .brief-console { border-right: 1px solid var(--line); border-bottom: 0; }
  .command-panel-scroll > .check-shell #workflow-form { min-height: 720px; }
  .terminal-ticker { gap: 12px; }
  .ticker-stream { max-width: 55%; }
  .json-drawer { width: min(100%, 440px); }
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-brand { grid-column: 1 / -1; }
  .site-footer-meta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .site-footer { padding-inline: 24px; }
  .site-footer-grid { grid-template-columns: 1fr; }
  .site-footer-brand { grid-column: auto; }
  .hero { min-height: auto; padding-top: 38px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(39px, 13vw, 56px); }
}

.honeypot {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea,
[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(255, 76, 96, .2), 0 0 22px rgba(255, 76, 96, .16);
}

.field-invalid { color: #ff8795; }
