/* ==========================================================
   Industrial Automation portfolio — site_demo
   Dark industrial theme: cyan signal + amber accent
   ========================================================== */
:root {
  --bg: #07090f;
  --bg-2: #0b0f19;
  --surface: rgba(255 255 255 / .035);
  --surface-2: rgba(255 255 255 / .06);
  --line: rgba(255 255 255 / .09);
  --line-2: rgba(255 255 255 / .16);
  --text: #e8edf5;
  --muted: #8b96a8;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --radius: 20px;
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* subtle grid */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  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% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .35;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.08; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.fine { font-size: .82rem; color: var(--muted); margin-top: 1rem; }
.grad {
  background: linear-gradient(100deg, var(--cyan), var(--sky) 40%, var(--violet) 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.ok-txt { color: var(--green) !important; fill: var(--green) !important; }
::selection { background: rgba(34 211 238 / .3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* ---------- chrome ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 100;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform-origin: 0 50%; transform: scaleX(0);
}
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; z-index: -1; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(34 211 238 / .09), transparent 65%);
  transform: translate(-50%, -50%); transition: opacity .4s; opacity: 0;
}
.demo-ribbon {
  position: fixed; bottom: 16px; left: 16px; z-index: 90;
  font: 600 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: .55rem .8rem; border-radius: 999px; color: #111;
  background: var(--amber); box-shadow: 0 6px 24px rgba(251 191 36 / .35);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80;
  width: min(var(--maxw), calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .7rem .6rem 1rem; border-radius: 16px;
  background: rgba(10 13 22 / .55); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(10 13 22 / .85); box-shadow: 0 10px 40px rgba(0 0 0 / .4); }
.brand { display: flex; align-items: center; gap: .6rem; font: 600 1.02rem var(--display); }
.brand svg { width: 30px; height: 30px; }
.brand svg rect { fill: #0e1422; stroke: var(--line-2); }
.brand svg path { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: .2rem; }
.nav-links a {
  font-size: .9rem; color: var(--muted); padding: .45rem .8rem; border-radius: 10px;
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-cta { display: flex; align-items: center; gap: .5rem; }
.burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .3s var(--ease); }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 76px 12px auto; z-index: 79; padding: .6rem; border-radius: 16px;
  background: rgba(10 13 22 / .95); border: 1px solid var(--line); backdrop-filter: blur(16px);
  display: grid; animation: drop .35s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: .85rem 1rem; border-radius: 10px; }
.mobile-menu a:hover { background: var(--surface-2); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
  font: 600 .95rem var(--font); padding: .8rem 1.25rem; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn-sm { padding: .55rem .9rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1rem; }
.btn-primary {
  color: #041016; background: linear-gradient(135deg, var(--cyan), var(--sky));
  box-shadow: 0 8px 30px -8px rgba(34 211 238 / .6), inset 0 1px 0 rgba(255 255 255 / .4);
}
.btn-primary:hover { box-shadow: 0 12px 40px -6px rgba(34 211 238 / .75), inset 0 1px 0 rgba(255 255 255 / .4); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(34 211 238 / .5); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; flex: none; }
.dot.live { box-shadow: 0 0 0 0 rgba(52 211 153 / .7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(52 211 153 / 0); } 100% { box-shadow: 0 0 0 0 rgba(52 211 153 / 0); } }

/* ---------- layout ---------- */
.section { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: clamp(80px, 12vw, 140px) 0 0; }
.section-head { max-width: 760px; margin-bottom: 3rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 1.2rem;
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 80px; overflow: hidden; }
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 200px; background: linear-gradient(transparent, var(--bg)); z-index: -1; pointer-events: none; }
.hero-grid {
  width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #b6c0d0; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-actions.center { justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 3rem 0 0; max-width: 620px; }
.stats div { border-left: 1px solid var(--line-2); padding-left: 1rem; }
.stats dt { font: 600 2rem/1 var(--display); }
.stats dd { margin: .4rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.35; }

/* split word reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split .w > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 55ms + .1s); }
@keyframes rise { to { transform: none; } }
.split .grad { background: none; animation: none; color: inherit; -webkit-background-clip: border-box; background-clip: border-box; }
.split .grad .w > span {
  background: linear-gradient(100deg, var(--cyan), var(--sky) 50%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* HMI card */
.hmi, .panel, .browser {
  border-radius: var(--radius); background: linear-gradient(180deg, rgba(20 26 40 / .85), rgba(11 15 25 / .9));
  border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgba(0 0 0 / .8), 0 0 0 1px rgba(255 255 255 / .02) inset;
  backdrop-filter: blur(10px); overflow: hidden;
}
.hmi-head, .panel-head, .browser-bar {
  display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line);
  font-size: .78rem; color: var(--muted);
}
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a3242; }
.dots i:first-child { background: #f87171; } .dots i:nth-child(2) { background: #fbbf24; } .dots i:last-child { background: #34d399; }
.badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .68rem/1 var(--mono); letter-spacing: .08em; padding: .4rem .6rem; border-radius: 999px;
  background: rgba(251 191 36 / .12); color: var(--amber); border: 1px solid rgba(251 191 36 / .3);
}
.badge.ok { background: rgba(52 211 153 / .1); color: var(--green); border-color: rgba(52 211 153 / .3); }
.hmi-body { padding: 1.1rem; display: grid; gap: .55rem; }
.kv { display: flex; justify-content: space-between; align-items: baseline; padding: .55rem .7rem; border-radius: 10px; background: var(--surface); font-size: .88rem; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; transition: color .3s; }
.kv b.flash { color: var(--cyan); }
.spark { height: 70px; margin-top: .3rem; border-radius: 10px; background: var(--surface); padding: 6px; }
.spark svg { width: 100%; height: 100%; }
.spark path { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(34 211 238 / .6)); }
.log { font-size: .72rem; color: var(--muted); height: 78px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.log div { animation: logIn .4s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .t { color: #56627a; } .log .ok { color: var(--green); } .log .w { color: var(--amber); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }

.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: cue 1.8s infinite; }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 1.3rem 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 3rem; margin: 0; padding: 0 1.5rem; list-style: none; }
.marquee li { font: 500 1.1rem var(--display); color: #6b7689; white-space: nowrap; display: flex; align-items: center; gap: 3rem; transition: color .2s; }
.marquee li:hover { color: var(--text); }
.marquee li::after { content: "◆"; font-size: .5rem; color: var(--cyan); opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(240px, auto); gap: 16px; }
.card {
  --x: 50%; --y: 50%;
  position: relative; text-align: left; color: inherit; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; padding: 1.6rem; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: border-color .3s, transform .5s var(--ease);
}
.card::before { /* spotlight */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(34 211 238 / .14), transparent 45%);
}
.card::after { /* border light */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--x) var(--y), rgba(34 211 238 / .8), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::before, .card:hover::after, .card:focus-visible::before { opacity: 1; }
.card h3 { margin-top: auto; padding-top: 1.4rem; font-size: 1.3rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }
.card-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); }
.card-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.chips li { font: 500 .72rem/1 var(--mono); padding: .4rem .55rem; border-radius: 6px; background: var(--surface-2); color: #b7c1d1; border: 1px solid var(--line); }
.more { margin-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--cyan); opacity: .8; transition: transform .3s var(--ease), opacity .3s; }
.card:hover .more { transform: translateX(4px); opacity: 1; }
.s-plc { grid-column: span 2; grid-row: span 2; background: radial-gradient(120% 80% at 100% 0%, rgba(34 211 238 / .12), transparent 60%), var(--bg-2); }
.s-plc h3 { font-size: 2rem; } .s-plc p { font-size: 1.02rem; max-width: 440px; }
.bento { grid-auto-flow: dense; }
.s-hvac, .s-sql { grid-column: span 2; }
.s-demo { grid-column: 1 / -1; min-height: 260px; padding-right: 52%; }
.s-demo h3 { font-size: 1.8rem; }
.demo-thumb {
  position: absolute; right: -2%; top: 50%; width: 54%; border-radius: 14px; border: 1px solid var(--line-2); z-index: -1;
  transform: translateY(-50%) perspective(1200px) rotateY(-14deg) rotateX(4deg); transition: transform .8s var(--ease);
  box-shadow: 0 30px 70px -20px rgba(0 0 0 / .8);
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}
.s-demo:hover .demo-thumb { transform: translateY(-50%) perspective(1200px) rotateY(-6deg) rotateX(2deg) scale(1.03); }

