:root {
  --site-bg: #070a0e;
  --site-bg-soft: #0b1117;
  --site-panel: #111820;
  --site-panel-soft: #17212b;
  --site-panel-strong: #1d2a35;
  --site-border: #2a3a47;
  --site-border-bright: #3d5565;
  --site-text: #f4f7f8;
  --site-muted: #9cabb6;
  --site-accent: #00ffc8;
  --site-accent-soft: rgba(0, 255, 200, .12);
  --site-blue: #68d8ff;
  --site-warning: #ffc857;
  --site-danger: #ff566c;
  --site-radius: 14px;
  --site-radius-small: 9px;
  --site-shadow: 0 18px 55px rgba(0, 0, 0, .34);
  --site-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--site-text);
  background:
    radial-gradient(circle at 20% -10%, rgba(0,255,200,.09), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(104,216,255,.07), transparent 30rem),
    linear-gradient(180deg, #0a0f14 0%, var(--site-bg) 40%, #05070a 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

a { color: var(--site-accent); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }
::selection { background: rgba(0,255,200,.25); color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 68px;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(61,85,101,.65);
  background: rgba(7,10,14,.86);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--site-text);
  font-weight: 950;
  letter-spacing: .14em;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--site-accent);
  box-shadow: 0 0 18px rgba(0,255,200,.9);
}
.site-nav { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: flex-end; }
.site-nav a {
  color: var(--site-muted);
  text-decoration: none;
  padding: .58rem .72rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 720;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--site-accent);
  border-color: rgba(0,255,200,.18);
  background: var(--site-accent-soft);
  outline: none;
}
.site-nav a:hover { transform: translateY(-1px); }

