:root {
  --bg: #0b0c0e;
  --surface: #101216;
  --surface-2: #15181d;
  --card: #101216;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --line-accent: rgba(145, 45, 162, 0.45);
  --text: #f4f6f8;
  --text-soft: #ccd5de;
  --muted: #9099a3;
  --accent: #912da2;
  --accent-hover: #a94ab9;
  --green: #2fbf6e;
  --red: #ff5a5a;
  --header-bg: rgba(11, 12, 14, 0.85);
  --scrim: rgba(0, 0, 0, 0.55);
  --logo-filter: brightness(0) invert(1);
  --radius: 4px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'Sora', sans-serif;
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 1200px;
  color-scheme: dark;
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --card: #ffffff;
  --line: rgba(15, 18, 23, 0.13);
  --line-strong: rgba(15, 18, 23, 0.28);
  --line-accent: rgba(145, 45, 162, 0.45);
  --text: #0f1217;
  --text-soft: #3c4552;
  --muted: #626c7a;
  --accent: #912da2;
  --accent-hover: #74217f;
  --green: #17914f;
  --red: #cf3b3b;
  --header-bg: rgba(255, 255, 255, 0.85);
  --scrim: rgba(0, 0, 0, 0.45);
  --logo-filter: brightness(0);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
p, ul, ol { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); max-width: 16ch; font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3vw, 3rem); max-width: 20ch; line-height: 1.12; }
h3 { font-size: 1.15rem; line-height: 1.25; font-weight: 600; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 max(5vw, calc((100vw - var(--maxw)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-logo { display: block; width: 176px; height: auto; }
/* Light theme uses the dark-lettered logo variant */
:root[data-theme="light"] .brand-logo { content: url("neonix-logo-light.svg"); }

/* Theme toggle */
.theme-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--accent);
  position: relative;
}
.brand-mark::after {
  content: "N";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: 1.6rem; color: var(--muted); font-size: 0.92rem; font-weight: 500; margin-left: auto; }
.site-nav a {
  padding: 0.25rem 0;
  transition: color 0.2s var(--ease-out);
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--accent); }

.nav-toggle { display: none; }

/* Sections */
.section { padding: 6rem max(5vw, calc((100vw - var(--maxw)) / 2)); }
.section.compact { padding-block: 4.5rem; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; position: relative; }

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}
.section-heading.center .eyebrow { justify-content: center; }
.eyebrow.pink { color: var(--muted); }

.lead { color: var(--text-soft); font-size: clamp(1.05rem, 1.3vw, 1.22rem); max-width: 720px; line-height: 1.6; }
.muted { color: var(--muted); }

.section-heading { display: grid; gap: 0.85rem; margin-bottom: 2.25rem; }
.section-heading.center { text-align: center; justify-items: center; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--accent);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
}
.button.secondary:hover {
  border-color: var(--text);
}

.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(820px, calc(100svh - 68px));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: clamp(5rem, 9vh, 7.5rem);
  padding-bottom: clamp(4rem, 8vh, 6.5rem);
  background: #060708;
}
.hero-backdrop,
.hero-scrim {
  position: absolute;
  inset: 0;
}
.hero-backdrop { z-index: -3; }
.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.98) 0%, rgba(5, 6, 8, 0.93) 30%, rgba(5, 6, 8, 0.42) 58%, rgba(5, 6, 8, 0.06) 100%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.62) 0%, transparent 38%, rgba(5, 6, 8, 0.1) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 47, 194, 0.58), transparent);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 660px) 1fr;
  min-height: 570px;
  align-items: end;
}
.hero-copy {
  display: grid;
  gap: 1.5rem;
  align-self: center;
}
.hero-copy .eyebrow { color: #cf66d7; }
.hero h1 {
  color: #f8f9fb;
  font-size: clamp(3.2rem, 5.6vw, 5.4rem);
  line-height: 1.1;
  letter-spacing: -0.055em;
  max-width: 12ch;
  text-wrap: balance;
}
.hero h1 em {
  display: block;
  font-style: normal;
  color: #c23dcd;
}
.hero .lead {
  color: rgba(238, 242, 246, 0.78);
  max-width: 610px;
  font-size: clamp(1.05rem, 1.25vw, 1.2rem);
}
.hero .button {
  min-height: 52px;
  padding-inline: 1.6rem;
}
.hero .button.primary {
  background: #a92ab5;
  box-shadow: 0 12px 38px rgba(146, 30, 158, 0.28);
}
.hero .button.primary:hover { background: #bf38ca; }
.hero .button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(7, 8, 10, 0.35);
  backdrop-filter: blur(8px);
}
.hero .button.secondary:hover { border-color: rgba(255, 255, 255, 0.75); }

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 0.8rem 1.4rem;
  margin-top: 0.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-point {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(238, 242, 246, 0.74);
  font-size: 0.78rem;
  white-space: nowrap;
}
.hero-point svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #cf66d7;
}