/* ladder logic in PLC card */
.ladder { width: 100%; max-width: 520px; margin: 1.6rem 0 0; overflow: visible; }
.ladder path, .ladder circle { fill: none; stroke-width: 2; stroke-linecap: round; }
.ladder .rail { stroke: #3a4559; stroke-width: 3; }
.ladder .wire { stroke: #2a3345; }
.ladder .ct, .ladder .coil { stroke: #5b6880; }
.ladder text { font: 600 10px var(--mono); fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.ladder .pow { stroke: var(--green); stroke-dasharray: 460; stroke-dashoffset: 460; filter: drop-shadow(0 0 4px rgba(52 211 153 / .7)); animation: energize 4s var(--ease) infinite; }
.ladder .r2 .pow { animation-delay: .6s; }
.ladder .coil { animation: coilOn 4s infinite; }
.ladder .r2 .coil { animation-delay: .6s; }
@keyframes energize { 0% { stroke-dashoffset: 460; } 35%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes coilOn { 0%, 30% { stroke: #5b6880; fill: transparent; } 38%, 80% { stroke: var(--green); fill: rgba(52 211 153 / .2); } 100% { stroke: #5b6880; } }
.s-bacnet { background: radial-gradient(100% 80% at 0% 100%, rgba(167 139 250 / .14), transparent 60%), var(--bg-2); }
.s-bacnet .card-ico svg { stroke: var(--violet); }
.s-hvac .card-ico svg { stroke: var(--amber); }
.s-demo { background: linear-gradient(135deg, rgba(34 211 238 / .14), rgba(167 139 250 / .12)), var(--bg-2); border-color: rgba(34 211 238 / .3); }
.s-demo .card-ico svg { stroke: var(--green); }

/* ---------- feature (dashboard / bacnet) ---------- */
.feature-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.feature-grid.rev { grid-template-columns: 1fr 1fr; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: #c4ccd9; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: rgba(34 211 238 / .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;
}
.browser-bar .url { flex: 1; text-align: center; padding: .35rem .8rem; border-radius: 8px; background: var(--surface-2); color: #aeb8c8; font-size: .75rem; margin-right: 46px; }
.shots { position: relative; aspect-ratio: 16 / 9; background: #0a0d15; }
.shots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
.shots img.active { opacity: 1; transform: none; }
.shot-tabs { display: flex; gap: .3rem; padding: .6rem; border-top: 1px solid var(--line); overflow-x: auto; }
.shot-tabs button {
  flex: 1; font: 500 .8rem var(--font); color: var(--muted); background: transparent; border: 0; cursor: pointer;
  padding: .55rem .6rem; border-radius: 8px; position: relative; white-space: nowrap; transition: color .2s, background .2s;
}
.shot-tabs button[aria-selected="true"] { color: var(--text); background: var(--surface-2); }
.shot-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 2px; height: 2px; border-radius: 2px; background: var(--cyan); transform-origin: left; animation: tabTimer 5s linear; }
@keyframes tabTimer { from { transform: scaleX(0); } }

/* bacnet panel */
.panel-head { font-size: .8rem; }
.gauge-row { display: flex; align-items: center; gap: 1.5rem; padding: 1.3rem; border-bottom: 1px solid var(--line); }
.gauge { position: relative; width: 132px; height: 132px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.g-bg { stroke: var(--surface-2); }
.g-fg { stroke: url(#none); stroke: var(--green); stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.4s var(--ease), stroke .4s; filter: drop-shadow(0 0 6px rgba(52 211 153 / .5)); }
.g-val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.g-val b { font: 700 2rem/1 var(--display); }
.g-val small { font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: .3rem; }
.g-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .82rem; flex: 1; }
.g-legend li { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.g-legend b { margin-left: auto; color: var(--text); }
.g-legend i { width: 10px; height: 10px; border-radius: 3px; }
i.ok { background: var(--green); } i.warn { background: var(--amber); } i.bad { background: var(--red); }
.devices { list-style: none; margin: 0; padding: .8rem; display: grid; gap: .35rem; font-size: .76rem; max-height: 260px; overflow: hidden; }
.devices li { display: grid; grid-template-columns: 10px 1.2fr 1fr 44px; gap: .7rem; align-items: center; padding: .5rem .6rem; border-radius: 8px; background: var(--surface); opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s var(--ease); }
.devices li.in { opacity: 1; transform: none; }
.devices .bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.devices .bar span { display: block; height: 100%; border-radius: 3px; transition: width 1s var(--ease); }
.devices .pct { text-align: right; color: var(--muted); }

/* ---------- HVAC diagram ---------- */
.ahu { border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(80% 100% at 50% 0%, rgba(56 189 248 / .07), transparent), var(--bg-2); padding: clamp(12px, 3vw, 32px); overflow-x: auto; }
.ahu svg { width: 100%; min-width: 720px; height: auto; display: block; }
.ahu .casing { fill: rgba(255 255 255 / .02); stroke: var(--line-2); stroke-width: 1.5; }
.ahu .flow { fill: none; stroke: url(#duct); stroke-width: 3; stroke-dasharray: 10 14; animation: flow 1.2s linear infinite; opacity: .8; }
.ahu .flow.ret { stroke: var(--amber); animation-direction: normal; }
.ahu .duct-line { stroke: var(--line-2); stroke-width: 1.5; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.ahu .comp rect, .ahu .comp circle { fill: #0f1524; stroke: var(--line-2); stroke-width: 1.5; }
.ahu .comp path { fill: none; stroke: #5b6880; stroke-width: 1.6; }
.ahu .comp.cool path { stroke: var(--sky); } .ahu .comp.heat path { stroke: var(--amber); }
.ahu .comp text, .ahu .lbl { font: 600 11px var(--mono); fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.ahu .lbl { text-anchor: start; fill: var(--cyan); font-size: 13px; }
.ahu .blades { transform-origin: 50px 45px; animation: spin 1.1s linear infinite; }
.ahu .blades path { stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; }
@keyframes spin { to { transform: rotate(360deg); } }
.ahu .tags rect { fill: rgba(255 255 255 / .03); stroke: var(--line); }
.ahu .tags text { font: 500 10px var(--mono); fill: var(--muted); letter-spacing: .06em; }
.ahu .tags text.v { font-size: 15px; font-weight: 600; fill: var(--text); }
.hvac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.mini { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .3s, transform .4s var(--ease); }
.mini:hover { border-color: rgba(251 191 36 / .4); transform: translateY(-4px); }
.mini h3 { font-size: 1.05rem; } .mini p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet)); transform-origin: left; transform: scaleX(var(--tl, 0)); transition: transform .2s linear; }
.timeline li { position: relative; padding-top: 3.6rem; }
.timeline .step { position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line-2); font-size: .85rem; z-index: 1; transition: border-color .4s, box-shadow .4s, color .4s; }
.timeline li.lit .step { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 24px rgba(34 211 238 / .4); }
.timeline p { color: var(--muted); font-size: .92rem; }

/* ---------- CTA ---------- */
.cta { padding-bottom: 120px; }
.cta-card {
  text-align: center; padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 80px); border-radius: 28px; position: relative; overflow: hidden;
  border: 1px solid var(--line-2); background: radial-gradient(70% 120% at 50% 0%, rgba(34 211 238 / .16), transparent 60%), var(--bg-2);
}
.cta-card::before { content: ""; position: absolute; inset: -50%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(34 211 238 / .15), transparent 30%); animation: spin 12s linear infinite; }
.cta-card h2 { max-width: 820px; margin-inline: auto; }
.contact-form { max-width: 640px; margin: 2rem auto 0; text-align: left; display: grid; gap: 1rem; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .88rem; color: #b6c0d0; }
.contact-form small { color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%; font: 400 1rem var(--font); color: var(--text); padding: .8rem .95rem; border-radius: 12px;
  background: rgba(5 8 14 / .7); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form :is(input, textarea):focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34 211 238 / .18); }
.contact-form [aria-invalid="true"] { border-color: var(--red); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-foot .btn[disabled] { opacity: .65; cursor: progress; }
.form-status { margin: 0; font-size: .92rem; flex: 1; min-width: 200px; }
.form-status.ok { color: var(--green); } .form-status.err { color: var(--red); }
.cta-card .hero-actions { margin-top: 2rem; }
@media (max-width: 640px) { .contact-form .row { grid-template-columns: 1fr; } }

.footer { width: min(var(--maxw), calc(100% - 32px)); margin: 0 auto; padding: 2rem 0 5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: #aab3c2; }

/* ---------- dialog ---------- */
.sheet {
  width: min(860px, calc(100% - 24px)); max-height: min(86vh, 900px); padding: clamp(24px, 4vw, 44px);
  border-radius: 24px; border: 1px solid var(--line-2); color: var(--text);
  background: radial-gradient(80% 60% at 100% 0%, rgba(34 211 238 / .1), transparent), #0c111c;
  box-shadow: 0 40px 120px rgba(0 0 0 / .7);
}
.sheet[open] { animation: sheetIn .45s var(--ease); }
.sheet::backdrop { background: rgba(3 5 10 / .7); backdrop-filter: blur(6px); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.sheet-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; }
.sheet-close:hover { background: var(--surface-2); }
.sheet h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); padding-right: 40px; }
.sheet-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 1.6rem 0; }
.sheet-cols section { padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sheet-cols h4 { margin: 0 0 .6rem; font: 600 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.sheet-cols ul { margin: 0; padding-left: 1.1rem; color: #c4ccd9; font-size: .9rem; display: grid; gap: .3rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .hero-grid, .feature-grid, .feature-grid.rev { grid-template-columns: 1fr; }
  .feature-grid.rev .panel { order: 2; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .hvac-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before, .timeline::after { top: 0; bottom: 0; left: 22px; right: auto; width: 2px; height: auto; transform: scaleY(var(--tl, 0)); transform-origin: top; }
  .timeline li { padding: 0 0 2rem 4.4rem; min-height: 60px; }
}
@media (max-width: 640px) {
  .nav-cta .btn-ghost { display: none; }
  .nav-cta .btn-primary { display: none; }
  .bento { grid-template-columns: 1fr; }
  .s-plc, .s-hvac, .s-sql, .s-demo { grid-column: auto; grid-row: auto; }
  .s-demo { padding-right: 1.6rem; }
  .demo-thumb { position: static; width: 100%; height: auto; transform: none !important; margin-top: 1.2rem; mask-image: none; order: -1; }
  .s-plc h3 { font-size: 1.6rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hvac-grid { grid-template-columns: 1fr; }
  .gauge-row { flex-direction: column; align-items: stretch; }
  .gauge { margin: 0 auto; }
  .btn-lg { width: 100%; }
  .demo-ribbon { font-size: .62rem; }
}

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