/* ==========================================================
   VectorVu: dark, colorful, readable
   ========================================================== */
:root {
  --bg: #060a14;
  --bg-2: #0a1020;
  --surface: #0e1628;
  --surface-2: #131d33;
  --surface-3: #1a2642;
  --border: rgba(148, 178, 255, 0.12);
  --border-strong: rgba(148, 178, 255, 0.22);
  --text: #eaf0fc;
  --muted: #9eabc6;
  --faint: #6b7896;

  --blue: #1a9bfd;
  --blue-deep: #0a6ff0;
  --cyan: #2fcff7;
  --violet: #8b7bff;
  --teal: #2dd4bf;
  --green: #34d399;
  --amber: #f5a524;
  --pink: #ff5c9a;
  --red: #ff5d6c;

  --grad-brand: linear-gradient(120deg, #0a6ff0 0%, #1a9bfd 45%, #2fcff7 100%);
  --grad-rainbow: linear-gradient(90deg, #1a9bfd, #8b7bff, #ff5c9a, #f5a524, #2dd4bf);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --nav-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* color helpers */
.c-blue { color: var(--blue); } .c-cyan { color: var(--cyan); } .c-violet { color: var(--violet); }
.c-teal { color: var(--teal); } .c-amber { color: var(--amber); } .c-pink { color: var(--pink); }

/* page backdrop: soft colored glows + faint grid */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(26, 155, 253, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(139, 123, 255, 0.16), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(45, 212, 191, 0.10), transparent 60%),
    var(--bg);
}
.bg-glow::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 178, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 178, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-text--warm { background-image: linear-gradient(110deg, #f5a524, #ff5c9a); }
.grad-text--cool { background-image: linear-gradient(110deg, #8b7bff, #2fcff7); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 18px;
}

/* ---------- buttons, pills, dots ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 10px 30px -10px rgba(26, 155, 253, .7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(47, 207, 247, .8); }
.btn--ghost { border-color: var(--border-strong); background: rgba(255, 255, 255, .03); }
.btn--ghost:hover { border-color: var(--cyan); background: rgba(47, 207, 247, .08); }
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(10, 16, 32, .75); border: 1px solid var(--border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pill--ok { color: var(--green); border-color: rgba(52, 211, 153, .35); }
.pill--alarm { color: var(--red); border-color: rgba(255, 93, 108, .4); background: rgba(255, 93, 108, .1); }
.pill--muted { color: var(--muted); }
.pill--xs { padding: 3px 10px; font-size: 12px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot--live { background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: ping 2s infinite; }
.dot--alarm { background: var(--red); animation: blink 1s steps(2, start) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
@keyframes blink { to { visibility: hidden; } }

.ticks { display: grid; gap: 10px; margin-top: 20px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(45, 212, 191, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232dd4bf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}
.ticks--lg li { color: var(--text); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(6, 10, 20, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--border); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand img { height: 24px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + 56px) 0 40px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.6vw, 72px); font-weight: 700; letter-spacing: -0.035em; }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); margin-top: 22px; max-width: 34em; }
.hero__tagline { margin-top: 18px; font: 600 19px var(--font-head); color: var(--amber); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 30px; font-size: 14px; color: var(--faint); }
.hero__chips li { display: flex; align-items: center; gap: 8px; }
.hero__chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad-brand); }

/* 3D twin */
.twin {
  position: relative; aspect-ratio: 1.12 / 1; border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(26, 155, 253, .18), transparent 60%),
    linear-gradient(180deg, #0c1428, #070c19);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(47, 207, 247, .05) inset, 0 0 80px -30px rgba(26, 155, 253, .5);
}
.twin::before { /* gradient frame */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: linear-gradient(140deg, rgba(47, 207, 247, .6), transparent 35%, transparent 65%, rgba(139, 123, 255, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.twin__canvas { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; }
.twin__canvas:active { cursor: grabbing; }
.twin__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.twin__fallback { position: absolute; inset: 15% 18%; width: 64%; object-fit: contain; opacity: .9; }
.twin.has-3d .twin__fallback { display: none; }
.twin__hud { position: absolute; top: 16px; display: flex; gap: 8px; z-index: 2; pointer-events: none; }
.twin__hud--tl { left: 16px; }
.twin__hud--tr { right: 16px; }
.twin__readout {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; pointer-events: none;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  background: var(--border);
}
.axis { background: rgba(8, 13, 27, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.axis__label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.axis .mono { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.axis small { font-size: 11px; color: var(--faint); }
.axis--state .mono { color: var(--teal); }
.twin.is-alarm #hudState { color: var(--red); }

.twin__alarm {
  position: absolute; z-index: 2; right: 16px; top: 60px; max-width: 290px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(40, 10, 20, .82); border: 1px solid rgba(255, 93, 108, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px -10px rgba(255, 93, 108, .5);
  font-size: 14px; opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.twin.is-alarm .twin__alarm { opacity: 1; transform: none; }
.twin__alarm-head { display: flex; align-items: center; gap: 8px; }
.twin__alarm-head strong { color: #ffb3bb; font-family: var(--font-mono); white-space: nowrap; }
.twin__alarm-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.twin__alarm-links span { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--text); }
.twin__hint { position: absolute; right: 18px; bottom: 104px; z-index: 2; font-size: 12px; color: var(--faint); pointer-events: none; }

.twin__alarm-fix { display: none; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--green); }
.twin.is-fixed .twin__alarm { background: rgba(8, 40, 28, .85); border-color: rgba(52, 211, 153, .55); box-shadow: 0 10px 40px -10px rgba(52, 211, 153, .45); }
.twin.is-fixed .twin__alarm-fix { display: block; }
.twin.is-fixed .dot--alarm { background: var(--green); animation: none; }
.twin__tag {
  position: absolute; left: 0; top: 0; z-index: 1; transform: translate(-50%, -150%); pointer-events: none;
  padding: 2px 8px; border-radius: 5px; background: #ffb020; color: #1a1205; font: 700 12px var(--font-mono); white-space: nowrap;
  opacity: 0; transition: opacity .3s;
}
.twin__tag.on { opacity: 1; }
.twin__tag.ok { background: var(--green); }

/* stats strip */
.stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(19, 29, 51, .7), rgba(14, 22, 40, .7));
  position: relative;
}
.stats::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad-rainbow); }
.stats li { padding: 26px 24px; border-left: 1px solid var(--border); }
.stats li:first-child { border-left: 0; }
.stats strong { display: block; font: 700 30px/1.1 var(--font-head); letter-spacing: -0.02em; }
.stats span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* supported PLC platforms */
.plcs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; margin-top: 28px; }
.plcs__label { font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.plcs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.plcs__list li {
  padding: 8px 18px; border-radius: 999px; font: 600 16px var(--font-head);
  color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 24px -10px var(--accent);
}

/* ---------- sections ---------- */
.demo { padding-bottom: 72px; }
.demo .section__head { margin-bottom: 32px; }
.demo__wrap { width: min(1440px, 100% - 32px); margin-inline: auto; }
.demo__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.demo__tip { font-size: 14px; color: var(--faint); margin-left: 6px; }
.demo__tip b { color: var(--muted); font-weight: 600; }
.demo__frame { position: relative; min-height: 200px; }
.demo__frame:fullscreen { background: #0f131a; }
.demo__frame:fullscreen .vvapp { height: 100vh; border-radius: 0; border: 0; }
.demo__note { margin-top: 14px; font-size: 13.5px; color: var(--faint); max-width: 60em; }
.console__try { margin-top: 14px; }

.section { padding: 112px 0; position: relative; }
.section--tint { background: linear-gradient(180deg, transparent, rgba(14, 22, 40, .55) 15%, rgba(14, 22, 40, .55) 85%, transparent); }
.section__head { max-width: 760px; margin-bottom: 56px; }
.section h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; }
.section__sub { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 40em; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; counter-reset: s; }
.steps::before {
  content: ""; position: absolute; top: 44px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--amber), var(--violet), var(--teal)); opacity: .45;
}
.step {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease;
}
.step:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.step__num { position: absolute; top: 18px; right: 20px; font: 700 14px var(--font-mono); color: var(--faint); }
.step__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent);
  box-shadow: 0 0 0 6px var(--bg), 0 0 30px -6px var(--accent); position: relative;
}
.step__icon svg, .card__icon svg, .persona__ico svg, .ref__ico svg, .grow__ico svg, .custom__ico svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.step h3 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 16px; }

/* platform cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 30px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.card::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--accent) 60%, transparent); }
.card__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card__kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card h3 { font-size: 22px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.card--feature { grid-row: span 2; display: flex; flex-direction: column; }
.card--feature h3 { font-size: 28px; }
.card--feature .ticks { margin-top: auto; padding-top: 24px; }

/* ---------- spotlight / console ---------- */
.spotlight { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.spotlight--flip { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.spotlight__note { margin-top: 26px; font-size: 14px; color: var(--faint); }
.spotlight__note::before { content: "\2192  "; color: var(--amber); }

.console {
  border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 80px -40px rgba(245, 165, 36, .5);
}
.console__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.console__dots { display: flex; gap: 6px; }
.console__dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.console__dots i:nth-child(1) { background: #ff5d6c; } .console__dots i:nth-child(2) { background: #f5a524; } .console__dots i:nth-child(3) { background: #34d399; }
.console__title { flex: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__body { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.console__alarms { padding: 12px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--border); background: rgba(6, 10, 20, .35); }
.alarm {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; text-align: left;
  padding: 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.alarm:hover { background: rgba(255, 255, 255, .04); }
.alarm.is-active { background: var(--surface-3); border-color: var(--border-strong); }
.alarm__sev { width: 4px; height: 100%; min-height: 34px; border-radius: 4px; grid-row: span 2; }
.sev--high { background: var(--red); box-shadow: 0 0 12px var(--red); }
.sev--med { background: var(--amber); }
.sev--low { background: var(--violet); }
.alarm__text { font-size: 14px; line-height: 1.35; color: var(--muted); }
.alarm__text strong { display: block; color: var(--text); font-family: var(--font-mono); font-size: 13px; }
.alarm__time { font-size: 11px; color: var(--faint); }

.console__detail { padding: 20px; min-width: 0; }
.console__detail.is-swapping > * { animation: swapIn .45s ease both; }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.detail__dev { font-size: 12px; color: var(--amber); margin-bottom: 6px; }
.detail__head h4 { font-size: 19px; line-height: 1.3; }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
.detail__grid .sheet { order: -1; }
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ref {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.ref:hover { border-color: var(--border-strong); transform: translateX(3px); }
.ref__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); flex: none; }
.ref__ico svg { width: 18px; height: 18px; }
.ref small { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.ref strong { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ref strong.mono { font-size: 12px; overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref > span:last-child { min-width: 0; }

.sheet { margin: 0; border-radius: 12px; overflow: hidden; background: #fbfbf6; border: 1px solid var(--border); color: #9fb4dc; }
.sheet__focus { fill: rgba(245, 165, 36, .16); stroke: #f5a524; stroke-width: 4; animation: sheetPulse 1.4s ease-in-out infinite; }
@keyframes sheetPulse { 50% { stroke-width: 9; fill: rgba(245, 165, 36, .28); } }
.sheet__cap { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 11px; color: var(--faint); border-bottom: 1px solid var(--border); background: #0b1222; }
.sheet__cap span:first-child { color: var(--amber); font-weight: 600; }
.sheet__svg { width: 100%; height: auto; }
.wire { stroke: #4a6496; stroke-width: 1.5; }
.dev { fill: #121c33; stroke: #4a6496; stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.sheet__txt { font: 600 9px var(--font-mono); fill: #8aa0c8; }
.rung { transition: opacity .3s; opacity: .55; }
.rung.is-hot { opacity: 1; }
.rung.is-hot .dev { fill: rgba(245, 165, 36, .18); stroke: var(--amber); animation: devPulse 1.4s ease-in-out infinite; }
.rung.is-hot .wire { stroke: var(--amber); }
.rung.is-hot .sheet__txt { fill: #ffd28a; }
@keyframes devPulse { 50% { fill: rgba(245, 165, 36, .38); } }

.detail__causes { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: rgba(45, 212, 191, .06); border: 1px solid rgba(45, 212, 191, .2); }
.detail__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.detail__causes ol { list-style: decimal; padding-left: 20px; display: grid; gap: 4px; font-size: 14.5px; color: var(--text); }
.detail__causes li::marker { color: var(--teal); font-weight: 700; }

/* ---------- HMI mock ---------- */
.hmi {
  border-radius: 22px; padding: 22px; background: linear-gradient(180deg, #111a30, #0b1224);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow), 0 0 90px -40px rgba(139, 123, 255, .7);
}
.hmi__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hmi__name { font: 600 18px var(--font-head); }
.hmi__sub { font-size: 13px; color: var(--faint); }
.hmi__gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.gauge { position: relative; padding: 14px 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); text-align: center; }
.gauge svg { width: 100%; max-width: 120px; margin: 0 auto; transform: rotate(135deg); }
.gauge circle { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 226 302; }
.gauge__track { stroke: rgba(255, 255, 255, .07); }
.gauge__val { stroke: var(--c); stroke-dashoffset: 226; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 6px var(--c)); }
.gauge__read { position: absolute; left: 0; right: 0; top: 38%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; }
.gauge__read strong { font-size: 24px; line-height: 1; }
.gauge__read small { font-size: 11px; color: var(--faint); margin-top: 4px; }
.gauge p { font-size: 13px; color: var(--muted); margin-top: -6px; }
.hmi__trend { margin-top: 14px; padding: 14px 16px 10px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); }
.hmi__trend-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.hmi__trend-head .mono { font-weight: 600; }
.trend { width: 100%; height: 70px; }
.trend path { transition: d .8s ease; }
.hmi__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.hmi__btn {
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04);
  font-weight: 600; font-size: 14px; cursor: pointer; transition: all .25s ease;
}
.hmi__btn.is-on { background: linear-gradient(120deg, #2dd4bf, #1a9bfd); border-color: transparent; color: #04121f; box-shadow: 0 6px 20px -6px rgba(45, 212, 191, .7); }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; margin-left: 6px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 42px; height: 24px; border-radius: 999px; background: #26324d; position: relative; transition: background-color .3s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- network map ---------- */
.netmap { border-radius: 24px; padding: 24px; background: rgba(10, 16, 32, .6); border: 1px solid var(--border); }
.netmap__svg { width: 100%; height: auto; }
.node rect { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.2; }
.node__t { font: 600 16px var(--font-head); fill: var(--text); text-anchor: middle; }
.node__s { font: 500 12px var(--font-body); fill: var(--faint); text-anchor: middle; }
.hub { filter: drop-shadow(0 0 24px rgba(26, 155, 253, .55)); }
.hub__t { font: 700 18px var(--font-head); fill: #fff; text-anchor: middle; }
.hub__s { font: 500 13px var(--font-body); fill: rgba(255, 255, 255, .8); text-anchor: middle; }
.flow { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 12; animation: flow 1.2s linear infinite; }
.flow--blue { stroke: var(--blue); } .flow--pink { stroke: var(--pink); } .flow--amber { stroke: var(--amber); }
.flow--cyan { stroke: var(--cyan); } .flow--violet { stroke: var(--violet); } .flow--teal { stroke: var(--teal); } .flow--green { stroke: var(--green); }
@keyframes flow { to { stroke-dashoffset: -28; } }

.access-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.access-points h4 { font-size: 19px; margin-bottom: 8px; }
.access-points p { color: var(--muted); font-size: 16px; }

/* ---------- personas ---------- */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.persona {
  padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--accent); transition: transform .3s ease, box-shadow .3s ease;
}
.persona:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px var(--accent); }
.persona h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin-bottom: 16px; }
.persona__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); flex: none; }
.persona__ico svg { width: 20px; height: 20px; }
.persona ul { display: grid; gap: 10px; }
.persona li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.persona li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* ---------- grow / process / custom ---------- */
.grow {
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
  padding: 26px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
}
.grow__title { display: flex; align-items: center; gap: 14px; }
.grow__title h3 { font-size: 22px; white-space: nowrap; }
.grow__ico, .custom__ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--amber); background: rgba(245, 165, 36, .14); flex: none; }
.grow__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grow__list li { font-size: 15px; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--border-strong); line-height: 1.5; }

.process { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; margin-top: 96px; align-items: start; }
.docs { margin-top: 30px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.docs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.docs__note { margin-top: 14px; font-size: 14px; color: var(--faint); }
.tag { display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid; }
.tag--blue { color: var(--blue); border-color: rgba(26, 155, 253, .4); background: rgba(26, 155, 253, .1); }
.tag--amber { color: var(--amber); border-color: rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .1); }
.tag--teal { color: var(--teal); border-color: rgba(45, 212, 191, .4); background: rgba(45, 212, 191, .1); }
.tag--violet { color: var(--violet); border-color: rgba(139, 123, 255, .4); background: rgba(139, 123, 255, .1); }
.tag--pink { color: var(--pink); border-color: rgba(255, 92, 154, .4); background: rgba(255, 92, 154, .1); }

.timeline { position: relative; display: grid; gap: 14px; counter-reset: t; }
.timeline li {
  position: relative; counter-increment: t; padding: 22px 22px 22px 76px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.timeline li::before {
  content: counter(t, decimal-leading-zero); position: absolute; left: 20px; top: 22px;
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font: 700 14px var(--font-mono); color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.timeline h4 { font-size: 19px; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 15.5px; }

.custom {
  display: flex; align-items: center; gap: 20px; margin-top: 64px; padding: 28px 32px; border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(10, 111, 240, .25), rgba(139, 123, 255, .18) 50%, rgba(245, 165, 36, .14));
  border: 1px solid var(--border-strong);
}
.custom h3 { font-size: 22px; color: var(--amber); }
.custom p { color: var(--text); opacity: .85; margin-top: 4px; }

/* ---------- contact ---------- */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 56px; border-radius: 28px;
  background:
    radial-gradient(600px 400px at 0% 0%, rgba(26, 155, 253, .2), transparent 60%),
    radial-gradient(500px 400px at 100% 100%, rgba(255, 92, 154, .14), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
}
.contact { display: grid; gap: 12px; margin-top: 28px; }
.contact li { display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.45; }
.contact__ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.contact__ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.contact a { color: var(--text); border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; overflow-wrap: anywhere; }
.contact a:hover { color: var(--cyan); border-color: currentColor; }
.form { display: grid; gap: 16px; align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(6, 10, 20, .6); color: var(--text); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(47, 207, 247, .15); }
.form input.is-invalid { border-color: var(--red); }
.form__status { font-size: 14px; color: var(--teal); min-height: 1.4em; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn:disabled { opacity: .7; cursor: wait; transform: none; }
.form__status.is-error { color: var(--red); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 40px; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 32px; align-items: center; }
.footer__brand img { height: 22px; width: auto; }
.footer__brand p { margin-top: 10px; font-size: 14px; color: var(--faint); max-width: 28em; }
.footer__contact { margin-top: 6px !important; }
.footer__contact a { color: var(--muted); }
.footer__contact a:hover { color: var(--text); }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__copy { font-size: 14px; color: var(--faint); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__copy { max-width: 680px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats li:nth-child(4) { border-left: 0; }
  .stats li:nth-child(n+4) { border-top: 1px solid var(--border); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card--feature { grid-row: auto; grid-column: span 2; }
  .spotlight, .spotlight--flip { grid-template-columns: 1fr; gap: 40px; }
  .spotlight--flip .hmi { order: 2; }
  .personas { grid-template-columns: repeat(2, 1fr); }
  .grow { grid-template-columns: 1fr; gap: 20px; }
  .grow__list { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: 1fr; gap: 40px; }
  .cta { grid-template-columns: 1fr; padding: 40px; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; position: relative; z-index: 2; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px; background: rgba(6, 10, 20, .97); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s ease;
  }
  .nav__links a:not(.btn) { padding: 12px 8px; font-size: 17px; }
  .nav__cta { margin-top: 8px; }
  .nav.is-open { background: rgba(6, 10, 20, .97); }
  .nav.is-open .nav__links { transform: none; opacity: 1; visibility: visible; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .console__body { grid-template-columns: 1fr; }
  .console__alarms { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .alarm { min-width: 200px; }
  .access-points { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .twin { aspect-ratio: 0.88 / 1; border-radius: 18px; }
  .twin__readout { grid-template-columns: repeat(3, 1fr); left: 10px; right: 10px; bottom: 10px; }
  .twin__readout .axis--state { display: none; }
  .twin__hud--tl { left: 10px; top: 10px; } .twin__hud--tr { display: none; }
  .twin__alarm { left: 10px; right: 10px; top: 52px; max-width: none; }
  .twin__hint { bottom: 80px; right: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .stats li { padding: 20px 18px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stats li:nth-child(odd) { border-left: 0; }
  .stats li:nth-child(-n+2) { border-top: 0; }
  .stats li:last-child { grid-column: span 2; }
  .stats strong { font-size: 26px; }
  .steps, .cards, .personas, .grow__list { grid-template-columns: 1fr; }
  .card--feature { grid-column: auto; }
  .refs { grid-template-columns: minmax(0, 1fr); }
  .hmi { padding: 16px; }
  .hmi__gauges { gap: 8px; }
  .gauge__read strong { font-size: 19px; }
  .netmap { padding: 12px; overflow-x: auto; }
  .netmap__svg { min-width: 680px; }
  .form__row { grid-template-columns: 1fr; }
  .cta { padding: 28px 20px; border-radius: 22px; }
  .custom { flex-direction: column; align-items: flex-start; padding: 24px; }
  .timeline li { padding: 20px 18px 20px 70px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