.site-main {
  width: min(var(--site-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0;
}
.site-main.wide { width: min(1320px, calc(100% - 2rem)); }

.hero {
  width: min(1320px, calc(100% - 2rem));
  min-height: min(760px, calc(100vh - 68px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 9vw, 8rem) 0;
}
.hero-copy { max-width: 760px; }
.hero h1,
.page-heading h1 {
  margin: .8rem 0 1.1rem;
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.045em;
}
.hero h1 .accent,
.page-heading h1 .accent { color: var(--site-accent); text-shadow: 0 0 30px rgba(0,255,200,.2); }
.hero-lede {
  max-width: 720px;
  margin: 0 0 1.7rem;
  color: var(--site-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.75;
}
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hero-kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--site-accent);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero-kicker::before, .eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.hero-console,
.system-console {
  position: relative;
  overflow: hidden;
  padding: 1.1rem;
  border: 1px solid var(--site-border-bright);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(25,36,46,.9), rgba(8,12,16,.96));
  box-shadow: 0 28px 90px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.04);
}
.hero-console::before,
.system-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0 45%, rgba(255,255,255,.035) 50%, transparent 55% 100%);
  transform: translateX(-70%);
}
.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .15rem .2rem 1rem;
  color: var(--site-muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.console-screen {
  min-height: 330px;
  padding: 1rem;
  border: 1px solid #253944;
  border-radius: 10px;
  background: #071015;
  box-shadow: inset 0 0 40px rgba(0,0,0,.55), 0 0 26px rgba(0,255,200,.06);
}
.console-row {
  display: grid;
  grid-template-columns: 1.25fr .85fr auto;
  gap: .8rem;
  align-items: center;
  padding: .72rem .2rem;
  border-bottom: 1px solid rgba(42,58,71,.62);
  font-size: .9rem;
}
.console-row:last-child { border-bottom: 0; }
.console-label { font-weight: 820; }
.console-path { color: var(--site-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.console-state { color: var(--site-accent); font-weight: 900; }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--site-accent);
  box-shadow: 0 0 13px rgba(0,255,200,.9);
}
.console-rule {
  margin-top: 1rem;
  padding: .85rem;
  border: 1px solid rgba(0,255,200,.25);
  border-radius: 9px;
  background: rgba(0,255,200,.055);
  color: #c8fff3;
  font-size: .84rem;
  line-height: 1.6;
}

.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section.compact { padding: clamp(2rem, 5vw, 4rem) 0; }
.section-heading { max-width: 800px; margin-bottom: 2rem; }
.section-heading h2,
.card h2 {
  margin: .65rem 0 .65rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.08;
}
.section-heading p { margin: 0; color: var(--site-muted); font-size: 1.05rem; line-height: 1.75; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--site-border);
  border-radius: var(--site-radius);
  background: linear-gradient(145deg, rgba(23,33,43,.92), rgba(13,19,25,.96));
  box-shadow: var(--site-shadow);
}
.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  opacity: .6;
  background: linear-gradient(90deg, var(--site-accent), transparent 45%);
}
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,255,200,.2);
  border-radius: 9px;
  color: var(--site-accent);
  background: rgba(0,255,200,.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem;
  font-weight: 900;
}
.muted { color: var(--site-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .78rem 1.05rem;
  border: 1px solid var(--site-accent);
  border-radius: var(--site-radius-small);
  background: var(--site-accent);
  color: #03110d;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,255,200,.18);
  outline: none;
}
.btn.secondary { background: transparent; border-color: var(--site-border-bright); color: var(--site-text); }
.btn.secondary:hover { color: var(--site-accent); border-color: rgba(0,255,200,.5); background: rgba(0,255,200,.05); }
.btn.danger { background: transparent; border-color: rgba(255,86,108,.55); color: #ff8293; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .62rem;
  border: 1px solid rgba(0,255,200,.16);
  border-radius: 999px;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.architecture {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--site-border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(8,13,17,.72);
  box-shadow: var(--site-shadow);
}
.architecture-node {
  position: relative;
  min-height: 240px;
  padding: 1.55rem;
  border-right: 1px solid var(--site-border);
  background: linear-gradient(180deg, rgba(24,35,45,.68), rgba(10,15,20,.72));
}
.architecture-node:last-child { border-right: 0; }
.architecture-node .role-number {
  display: block;
  margin-bottom: 2rem;
  color: var(--site-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .76rem;
  font-weight: 900;
}
.architecture-node h3 { margin: 0 0 .5rem; font-size: 1.28rem; }
.architecture-node p { margin: 0; color: var(--site-muted); line-height: 1.65; }
.architecture-node .transport {
  position: absolute;
  left: 1.55rem;
  bottom: 1.4rem;
  color: var(--site-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  font-weight: 850;
}
.architecture-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  right: -17px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid var(--site-border-bright);
  border-radius: 50%;
  background: #091016;
  color: var(--site-accent);
  box-shadow: 0 0 22px rgba(0,255,200,.11);
}

.principle {
  border-left: 3px solid var(--site-accent);
  padding: 1.15rem 1.25rem;
  background: linear-gradient(90deg, rgba(0,255,200,.08), transparent);
  color: #d8fff6;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.pixel-panel {
  padding: 1.4rem;
  border: 1px solid var(--site-border);
  border-radius: 14px;
  background: #080d11;
}
.pixel-label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.pixel-label-row strong { font-size: .9rem; }
.pixel-label-row span { color: var(--site-muted); font-size: .8rem; }
.pixel-strip { display: grid; grid-template-columns: repeat(30, minmax(5px, 1fr)); gap: 4px; }
.pixel {
  aspect-ratio: 1;
  min-width: 5px;
  border-radius: 3px;
  background: #162027;
  border: 1px solid #24313a;
  box-shadow: inset 0 0 5px rgba(0,0,0,.8);
}
.pixel.marker { background: #00de9d; box-shadow: 0 0 12px rgba(0,255,175,.8); border-color: #47ffd0; }
.pixel.emergency { background: #fff; border-color: #fff; box-shadow: 0 0 14px rgba(255,255,255,.95); }
.pixel-note { margin-top: .8rem; color: var(--site-muted); font-size: .82rem; line-height: 1.6; }

.hardware-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem; }
.hardware-stack { display: grid; gap: .8rem; }
.hardware-module {
  position: relative;
  min-height: 96px;
  display: grid;
  grid-template-columns: 12px minmax(0,1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border: 1px solid #344652;
  border-radius: 10px;
  background: linear-gradient(160deg, #252b30, #0d1114 60%);
  box-shadow: 0 8px 30px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.04);
}
.hardware-led { width: 8px; height: 8px; border-radius: 50%; background: var(--site-accent); box-shadow: 0 0 14px rgba(0,255,200,.9); }
.hardware-module strong { display: block; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .05em; }
.hardware-module small { color: var(--site-muted); }
.hardware-port {
  padding: .4rem .55rem;
  border: 1px solid #41535f;
  border-radius: 5px;
  color: #cbd4d9;
  background: #11171b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
}
.touchscreen-shell {
  min-height: 100%;
  padding: 1rem;
  display: grid;
  place-items: center;
  border: 1px solid #374b58;
  border-radius: 14px;
  background: linear-gradient(145deg, #1a2025, #080b0e);
  box-shadow: var(--site-shadow);
}
.touchscreen {
  width: min(100%, 430px);
  aspect-ratio: 5 / 3;
  padding: 1rem;
  border: 9px solid #050607;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 45%, #132430, #05090d 75%);
  box-shadow: inset 0 0 45px rgba(0,0,0,.7), 0 0 28px rgba(0,255,200,.08);
}
.touchscreen-ui { display: grid; grid-template-columns: repeat(3,1fr); gap: .55rem; height: 100%; }
.touchscreen-tile { border: 1px solid rgba(0,255,200,.3); border-radius: 5px; background: rgba(0,255,200,.06); }
.touchscreen-tile:nth-child(2), .touchscreen-tile:nth-child(5) { border-color: rgba(104,216,255,.35); background: rgba(104,216,255,.06); }

.page-heading { max-width: 860px; margin-bottom: clamp(2rem, 5vw, 4rem); }
.page-heading h1 { font-size: clamp(3rem, 8vw, 6rem); }
.page-heading p { margin: 0; max-width: 760px; color: var(--site-muted); font-size: 1.12rem; line-height: 1.8; }

.spec-list { display: grid; gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.spec-list li { display: grid; grid-template-columns: minmax(120px,.8fr) 1.5fr; gap: 1rem; padding: .62rem 0; border-top: 1px solid rgba(42,58,71,.7); }
.spec-list strong { color: #dfe7eb; }
.spec-list span { color: var(--site-muted); }

.status-banner { margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid var(--site-border); border-radius: 10px; background: var(--site-panel); }
.status-banner.success { border-color: rgba(0,255,200,.48); }
.status-banner.error { border-color: var(--site-danger); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 750; }
.form-control {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--site-border);
  border-radius: 9px;
  background: #090e12;
  color: var(--site-text);
}
.form-control:focus { outline: 2px solid rgba(0,255,200,.18); border-color: var(--site-accent); }
.project-list { display: grid; gap: .75rem; margin-top: 1rem; }
.project-item { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--site-border); border-radius: 10px; background: #0d1318; }
.empty-state { padding: 2rem; text-align: center; border: 1px dashed var(--site-border); border-radius: 10px; color: var(--site-muted); }

.callout {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid rgba(0,255,200,.24);
  border-radius: 16px;
  background: linear-gradient(110deg, rgba(0,255,200,.075), rgba(23,33,43,.5));
}
.callout h2 { margin: 0 0 .45rem; }
.callout p { margin: 0; color: var(--site-muted); }

.site-footer {
  padding: 2.5rem 1rem;
  text-align: center;
  border-top: 1px solid var(--site-border);
  color: var(--site-muted);
  background: rgba(5,8,11,.72);
}
.site-footer a { color: var(--site-muted); }
.site-footer a:hover { color: var(--site-accent); }

.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-console { max-width: 720px; }
  .architecture { grid-template-columns: 1fr 1fr; }
  .architecture-node:nth-child(2) { border-right: 0; }
  .architecture-node:nth-child(-n+2) { border-bottom: 1px solid var(--site-border); }
  .architecture-node:not(:last-child)::after { display: none; }
  .grid.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hardware-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-header { position: relative; align-items: flex-start; flex-direction: column; }
  .site-nav { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }
  .site-nav a { white-space: nowrap; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .architecture { grid-template-columns: 1fr; }
  .architecture-node { border-right: 0; border-bottom: 1px solid var(--site-border); min-height: 205px; }
  .architecture-node:last-child { border-bottom: 0; }
  .callout { flex-direction: column; align-items: stretch; }
  .console-row { grid-template-columns: 1fr auto; }
  .console-path { grid-column: 1 / -1; grid-row: 2; }
  .spec-list li { grid-template-columns: 1fr; gap: .25rem; }
  .pixel-strip { gap: 2px; }
}

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