/* Concept One Labs
   Dark, technical and calm: near-black surfaces, hairline borders, one blue accent from the logo,
   a monospace voice for labels, and a single animated "bring-up console" in the hero. */

:root {
  --bg: #0a0b0f;
  --bg-alt: #0e1016;
  --panel: #12141b;
  --panel-2: #171a23;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eceef4;
  --muted: #a0a5b5;
  --soft: #737889;
  --accent: #3534ff;          /* logo blue: buttons */
  --accent-hover: #4a49ff;
  --accent-text: #6b6aff;     /* logo blue, lifted slightly so small text stays readable on dark */
  --signal: #4ee6a6;          /* "pass" green, used sparingly */
  --ph: #ffd75e;              /* placeholder marker */
  --nav-bg: rgba(10,11,15,.72);
  --nav-solid: rgba(10,11,15,.97);
  --well: #07080b;
  --field: rgba(0,0,0,.25);
  --field-focus: rgba(0,0,0,.4);

  /* Tokens used inside the project drawings */
  --surface: #1b1e28;
  --surface-2: #232734;
  --ink: #3a3f50;
  --ink-2: #4c5266;

  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;

  --step-small: 0.8125rem;
  --step-body: 1.0625rem;
  --step-lead: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --step-title: clamp(2.125rem, 1.3rem + 3vw, 3.75rem);
  --step-display: clamp(2.875rem, 1.4rem + 5.4vw, 6rem);

  --radius: 18px;
  --radius-sm: 10px;
  --gutter: 20px;
  --band: clamp(88px, 10vw, 140px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, dl, dd, ul, ol, pre { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.plain { list-style: none; padding: 0; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

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

/* Placeholder text: dashed yellow underline so it's easy to find and replace */
.ph { text-decoration: underline dashed var(--ph); text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- Type ---------- */
.display { font-size: var(--step-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.045em; }
.title { font-size: var(--step-title); font-weight: 600; line-height: 1.06; letter-spacing: -0.035em; }
.lead { font-size: var(--step-lead); color: var(--muted); line-height: 1.5; max-width: 40ch; }
.grad { color: var(--accent); text-shadow: 0 0 40px rgba(53,52,255,.45); }
.eyebrow { font-size: var(--step-small); color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.08em; }
.link { color: var(--accent-text); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.link:hover { background-size: 100% 1px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
  font-weight: 500; font-size: 0.975rem; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(53,52,255,.35) inset, 0 8px 30px -10px rgba(53,52,255,.8);
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: rgba(255,255,255,.03); border-color: var(--line-2); box-shadow: none; color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.07); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.nav__inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 0.925rem; }
.nav__links > a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav__links > a:not(.btn):hover { color: var(--text); }
.nav__links .nav__mail { margin-left: 8px; }
.nav__links .btn + .btn { margin-left: -16px; }
.nav__menu { display: none; align-items: center; gap: 10px; background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 0.9rem; }
.nav__burger, .nav__burger::before { display: block; width: 14px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s var(--ease); }
.nav__burger::before { content: ""; position: absolute; top: 5px; }
.nav__burger { top: -2.5px; }
.nav__menu[aria-expanded="true"] .nav__burger { transform: translateY(2.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__burger::before { transform: translateY(-5px) rotate(-90deg); }

@media (max-width: 960px) {
  .nav__menu { display: inline-flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--nav-solid); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--text); }
  .nav__links .btn { justify-content: center; margin: 16px 0 0 !important; min-height: 48px; }
  .nav__links .btn + .btn { margin-top: 10px !important; }
  html:not(.js) .nav__links { position: static; display: flex; }
}

/* ---------- Sections ---------- */
.band { padding-block: var(--band); position: relative; }
.band--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.note { color: var(--soft); font-size: var(--step-small); max-width: 32ch; text-align: right; }
@media (max-width: 720px) { .section-head--split { grid-template-columns: 1fr; } .note { text-align: left; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(56px, 9vw, 120px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -20% -10% auto;
  height: 900px;
  background:
    radial-gradient(600px 380px at 72% 30%, rgba(53,52,255,.30), transparent 70%),
    radial-gradient(500px 300px at 20% 10%, rgba(53,52,255,.12), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .55;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero__copy { display: grid; gap: 26px; }
.hero__copy .lead { max-width: 34ch; }
.hero__ext { max-width: 44ch; margin-top: -8px; padding-left: 14px; border-left: 2px solid var(--accent); font-size: 1rem; line-height: 1.6; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 6px 14px 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,.03); font-size: 0.85rem; color: var(--muted); }
.tag__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(78,230,166,.15); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__points { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.8rem; color: var(--soft); }
.hero__points li::before { content: "✓"; color: var(--signal); margin-right: 8px; }

/* Console */
.console { border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, rgba(23,26,35,.92), rgba(14,16,22,.92)); box-shadow: 0 40px 120px -40px rgba(53,52,255,.55), 0 0 0 1px rgba(0,0,0,.4); overflow: hidden; }
.console__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.78rem; color: var(--soft); }
.console__lights { display: flex; gap: 6px; }
.console__lights i { width: 10px; height: 10px; border-radius: 50%; background: #2a2e3b; }
.console__title { flex: 1; }
.console__live { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); }
.console__live b { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2, start) infinite; }
.console__body { padding: 18px 18px 20px; display: grid; gap: 18px; }
.scope { width: 100%; height: auto; aspect-ratio: 520 / 250; }
.scope__grid line { stroke: rgba(255,255,255,.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.scope__labels text { fill: var(--soft); font-size: 11px; }
.trace { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trace--ok { stroke: var(--signal); }
.scope__cursor { stroke: rgba(78,230,166,.6); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.log { display: grid; gap: 7px; font-size: 0.8rem; color: var(--muted); }
.log li::before { content: "› "; color: var(--soft); }
.log__k { display: inline-block; min-width: 4.6em; color: var(--accent-text); }
.log__pass b { color: var(--signal); font-weight: 500; }

/* Console animation (only with JS, only without reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .trace { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.2s var(--ease) forwards; }
  .js .t2 { animation-delay: .25s; } .js .t3 { animation-delay: .5s; } .js .t4 { animation-delay: .75s; } .js .t5 { animation-delay: 1s; }
  .js .scope__cursor { animation: sweep 2.4s .4s var(--ease) both; }
  .js .log li { opacity: 0; transform: translateY(4px); animation: line .5s var(--ease) forwards; }
  .js .log li:nth-child(1) { animation-delay: 1.2s; } .js .log li:nth-child(2) { animation-delay: 1.6s; }
  .js .log li:nth-child(3) { animation-delay: 2s; } .js .log li:nth-child(4) { animation-delay: 2.5s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sweep { from { transform: translateX(-300px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes line { to { opacity: 1; transform: none; } }
@keyframes blink { to { opacity: .2; } }

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy .lead { max-width: 40ch; }
}

/* Ticker */
.ticker { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; overflow: hidden; }
.ticker__label { flex: none; padding: 20px var(--gutter); font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); border-right: 1px solid var(--line); background: var(--bg); position: relative; z-index: 1; }
.ticker__track { display: flex; flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__list { display: flex; flex: none; gap: 44px; padding-right: 44px; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.ticker__list li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 12px; vertical-align: middle; background: var(--accent); border-radius: 1px; transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) { .ticker__list { animation: marquee 40s linear infinite; } }
@media (prefers-reduced-motion: reduce) { .ticker__track { overflow-x: auto; } }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (max-width: 600px) { .ticker__label { display: none; } }

/* ---------- Capabilities bento ---------- */
.bento { display: grid; grid-template-columns: 1fr; gap: 20px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 24px; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .3s; }
.tile--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 32px; }
.tile:hover { border-color: var(--line-2); }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(53,52,255,.10), transparent 70%); opacity: 0; transition: opacity .3s; }
.tile:hover::after { opacity: 1; }
.tile__text { display: grid; align-content: start; gap: 12px; min-width: 0; }
.tile h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.tile p { color: var(--muted); }
.chip-tag { justify-self: start; font-size: 0.72rem; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(53,52,255,.45); color: var(--accent-text); background: rgba(53,52,255,.12); }
.ticks { display: grid; gap: 8px; margin-top: 6px; font-size: 0.95rem; color: var(--muted); }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 4px; background: rgba(78,230,166,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='%234ee6a6' stroke-width='1.6'/%3E%3C/svg%3E") center / 14px no-repeat; }
@media (max-width: 960px) { .tile--wide { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .bento { grid-template-columns: 1fr; } .tile { padding: 20px; } }

/* Visual frames: dotted drafting surface, like a CAD or EDA canvas */
.viz { position: relative; margin-top: auto; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.2px) 0 0 / 18px 18px, #0b0d12; }
.viz--mech { aspect-ratio: auto; display: flex; flex-direction: column; }
.viz.viz--mech > svg { position: relative; inset: auto; height: auto; aspect-ratio: 370 / 262; margin-top: 8px; }
.viz.viz--mech .viz__file { position: relative; left: auto; top: auto; padding: 12px 14px 0; }
.viz__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 10px 10px; }
.viz__row .readout { position: relative; inset: auto; width: auto; align-content: start; }
@media (max-width: 600px) { .viz__row { grid-template-columns: 1fr; } }
.viz > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz__file { position: absolute; left: 14px; top: 12px; font-size: 0.7rem; color: var(--muted); z-index: 1; }
.viz__file span { color: var(--soft); }

/* Floating glass readouts */
.readout { position: absolute; z-index: 2; width: min(220px, 52%); padding: 10px 12px; display: grid; gap: 8px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(16,18,25,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.readout--tr { top: 12px; right: 12px; }
.readout--br { bottom: 12px; right: 12px; }
.readout__head, .readout__foot { display: flex; justify-content: space-between; gap: 8px; font-size: 0.66rem; color: var(--soft); white-space: nowrap; }
.readout__head span:first-child { color: var(--text); }
.readout__foot { padding-top: 7px; border-top: 1px solid var(--line); }
.readout__big { font-size: 1.5rem; color: var(--text); line-height: 1; }
.readout__big small { font-size: .8rem; color: var(--soft); }
.ok { color: var(--signal); }

/* Mechanical: isometric CAD of a liquid-cooled power module (cutaway), press-fit plate moving on guide posts */
.cad { overflow: visible; }
.cad polygon { stroke: rgba(107,106,255,.7); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cad .f-t { fill: #1d2130; } .cad .f-l { fill: #151824; } .cad .f-r { fill: #10131c; }
.cad .m-in.f-l, .cad .m-in.f-r { fill: #121521; }
.cad .m-cold { fill: #0f1a24; stroke: rgba(127,214,255,.5); }
.cad .m-chan { fill: none; stroke: rgba(127,214,255,.35); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cad .m-flow { stroke: #7fd6ff; stroke-width: 2; stroke-dasharray: 6 10; }
.cad .m-boss.f-t, .cad .m-boss.f-l, .cad .m-boss.f-r { fill: #2a2f40; stroke: rgba(255,255,255,.15); }
.cad .m-board.f-t { fill: #13301f; stroke: rgba(78,230,166,.6); } .cad .m-board.f-l, .cad .m-board.f-r { fill: #0d2016; stroke: rgba(78,230,166,.5); }
.cad .m-choke.f-t { fill: #262b3a; } .cad .m-choke.f-l { fill: #1c2030; } .cad .m-choke.f-r { fill: #161a26; }
.cad .m-wind { stroke: #d98a4e; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.cad .m-bus.f-t { fill: #d98a4e; stroke: #f0b07d; } .cad .m-bus.f-l { fill: #a8622f; stroke: #d98a4e; } .cad .m-bus.f-r { fill: #8a4f25; stroke: #d98a4e; }
.cad .m-creep { fill: none; stroke: #f5c46b; stroke-width: 2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.cad .m-pin { stroke: var(--signal); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.cad .m-post { stroke: #9aa0b4; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cad .m-glass.f-l, .cad .m-glass.f-r { fill: rgba(53,52,255,.10); stroke: #3534ff; }
.cad .m-rim { fill: none; stroke: #3534ff; }
.cad .m-conn.f-t, .cad .m-conn.f-l, .cad .m-conn.f-r { fill: #2a2f40; stroke: #6b6aff; }
.cad .m-sig.f-t, .cad .m-sig.f-l, .cad .m-sig.f-r { fill: #3534ff; stroke: #6b6aff; }
.cad .m-pipe.f-t, .cad .m-pipe.f-l, .cad .m-pipe.f-r { fill: #1b3443; stroke: #7fd6ff; }
.cad .m-port { fill: #07080b; stroke: #7fd6ff; }
.cad .m-shield.f-t { fill: rgba(200,205,220,.22); stroke: #c8ccd6; } .cad .m-shield.f-l, .cad .m-shield.f-r { fill: rgba(200,205,220,.14); stroke: #c8ccd6; }
.cad .m-gold { stroke: #e0b54a; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cad .m-lab { fill: var(--muted); font: 8px var(--mono); }
.stds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.stds span { font-size: 0.7rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.cc { display: grid; gap: 5px; font-size: 0.64rem; color: var(--muted); }
.cc li { display: grid; grid-template-columns: 1fr auto 1.2em; gap: 8px; }
.cc b { font-weight: 500; color: var(--text); } .cc i { font-style: normal; color: var(--signal); text-align: right; }
.fea { height: 10px; border-radius: 4px; background: linear-gradient(90deg, #3534ff, #7fd6ff 35%, var(--signal) 55%, #f5c46b 78%, #ff6b6b); position: relative; }
.fea i { position: absolute; top: -3px; bottom: -3px; left: 38%; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; }

/* Electronics: schematic and layout side by side, with one net cross-probed in both */
.tile--flip { grid-template-columns: 1.2fr 0.8fr; }
.tile--flip .tile__text { order: 2; }
@media (max-width: 960px) { .tile--flip { grid-template-columns: 1fr; } .tile--flip .tile__text { order: 0; } }
.viz.viz--ee { aspect-ratio: auto; display: flex; flex-direction: column; }
.viz.viz--ee .viz__file { position: relative; left: auto; top: auto; padding: 12px 14px 0; }
.eda { display: grid; grid-template-columns: 0.62fr 1.38fr; gap: 10px; padding: 10px; align-items: stretch; }
.eda svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.schem2 { background: #0c0e14; border: 1px solid var(--line); }
.s-box { fill: none; stroke: #6b6aff; stroke-width: 1.2; }
.s-w { fill: none; stroke: #6b6aff; stroke-width: 1.1; }
.s-x { fill: none; stroke: #f5c46b; stroke-width: 2.2; }
.s-ref { fill: var(--text); font: 7.5px var(--mono); }
.s-pinl text, .s-lab { fill: var(--muted); font: 6.5px var(--mono); }
.s-net { fill: #f5c46b; font: 6.5px var(--mono); }
.b-board { fill: #0c2318; stroke: rgba(78,230,166,.5); stroke-width: 1.5; }
.b-pour { fill: url(#none); fill: #0f2a1d; stroke: rgba(78,230,166,.12); }
.b-inner path { fill: none; stroke: #3534ff; stroke-width: 2; opacity: .35; }
.b-top path { fill: none; stroke: #2f8f5b; stroke-width: 1.6; stroke-linejoin: round; }
.b-power path { fill: none; stroke: #2f8f5b; stroke-width: 12; stroke-linejoin: round; opacity: .75; }
.b-ic { fill: #151820; stroke: #2c3140; } .b-dot { fill: #3a3f50; }
.b-pin rect, .b-cpin rect { fill: #c9a24a; }
.b-conn { fill: #1a1d27; stroke: #4c5266; }
.b-diff path { fill: none; stroke: #2f8f5b; stroke-width: 2; }
.b-xprobe path { fill: none; stroke: #f5c46b; stroke-width: 3; stroke-linecap: round; }
.b-ind { fill: #2a2f40; stroke: #4c5266; } .b-ind2 { fill: none; stroke: #d98a4e; stroke-width: 4; }
.b-cap { fill: #20242f; stroke: #8b909c; } .b-capm { stroke: #8b909c; }
.b-fet { fill: #151820; stroke: #2c3140; } .b-fettab { fill: #9aa0b4; }
.b-xtal { fill: #9aa0b4; }
.b-pas rect { fill: #3b3329; stroke: #c9a24a; stroke-width: .8; }
.b-via circle { fill: #c9a24a; stroke: #0c2318; stroke-width: 1; }
.b-silk { fill: rgba(236,238,244,.75); font: 9px var(--mono); }
.viz__row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .viz__row--3 { grid-template-columns: 1fr; } .eda { grid-template-columns: 1fr; } .eda .schem2 { order: 2; width: 80%; justify-self: center; } }
.layers { display: flex; gap: 4px; }
.layers span { flex: 1; text-align: center; font-size: 0.6rem; padding: 3px 0; border-radius: 4px; border: 1px solid var(--line-2); color: var(--soft); }
.layers .on { border-color: #3534ff; color: var(--text); background: rgba(53,52,255,.25); }

/* Software: Rust + logic analyzer */
.viz--sw { display: grid; grid-template-rows: 1fr auto; aspect-ratio: auto; min-height: 0; background: var(--well); }
.code { margin: 0; padding: 14px 16px; font-size: 0.74rem; line-height: 1.7; color: #c9ccd8; overflow-x: auto; white-space: pre; }
.code__file { display: block; margin-bottom: 8px; color: var(--soft); font-size: 0.68rem; }
.c-k { color: #6b6aff; } .c-f { color: #7fd6ff; } .c-n { color: var(--signal); } .c-t { color: #f5c46b; } .c-m { color: var(--soft); } .c-l { color: #ff9ac1; }
.la { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: #0b0d12; }
.la__body { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.la__names { display: grid; grid-template-rows: repeat(4, 1fr); font-size: 0.62rem; color: var(--soft); }
.la__names li { display: flex; align-items: center; }
.la__svg { width: 100%; height: 110px; display: block; }
.la__grid line { stroke: rgba(255,255,255,.05); vector-effect: non-scaling-stroke; }
.la-w { fill: none; stroke: var(--signal); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.la-clk { stroke: #7fd6ff; } .la-alt { stroke: #f5c46b; }
.la-dec rect { fill: rgba(53,52,255,.22); stroke: #3534ff; vector-effect: non-scaling-stroke; }
.la-dec text { fill: var(--text); font: 7px var(--mono); }

/* Systems: design-space scatter, Pareto front, budget */
.po-axes path { fill: none; stroke: var(--line-2); }
.po-lab { fill: var(--soft); font-size: 9px; }
.po-dot { fill: #3a3f55; }
.po-front { fill: none; stroke: #3534ff; stroke-width: 2; stroke-dasharray: 5 5; }
.po-best { fill: var(--signal); } .po-ring { fill: none; stroke: var(--signal); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.po-tag { fill: var(--text); font-size: 10px; }
.readout--budget { width: min(230px, 58%); }
.bud { display: grid; gap: 7px; font-size: 0.66rem; color: var(--muted); }
.bud li { display: grid; grid-template-columns: 3.2em 1fr 3.6em; align-items: center; gap: 8px; }
.bud i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3534ff, #6b6aff) 0 0 / var(--to) 100% no-repeat, rgba(255,255,255,.06); }
.bud b { font-weight: 500; color: var(--text); text-align: right; }

/* High power: three-phase inverter */
.inv__wire path { fill: none; stroke: #5a6078; stroke-width: 1.6; }
.inv__flow path { fill: none; stroke: #f5b454; stroke-width: 2.4; stroke-dasharray: 8 12; }
.inv__sw rect { fill: #161924; stroke: #3534ff; stroke-width: 1.5; } .inv__sw path { fill: #6b6aff; }
.inv__m { fill: #10131c; stroke: #6b6aff; stroke-width: 2; } .inv__mt { fill: var(--text); font-size: 14px; }
.inv__lab { fill: var(--muted); font-size: 9px; }
.readout--phase { width: min(220px, 55%); }
.phase { width: 100%; height: 54px; display: block; }
.ph { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; } .ph-a { stroke: #6b6aff; } .ph-b { stroke: var(--signal); } .ph-c { stroke: #f5b454; }
.therm { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 0.64rem; color: var(--muted); }
.therm i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--signal), #f5b454 70%, #ff6b6b) 0 0 / 61% 100% no-repeat, rgba(255,255,255,.06); }

/* Phones: drawing on top, readouts stacked underneath so nothing is covered */
@media (max-width: 600px) {
  .viz:not(.viz--sw) { aspect-ratio: auto; display: flex; flex-direction: column; }
  .viz > svg { position: relative; inset: auto; height: auto; aspect-ratio: 4 / 3; }
  .viz--hp > svg { aspect-ratio: 520 / 250; }
  .viz__file { position: relative; left: auto; top: auto; padding: 12px 14px 0; }
  .readout { position: relative; inset: auto; width: auto; margin: 0 10px 10px; }
  .code { font-size: 0.64rem; }
}

/* Motion: loops only when the visitor hasn't asked for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .m-plate { animation: press 6s var(--ease) infinite; }
  .m-flow { animation: flow 1.2s linear infinite; }
  .m-creep { animation: blink 1.2s steps(2, start) infinite; }
  .fea i { animation: fea 6s var(--ease) infinite; }
  .inv__flow path { animation: flow 1.6s linear infinite; }
  .b-inner path { animation: layer 6s ease-in-out infinite; }
  .b-xprobe path, .s-x { animation: probe 1.6s ease-in-out infinite; }
  .la-scroll { animation: scroll400 6s linear infinite; }
  .hp-scroll { animation: scroll200 2.4s linear infinite; }
  .po-dot { animation: pop 5s var(--d) ease-out infinite; }
  .po-front { animation: dash 5s linear infinite; }
  .po-ring { animation: ring 2s ease-out infinite; }
  .bud i { animation: shrink 5s var(--ease) infinite; }
}
@keyframes press { 0%, 15% { transform: translateY(-18px); } 45%, 70% { transform: translateY(18px); } 100% { transform: translateY(-18px); } }
@keyframes fea { 0%, 15% { left: 12%; } 45%, 70% { left: 38%; } 100% { left: 12%; } }
@keyframes layer { 0%, 30% { opacity: .15; } 50%, 80% { opacity: .9; } 100% { opacity: .15; } }
@keyframes probe { 50% { opacity: .35; } }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes scroll400 { to { transform: translateX(-400px); } }
@keyframes scroll200 { to { transform: translateX(-200px); } }
@keyframes pop { 0% { opacity: 0; } 10%, 100% { opacity: 1; } }
@keyframes dash { to { stroke-dashoffset: -60; } }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes shrink { 0%, 15% { background-size: var(--from) 100%, auto; } 55%, 100% { background-size: var(--to) 100%, auto; } }


/* Shared full-width visual frame: label, panes, readout row */
.viz.viz--stack { aspect-ratio: auto; display: flex; flex-direction: column; }
.viz.viz--stack .viz__file { position: relative; left: auto; top: auto; padding: 12px 14px 0; }
.pane { display: grid; gap: 10px; padding: 10px; align-items: center; }
.pane > svg, .pane svg.auto { width: 100%; height: auto; display: block; }
.pane--sw { grid-template-columns: 0.9fr 1.1fr; align-items: stretch; }
.pane--sys { grid-template-columns: 1fr 1.15fr; }
.pane--hv { grid-template-columns: 1.6fr 0.75fr; }
.pane--vt { grid-template-columns: 1.4fr 0.8fr; }
@media (max-width: 760px) { .pane--sw, .pane--sys, .pane--hv, .pane--vt { grid-template-columns: 1fr; } .pane .therm2, .pane .xray { width: 62%; justify-self: center; } }

/* Software */
.auto { border-radius: 8px; background: #0c0e14; border: 1px solid var(--line); padding: 4px; }
.a-band { fill: rgba(255,255,255,.02); stroke: var(--line-2); }
.a-box, .a-core rect:first-child { fill: #151824; stroke: #3534ff; }
.a-rte { fill: rgba(53,52,255,.35); stroke: #3534ff; }
.a-cdd { fill: rgba(245,196,107,.10); stroke: #f5c46b; }
.a-boot { fill: rgba(78,230,166,.10); stroke: var(--signal); }
.a-cap { fill: var(--soft); font: 6px var(--mono); letter-spacing: .06em; }
.a-t { fill: var(--text); font: 7px var(--mono); text-anchor: middle; } .a-tw { font-weight: 600; }
.a-s { fill: var(--muted); font: 5.5px var(--mono); text-anchor: middle; }
.a-load { fill: var(--signal); transform-box: fill-box; transform-origin: left; transform: scaleX(var(--l)); }
.a-pkt { fill: #f5c46b; filter: drop-shadow(0 0 4px #f5c46b); }
.sw-right { display: grid; gap: 10px; align-content: start; min-width: 0; }
.sw-right .code { border-radius: 8px; border: 1px solid var(--line); background: var(--well); }
.sw-right .la { border: 1px solid var(--line); border-radius: 8px; }
.sw-right .la__svg { height: 84px; }
.pipe { display: flex; gap: 4px; }
.pipe span { flex: 1; text-align: center; font-size: 0.58rem; padding: 4px 0; border-radius: 4px; border: 1px solid var(--line-2); color: var(--soft); }

/* Systems */
.sysmap { border-radius: 8px; background: #0c0e14; border: 1px solid var(--line); }
.sy-link { stroke: var(--line-2); stroke-width: 1.2; }
.sy-flow { stroke: #3534ff; stroke-width: 2; stroke-dasharray: 4 10; fill: none; }
.sy-core { fill: rgba(53,52,255,.18); stroke: #3534ff; stroke-width: 1.5; }
.sy-ring { fill: none; stroke: #3534ff; transform-box: fill-box; transform-origin: center; }
.sy-ct { fill: var(--text); font: 600 10px var(--font); text-anchor: middle; } .sy-cs { fill: var(--muted); font: 7px var(--mono); text-anchor: middle; }
.sy-node { fill: #151824; stroke: var(--line-2); }
.sy-nt { fill: var(--text); font: 8px var(--mono); text-anchor: middle; }
.pane--sys .pareto { border-radius: 8px; background: #0c0e14; border: 1px solid var(--line); }

/* High power */
.inv2, .therm2 { border-radius: 8px; background: #0c0e14; border: 1px solid var(--line); }
.cm rect { fill: #151824; stroke: #d98a4e; } .cm path { fill: none; stroke: #d98a4e; stroke-width: 1.4; } .cm .cm-core { stroke: #9aa0b4; stroke-width: 2; }
.gd rect { fill: rgba(78,230,166,.12); stroke: var(--signal); } .gd text { fill: var(--signal); font: 7px var(--mono); text-anchor: middle; }
.cs circle { fill: none; stroke: #7fd6ff; stroke-width: 2; }
.tm-base { fill: #1a1d27; stroke: #4c5266; }
.tm-die { fill: #2a2f40; stroke: #4c5266; }
.tm-hot { opacity: .85; mix-blend-mode: screen; }
.tm-lab { fill: var(--muted); font-size: 6.5px; }

/* Validation & test */
.reflow, .xray { border-radius: 8px; background: #0c0e14; border: 1px solid var(--line); }
.rf-zone rect { fill: rgba(255,255,255,.02); } .rf-zone .z2 { fill: rgba(255,255,255,.045); }
.rf-lab { fill: var(--soft); font-size: 6px; }
.rf-axis { fill: none; stroke: var(--line-2); }
.rf-liq { stroke: #ff6b6b; stroke-dasharray: 3 3; opacity: .6; }
.rf-curve { fill: none; stroke: #f5b454; stroke-width: 2; stroke-linejoin: round; }
.rf-dot { fill: #fff; filter: drop-shadow(0 0 4px #f5b454); offset-path: path("M22.0,130.0 67.6,67.5 113.2,55.0 147.4,47.5 174.0,20.0 185.4,20.0 212.0,67.5 242.4,112.5"); }
.xr-bg { fill: #1b1f29; }
.xr-ball { fill: #c8ccd6; opacity: .82; } .xr-bad { fill: #c8ccd6; }
.xr-void { fill: #3a3f50; } .xr-mark { fill: none; stroke: #ff6b6b; stroke-width: 1.5; }
.xr-scan { fill: rgba(127,214,255,.35); }
.eol { display: grid; gap: 5px; font-size: 0.62rem; color: var(--muted); }
.eol li { display: grid; grid-template-columns: 3.8em 1fr auto; gap: 8px; } .eol b { font-weight: 500; color: var(--text); } .eol i { font-style: normal; color: var(--signal); }

@media (prefers-reduced-motion: no-preference) {
  .a-pkt { animation: pkt 5s var(--ease) infinite; }
  .a-load { animation: load 3s ease-in-out infinite alternate; }
  .pipe span { animation: stage 6s linear infinite; }
  .pipe span:nth-child(2) { animation-delay: .6s; } .pipe span:nth-child(3) { animation-delay: 1.2s; } .pipe span:nth-child(4) { animation-delay: 1.8s; } .pipe span:nth-child(5) { animation-delay: 2.4s; }
  .sy-flow { animation: flow 1.2s linear infinite; animation-delay: var(--d); }
  .sy-ring { animation: ring 2.4s ease-out infinite; }
  .tm-hot { animation: hot 3s ease-in-out infinite alternate; animation-delay: var(--d); }
  .rf-dot { animation: rf 6s linear infinite; }
  .xr-scan { animation: scan 3s linear infinite; }
  .xr-mark { animation: probe 1.2s ease-in-out infinite; }
}
@keyframes pkt { 0%, 8% { transform: none; } 25% { transform: translateY(33px); } 45% { transform: translate(130px, 81px); } 65% { transform: translate(130px, 133px); } 85%, 100% { transform: translate(-2px, 175px); opacity: 0; } }
@keyframes load { from { transform: scaleX(calc(var(--l) * .7)); } to { transform: scaleX(var(--l)); } }
@keyframes stage { 0%, 40% { color: var(--soft); border-color: var(--line-2); background: none; } 45%, 95% { color: var(--signal); border-color: var(--signal); background: rgba(78,230,166,.10); } 100% { color: var(--soft); } }
@keyframes hot { from { opacity: .45; } to { opacity: .95; } }
@keyframes rf { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(147px); } }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; position: relative; }
.step { position: relative; display: grid; align-content: start; gap: 12px; padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.step::before { content: ""; position: absolute; top: 34px; left: calc(100% + 1px); width: 14px; height: 1px; background: var(--line-2); }
.step:last-child::before { display: none; }
.step__n { font-size: 0.75rem; color: var(--accent-text); letter-spacing: .06em; }
.step h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
.step p { color: var(--muted); }
.step__out { margin-top: 10px; padding-top: 16px; border-top: 1px dashed var(--line-2); font-size: 0.8rem; color: var(--text) !important; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .step::before { display: none; } }

/* ---------- Handover ---------- */
.gets { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.get { padding: 32px 28px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); }
.get:last-child { border-right: 0; }
.get__icon { width: 36px; height: 36px; padding: 7px; margin-bottom: 10px; border-radius: 10px; background: rgba(53,52,255,.12); border: 1px solid rgba(53,52,255,.3); fill: none; stroke: var(--accent-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.get h3 { font-size: 1.15rem; }
.get p { color: var(--muted); font-size: 0.975rem; }
@media (max-width: 900px) { .gets { grid-template-columns: 1fr 1fr; } .get:nth-child(2) { border-right: 0; } .get:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .gets { grid-template-columns: 1fr; } .get { border-right: 0; border-bottom: 1px solid var(--line); } .get:last-child { border-bottom: 0; } }

/* ---------- Work ---------- */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.work { border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.work:hover { border-color: var(--line-2); transform: translateY(-3px); }
.work__fig { border-bottom: 1px solid var(--line); overflow: hidden; }
.work__fig svg { width: 100%; height: auto; transition: transform .8s var(--ease); }
.work:hover .work__fig svg { transform: scale(1.03); }
.work__body { padding: 24px 28px 28px; display: grid; gap: 8px; }
.work__meta { font-size: 0.75rem; color: var(--accent-text); }
.work h3 { font-size: 1.35rem; letter-spacing: -0.02em; }
.work p:not(.work__meta) { color: var(--muted); }
@media (max-width: 720px) { .works { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about__copy { display: grid; gap: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts > div { background: var(--panel); padding: 24px; display: grid; gap: 10px; align-content: start; }
.facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.facts dd { font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.about__more { max-width: 52ch; padding-left: 14px; border-left: 2px solid var(--accent); color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: 108px; margin: 0; }
.faq { display: grid; }
.faq__group { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); padding: 28px 0 12px; }
.faq__group:first-child { padding-top: 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; gap: 16px; align-items: baseline; padding: 20px 36px 20px 0; cursor: pointer; list-style: none; font-size: 1.1rem; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.4rem; font-weight: 300; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--text); }
.faq__n { font-size: 0.75rem; color: var(--accent-text); flex: none; }
.faq details p { padding: 0 36px 22px 34px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; } .faq-head { position: static; } }

/* ---------- Contact ---------- */
.band--cta { overflow: hidden; }
.band--cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 400px at 15% 20%, rgba(53,52,255,.22), transparent 70%); pointer-events: none; }
.contact { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__copy { display: grid; gap: 18px; }
.contact__list { display: grid; gap: 10px; margin-top: 12px; }
.contact__list li { display: flex; gap: 16px; align-items: baseline; }
.contact__list .mono { min-width: 4.5em; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.brief { display: grid; gap: 20px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(8px); }
.brief__set { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.brief__set legend { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.925rem; color: var(--muted); transition: all .2s; }
.chip:hover span { color: var(--text); border-color: rgba(255,255,255,.3); }
.chip input:checked + span { background: rgba(53,52,255,.18); border-color: var(--accent-text); color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.brief__out { font-size: 0.82rem; line-height: 1.6; color: var(--muted); padding: 14px 16px; border-radius: var(--radius-sm); background: var(--well); border: 1px solid var(--line); }
.brief__out::before { content: "› "; color: var(--signal); }
.field { display: block; }
.field input, .field textarea { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--field); transition: border-color .2s, background .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: var(--soft); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-text); background: var(--field-focus); }
.field .is-invalid, .is-invalid { border-color: #ff6b6b !important; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.brief__send .btn { width: 100%; justify-content: center; min-height: 50px; }
.brief__status { font-size: 0.925rem; color: var(--muted); min-height: 0; }
.brief__status:empty { display: none; }
.brief__status[data-kind="error"] { color: #ff8a8a; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 72px 0 32px; font-size: 0.925rem; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.footer__brand { display: grid; gap: 16px; align-content: start; }
.footer__brand p { color: var(--muted); max-width: 30ch; }
.footer__logo { height: 32px; width: auto; }
.footer h2 { font-size: 0.75rem; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin: 0 0 14px; }
.footer nav, .footer__top > div:last-child { display: grid; gap: 10px; align-content: start; }
.footer__top a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer__top a:hover { color: var(--text); }
.footer__top p { color: var(--muted); }
.credits { margin-top: 28px; color: var(--soft); font-size: 0.8rem; }
.credits summary { cursor: pointer; }
.credits ul { display: grid; gap: 6px; margin-top: 12px; }
.credits a { color: var(--muted); }
.footer__last { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; color: var(--soft); font-size: 0.85rem; }
@media (max-width: 860px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.notfound .wrap { display: grid; gap: 20px; justify-items: center; max-width: 640px; }
.notfound img { height: 36px; width: auto; margin-bottom: 32px; }
.notfound .lead { margin-inline: auto; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* Desktop: every discipline visual gets the same frame height as Mechanical; the drawings scale to fill it */
@media (min-width: 961px) {
  .tile--wide .viz { height: 660px; }
  .tile--wide .viz.viz--mech > svg.cad { flex: 1; min-height: 0; aspect-ratio: auto; height: 100%; width: 100%; }
  .tile--wide .eda, .tile--wide .pane { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .tile--wide .eda > svg, .tile--wide .pane > svg { height: 100%; width: 100%; min-height: 0; }
  .tile--wide .sw-right { grid-template-rows: 1fr auto; min-height: 0; }
  .tile--wide .sw-right .code { display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- Light theme (toggle in the nav). Engineering screens (.viz, .console) stay dark. ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --bg-alt: #eceef5;
  --panel: #ffffff;
  --panel-2: #f3f4f8;
  --line: rgba(14,17,28,.09);
  --line-2: rgba(14,17,28,.16);
  --text: #0e1018;
  --muted: #4a5064;
  --soft: #6b7186;
  --accent-text: #3534ff;
  --ph: #c99700;
  --nav-bg: rgba(245,246,250,.78);
  --nav-solid: rgba(245,246,250,.98);
  --well: #eef0f6;
  --field: #ffffff;
  --field-focus: #ffffff;
}
:root[data-theme="light"] html, :root[data-theme="light"] { background: var(--bg); }
:root[data-theme="light"] .grad { text-shadow: none; }
:root[data-theme="light"] .tile { box-shadow: 0 1px 2px rgba(14,17,28,.04), 0 12px 40px -24px rgba(14,17,28,.25); }
:root[data-theme="light"] .hero::before { opacity: .55; }
.viz, .console {
  --text: #eceef4; --muted: #a0a5b5; --soft: #737889;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --accent-text: #6b6aff; --well: #07080b;
  color: var(--text);
}
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }

/* Theme toggle */
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; transition: background .2s, transform .3s var(--ease); flex: none; }
.theme-btn:hover { background: rgba(127,127,127,.12); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }
.nav__right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 960px) { .nav__right { margin-left: auto; } }
/* Toggle sits at the far right, after the call to action, as an unobtrusive icon button */
.nav__inner { justify-content: flex-start; }
.nav__links { order: 1; margin-left: auto; }
.nav__right { order: 2; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line-2); height: 28px; }
.theme-btn { border: 0; width: 36px; height: 36px; color: var(--muted); }
.theme-btn:hover { color: var(--text); }
.theme-btn:focus:not(:focus-visible) { outline: none; }
@media (max-width: 960px) { .nav__right { margin-left: auto; padding-left: 0; border-left: 0; height: auto; } }

/* Discipline text: starts at the top and fills the height of the visual */
.tile--wide { align-items: stretch; }
.tile--wide .tile__text { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 4px; }
.tile--wide .tile__text h3 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); }
.tile--wide .tile__text > p:not(.chip-tag):not(.stds) { font-size: 1.05rem; }
.recv { margin-top: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-alt); padding: 14px 16px; display: grid; gap: 10px; }
.recv__h { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.recv ul { display: grid; gap: 8px; }
.recv li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--text); }
.recv li::before { content: "→"; color: var(--accent-text); font-family: var(--mono); }
.chip-tag { align-self: flex-start; }

/* Hero: drive-monitor GUI, stacked under the console (never covers the traces), same width */
.hero__visual { display: grid; gap: 14px; }
.hero__visual .console__body { padding: 14px 16px 16px; gap: 12px; }
.hero__visual .scope { aspect-ratio: 520 / 150; }
.hero__visual .log { gap: 4px; font-size: 0.76rem; }
/* Staggered: console steps left (top), monitor steps right (bottom) */
@media (min-width: 961px) {
  .hero__visual .console { margin-left: -56px; margin-right: 56px; }
  .hero__visual .gui { margin-left: 56px; margin-right: -56px; }
}
@media (min-width: 961px) and (max-width: 1240px) {
  .hero__visual .console { margin-left: -24px; margin-right: 32px; }
  .hero__visual .gui { margin-left: 32px; margin-right: -12px; }
}
.gui { position: relative; z-index: 2; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset; overflow: hidden; color: var(--text); }
.gui__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.78rem; }
.gui__app { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.gui__app em { font-style: normal; font-weight: 400; font-size: .68rem; color: var(--soft); }
.gui__logo { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, #3534ff, #6b6aff); }
.gui__tabs { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--bg-alt); font-size: 0.7rem; }
.gui__tabs > * { padding: 3px 8px; border-radius: 6px; color: var(--soft); font-weight: 500; }
.gui__tabs b { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.gui__body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; padding: 10px; }
.gcell, .metric, .chan { border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.gcell { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 9px 10px; }
.gcell__head { display: flex; justify-content: space-between; align-items: center; }
.gui__legend { display: inline-flex; align-items: center; gap: 4px; font-size: .62rem; color: var(--soft); }
.gui__legend i { width: 8px; height: 2px; border-radius: 1px; margin-left: 4px; }
.wave { width: 100%; height: 100%; min-height: 70px; }
.wave__grid line { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wave polyline { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pa { stroke: #6b6aff; background: #6b6aff; } .pb { stroke: var(--signal); background: var(--signal); } .pc { stroke: #f5b454; background: #f5b454; }
.gcell__foot { display: flex; justify-content: space-between; font-size: .66rem; color: var(--soft); }
.gcell__foot b, .chan__d b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.gui__kpis { display: grid; gap: 8px; align-content: stretch; }
.metric { display: grid; gap: 3px; padding: 7px 10px; }
.metric__k { font-size: 0.6rem; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.metric b { font-size: 0.98rem; font-weight: 600; font-variant-numeric: tabular-nums; } .metric small { font-size: .66rem; color: var(--soft); font-weight: 400; }
.spark { width: 100%; height: 16px; }
.spark polyline { fill: none; stroke: var(--signal); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.metric__bar { position: relative; height: 5px; border-radius: 3px; background: var(--line-2); }
.metric__bar i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, #3534ff, #6b6aff); transition: width .6s var(--ease); }
.metric__bar em { position: absolute; top: -3px; width: 2px; height: 11px; border-radius: 1px; background: var(--text); left: 40%; transition: left .6s var(--ease); }
.gui__comms { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chan { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; row-gap: 2px; align-items: center; padding: 7px 10px; }
.chan__n { font-size: .7rem; font-weight: 500; }
.chan__d { grid-column: 1 / -1; font-size: .62rem; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 6px var(--signal); transition: opacity .08s; }
.led.is-off { opacity: .25; box-shadow: none; }
.gui__foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px 10px; border-top: 1px solid var(--line); font-size: 0.66rem; color: var(--soft); font-family: var(--mono); }
.gui__ok { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); }
.gui__ok i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@media (max-width: 560px) { .gui__body { grid-template-columns: 1fr; } .gui__comms { grid-template-columns: 1fr; } .chan { grid-template-columns: auto auto 1fr; } .chan__d { grid-column: auto; text-align: right; } .gui__foot span:last-child { display: none; } }