:root[data-theme="light"] .hero { color-scheme: dark; }
:root[data-theme="light"] .hero .eyebrow { color: #cf66d7; }
:root[data-theme="light"] .hero .hero-point { color: rgba(238, 242, 246, 0.74); }
:root[data-theme="light"] .hero .hero-point svg { color: #cf66d7; }
:root[data-theme="light"] .hero .hero-points { border-color: rgba(255, 255, 255, 0.14); }

/* Cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: clamp(1.25rem, 2vw, 1.7rem);
  transition: border-color 0.2s var(--ease-out);
  position: relative;
}
.card:hover {
  border-color: var(--line-strong);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

/* Product cards */
.product-card { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1.5rem; align-items: center; min-height: 280px; }
.product-card img { width: 100%; height: auto; border-radius: 2px; border: 1px solid var(--line); }
a.product-card:hover { border-color: var(--line-accent); }

.grid-3 .product-card {
  grid-template-columns: 1fr;
  min-height: auto;
}
.grid-3 .product-card img {
  grid-row: 1;
  order: -1;
}
.product-copy { display: grid; gap: 1.1rem; }
.check-list { display: grid; gap: 0.6rem; padding: 0; list-style: none; color: var(--text-soft); font-size: 0.92rem; }
.check-list li { position: relative; padding-left: 1.4rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  border-radius: 1px;
}
.text-link { color: var(--accent); font-weight: 600; font-family: var(--font-display); transition: color 0.2s; }
.text-link:hover { color: var(--accent-hover); }

/* Case studies */
.case-study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.case-study-card {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.5rem, 2vw, 2rem);
}
.case-study-card h3 { font-size: 1.25rem; }
.case-study-card p { color: var(--muted); line-height: 1.6; }
.case-study-meta {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.case-study-meta span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text);
  background: var(--surface-2);
  padding: 0.35rem 0.65rem;
  border-radius: 2px;
  border: 1px solid var(--line);
}

/* Process */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.process-step {
  padding: clamp(1.5rem, 2vw, 2rem);
  display: grid;
  gap: 0.9rem;
  align-content: start;
}
.process-step .step-number {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.process-step h3 {
  font-size: 1.12rem;
}
.process-step p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.process-step p strong {
  color: var(--text);
  font-weight: 600;
}
.process-step .step-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.process-step .step-icon svg {
  width: 20px;
  height: 20px;
}

/* Comparison table */
.compare { overflow-x: auto; padding: 0; }
table { width: 100%; min-width: 840px; border-collapse: collapse; }
th, td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-size: 0.8rem; font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
td { color: var(--text-soft); font-size: 0.92rem; }
td.good { color: var(--text); font-weight: 600; }

/* Integration grid */
.integration-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.integration-item {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.7rem;
  color: var(--text);
  padding: 1.5rem 1rem;
}
.integration-item svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
}
.integration-item strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.integration-item small {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 400;
}

/* Hardware */
.hardware-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.hardware-intro { display: grid; align-content: center; gap: 1rem; padding-right: clamp(1rem, 2vw, 2rem); }
.hardware-intro h2 { font-size: clamp(1.9rem, 2.6vw, 2.8rem); max-width: 12ch; }
.hardware-intro .button { width: min(100%, 240px); }
.media-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  height: clamp(210px, 18vw, 270px);
  padding: 0;
  background: var(--surface);
}
.media-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--scrim) 0%, transparent 45%);
  pointer-events: none;
}
.media-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.media-card h3 { position: absolute; z-index: 1; left: 1rem; top: 1rem; max-width: 11ch; font-size: clamp(1.05rem, 1.35vw, 1.4rem); color: #fff; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.gallery-item { cursor: pointer; color: var(--text); text-align: left; font: inherit; display: grid; gap: 0.35rem; }
.gallery-item:hover { border-color: var(--line-strong); }
.thumb-img { display: block; width: 100%; height: auto; border-radius: 2px; border: 1px solid var(--line); margin-bottom: 0.45rem; }
.gallery-item small { color: var(--muted); font-family: var(--font-mono); font-size: 0.74rem; }
.gallery-item strong { font-size: 0.92rem; font-weight: 600; }
.gallery-item .ok { color: var(--green); }
.gallery-item .nok { color: var(--red); }

/* Page hero */
.page-hero { padding-top: 5rem; padding-bottom: 3rem; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr); gap: 3rem; align-items: center; }
.page-hero-media img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }

/* Product heroes */
.product-hero {
  position: relative;
  isolation: isolate;
  min-height: min(790px, calc(100svh - 68px));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: clamp(5rem, 9vh, 7rem);
  padding-bottom: clamp(4rem, 8vh, 6rem);
  color-scheme: dark;
  background: #060708;
}
.product-hero-backdrop,
.product-hero-scrim {
  position: absolute;
  inset: 0;
}
.product-hero-backdrop { z-index: -3; }
.product-hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.product-hero-scrim {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.98) 0%, rgba(5, 6, 8, 0.93) 31%, rgba(5, 6, 8, 0.44) 59%, rgba(5, 6, 8, 0.08) 100%),
    linear-gradient(0deg, rgba(5, 6, 8, 0.62) 0%, transparent 42%, rgba(5, 6, 8, 0.12) 100%);
}
.product-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(183, 47, 194, 0.55), transparent);
}
.product-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 650px) 1fr;
  min-height: 550px;
  align-items: end;
}
.product-hero-copy {
  align-self: center;
  gap: 1.45rem;
}
.product-hero .eyebrow { color: #cf66d7; }
.product-hero h1 {
  max-width: 12ch;
  color: #f8f9fb;
  font-size: clamp(3.15rem, 5.2vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.product-hero h1 em {
  display: block;
  color: #c23dcd;
  font-style: normal;
}
.product-hero .lead {
  max-width: 620px;
  color: rgba(238, 242, 246, 0.78);
  font-size: clamp(1.03rem, 1.2vw, 1.17rem);
}
.product-hero .button {
  min-height: 52px;
  padding-inline: 1.6rem;
}
.product-hero .button.primary {
  background: #a92ab5;
  box-shadow: 0 12px 38px rgba(146, 30, 158, 0.28);
}
.product-hero .button.primary:hover { background: #bf38ca; }
.product-hero .button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(7, 8, 10, 0.35);
  backdrop-filter: blur(8px);
}
.product-hero .button.secondary:hover { border-color: rgba(255, 255, 255, 0.75); }
.product-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin-top: 0.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.product-hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(238, 242, 246, 0.72);
  font-size: 0.78rem;
  white-space: nowrap;
}
.product-hero-points span::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid #cf66d7;
  transform: rotate(45deg);
}
:root[data-theme="light"] .product-hero { color: #f8f9fb; }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr); gap: 2rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.number-list { counter-reset: item; display: grid; gap: 0.75rem; padding: 0; list-style: none; }
.number-list li { counter-increment: item; position: relative; padding-left: 2.5rem; color: var(--text-soft); }
.number-list li::before { content: counter(item, decimal-leading-zero); position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; font-family: var(--font-mono); }

/* Platform section */
.platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}
.camera-scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.3rem;
}
.scale-card {
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.scale-card strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}
.scale-card span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.footnote {
  color: var(--muted);
  font-size: 0.82rem;
}
.platform-visual {
  padding: 0;
  min-height: 100%;
  overflow: hidden;
}
.platform-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.pipeline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
}
.pipeline-badges span {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-2);
  padding: 0.4rem 0.7rem;
  font-family: var(--font-mono);
}

/* Tech ecosystem */
.tech-ecosystem {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.logo-cloud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.logo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
}
.logo-tile svg, .logo-tile img {
  opacity: 0.55;
  transition: opacity 0.2s var(--ease-out);
  max-width: 130px;
  max-height: 44px;
  filter: var(--logo-filter);
}
.logo-tile:hover svg, .logo-tile:hover img {
  opacity: 1;
}
.logo-tile .logo-text {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.55;
  transition: opacity 0.2s var(--ease-out);
}
.logo-tile:hover .logo-text {
  opacity: 1;
}
.logo-tile small {
  color: var(--muted);
  font-size: 0.72rem;
}

/* Application grid */
.application-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.application-grid .card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }

/* Contact form */
.contact-form { display: grid; gap: 1.25rem; }
.operator-info {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.operator-info address {
  margin-top: 0.75rem;
  font-style: normal;
  line-height: 1.75;
}
.operator-info .muted { margin-top: 0.75rem; }
.form-group {
  position: relative;
  display: grid;
  gap: 0.4rem;
}
/* [hidden] must win over layout rules like the grid above */
[hidden] {
  display: none !important;
}
.form-group label {
  display: block;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 500;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0.85rem 0.9rem;
  font: inherit;
  transition: border-color 0.2s var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; }
.form-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* CTA */
.cta { text-align: center; display: grid; justify-items: center; gap: 1.1rem; border: 1px solid var(--line); background: var(--surface); padding: clamp(2.5rem, 5vw, 4rem); }

/* Footer */
.site-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 4rem max(5vw, calc((100vw - var(--maxw)) / 2)) 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.footer-brand .brand {
  font-size: 1.05rem;
}
.footer-brand .brand-logo { width: 190px; }
.footer-brand p {
  font-size: 0.88rem;
  max-width: 280px;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.footer-social a:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.footer-nav {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.footer-nav h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.footer-nav a {
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
.footer-contact {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.footer-contact h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.footer-contact p {
  font-size: 0.88rem;
  line-height: 1.6;
}
.footer-contact a:hover { color: var(--text); }
.footer-contact .phone {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text);
}
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-bottom a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}
.footer-bottom a:hover { color: var(--text); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), border-color 0.2s;
  z-index: 40;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--text);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  color: var(--text);
  font-size: 0.9rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 1rem; background: rgba(0,0,0,0.88); backdrop-filter: blur(6px); }
.lightbox.open { display: grid; }
.lightbox-panel { width: min(860px, 100%); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); }
.lightbox-visual { height: min(54vw, 480px); margin-bottom: 1rem; border-radius: 2px; background: var(--bg) center / contain no-repeat; border: 1px solid var(--line); }
.lightbox-close { position: fixed; top: 1.2rem; right: 1.2rem; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 1.6rem; cursor: pointer; transition: border-color 0.2s; display: grid; place-items: center; }
.lightbox-close:hover { border-color: var(--text); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Hamburger */
.hamburger {
  display: none;
  width: 24px;
  height: 18px;
  position: relative;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s var(--ease-out);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Responsive */
@media (max-width: 1050px) {
  .hero-layout, .page-hero-grid, .split { grid-template-columns: 1fr; }
  .product-hero-layout {
    grid-template-columns: 1fr;
    min-height: 650px;
    align-content: center;
  }
  .product-hero-copy { max-width: 650px; }
  .product-hero-scrim {
    background:
      linear-gradient(90deg, rgba(5, 6, 8, 0.97) 0%, rgba(5, 6, 8, 0.86) 56%, rgba(5, 6, 8, 0.25) 100%),
      linear-gradient(0deg, rgba(5, 6, 8, 0.72) 0%, transparent 58%);
  }
  .hero-layout { min-height: 620px; }
  .hero-copy { max-width: 650px; }
  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(5, 6, 8, 0.97) 0%, rgba(5, 6, 8, 0.85) 55%, rgba(5, 6, 8, 0.24) 100%),
      linear-gradient(0deg, rgba(5, 6, 8, 0.7) 0%, transparent 55%);
  }
  .platform-grid { grid-template-columns: 1fr; }
  .product-card, .hardware-grid, .case-study-grid, .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hardware-intro { grid-column: 1 / -1; }
  .integration-grid, .application-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-cloud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-bottom { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
  .section { padding: 4rem 5vw; }
  .section.compact { padding-block: 3rem; }
  .site-header { min-height: 60px; padding: 0 5vw; }
  .brand-logo { width: 150px; }
  .site-footer { padding: 3rem 5vw 2rem; }

  .nav-toggle { display: none; }
  .hamburger { display: flex; order: 3; }
  .site-nav { margin-left: 0; }
  .theme-toggle { margin-left: auto; order: 2; }

  .site-nav {
    position: fixed;
    inset: 60px 0 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg);
    font-size: 1.25rem;
  }
  .site-nav.open { display: flex; }

  .product-hero {
    min-height: auto;
    padding: 4.5rem 5vw 3.5rem;
  }
  .product-hero-layout { min-height: 720px; }
  .product-hero-backdrop img { object-position: 69% center; }
  .product-hero-scrim {
    background:
      linear-gradient(90deg, rgba(5, 6, 8, 0.94) 0%, rgba(5, 6, 8, 0.76) 100%),
      linear-gradient(0deg, rgba(5, 6, 8, 0.92) 0%, rgba(5, 6, 8, 0.3) 54%, rgba(5, 6, 8, 0.75) 100%);
  }
  .product-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 12.5vw, 3.8rem);
    line-height: 1.06;
  }
  .product-hero .lead { font-size: 0.98rem; }
  .product-hero .actions { align-items: stretch; }
  .product-hero .button { flex: 1 1 190px; }
  .product-hero-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .hero {
    min-height: calc(100svh - 60px);
    padding-top: 5rem;
    padding-bottom: 3rem;
  }
  .hero-layout { min-height: 560px; align-items: center; }
  .hero-backdrop img { object-position: 67% center; }
  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(5, 6, 8, 0.94) 0%, rgba(5, 6, 8, 0.75) 100%),
      linear-gradient(0deg, rgba(5, 6, 8, 0.9) 0%, rgba(5, 6, 8, 0.25) 52%, rgba(5, 6, 8, 0.72) 100%);
  }
  .hero h1 { font-size: clamp(2.75rem, 13vw, 4.15rem); }
  .hero .lead { max-width: 34rem; font-size: 1rem; }
  .hero .actions { align-items: stretch; }
  .hero .button { flex: 1 1 190px; }
  .hero-points { grid-template-columns: 1fr; gap: 0.6rem; }
  .hero-points, .grid-2, .grid-3, .grid-4, .product-card, .process-row, .integration-grid, .hardware-grid, .gallery-grid, .application-grid, .case-study-grid, .process-steps, .camera-scale, .tech-ecosystem, .logo-cloud, .hardware-showcase { grid-template-columns: 1fr; }
  .product-card img { grid-row: auto; }
  .site-footer { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
