:root {
  color-scheme: dark;
  --bg: #100e17;
  --panel: #15121e;
  --line: #30273e;
  --text: #f7f3ff;
  --muted: #bbb1c9;
  --accent: #c4a0ff;
  --vivid: #b68bff;
  --mint: #a4ffda;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sans: "Space Grotesk", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
p, h1, h2, h3 { margin: 0; }
.shell { width: min(100% - 112px, 1296px); margin-inline: auto; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 8px 14px; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }

.header { position: relative; z-index: 2; background: #100e17; border-bottom: 1px solid #2a2334; }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 11px; align-items: center; font-size: 1.28rem; font-weight: 700; line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.brand-dash, .brand-dot { color: var(--accent); }
.brand-mark { display: block; position: relative; flex: none; width: 30px; height: 30px; border: 1px solid #7856a8; background: #251936; }
.brand-mark::before { content: ""; position: absolute; inset: 5px 7px; background: var(--accent); clip-path: polygon(55% 0, 100% 0, 64% 40%, 98% 40%, 29% 100%, 43% 55%, 3% 55%); }
nav { display: flex; align-items: center; gap: clamp(18px, 3.1vw, 48px); font-size: .92rem; color: var(--muted); font-weight: 500; }
nav a:hover, .footer a:hover { color: var(--accent); }
.nav-contact { border: 1px solid #57416f; color: var(--text); padding: 8px 18px; }
.menu-button { display: none; background: transparent; color: var(--text); border: 1px solid #57416f; padding: 6px 12px; }

.hero { position: relative; display: grid; align-content: space-between; isolation: isolate; overflow: hidden; min-height: clamp(600px, 53vw, 770px); background: #100e17; border-bottom: 1px solid var(--line); }
.hero-image { position: absolute; z-index: -3; inset: 0 0 0 auto; width: 72%; height: 100%; object-fit: cover; object-position: 55% center; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -2; inset: 0; pointer-events: none; }
.hero::before { background: linear-gradient(90deg, #100e17 1%, #100e17 26%, #100e17ed 34%, #100e1775 50%, #100e1700 69%), linear-gradient(0deg, #100e17 0%, #100e1720 24%, transparent 85%, #100e1780); }
.hero::after { z-index: -1; opacity: .46; background-image: linear-gradient(#ac81ea19 1px, transparent 1px), linear-gradient(90deg, #ac81ea19 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(110deg, #000 0%, transparent 73%); }
.hero-body { padding-block: clamp(93px, 10vw, 155px) 57px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #dec8ff; font: 500 .875rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.status-light { display: inline-block; flex: none; width: 8px; height: 8px; background: var(--mint); box-shadow: 0 0 12px #a4ffda9c; border-radius: 50%; }
.hero h1 { margin-top: 21px; font-size: clamp(4rem, 8.15vw, 8rem); line-height: .96; letter-spacing: -.086em; }
h1 span, h2 span { color: var(--accent); }
.hero p { color: #dfd6ea; max-width: 430px; margin-top: 28px; font-size: clamp(1.05rem, 1.6vw, 1.27rem); line-height: 1.57; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 51px; padding: 11px 20px; font-size: .97rem; font-weight: 700; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--vivid); color: #150e20; border: 1px solid var(--vivid); }
.button-primary:hover { background: #ceaeff; border-color: #ceaeff; }
.button-secondary { border: 1px solid #6c527f; background: #161120aa; }
.button-secondary:hover { border-color: var(--accent); background: #281d38; }
.hero-footer { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #5741688a; color: #d3bfeb; font: 500 .78rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.hero-index { display: inline-flex; align-items: center; gap: 12px; }
.hero-index i { width: 17px; height: 10px; background: var(--accent); clip-path: polygon(0 43%, 23% 43%, 23% 0, 55% 0, 55% 77%, 69% 77%, 69% 43%, 100% 43%, 100% 61%, 81% 61%, 81% 100%, 44% 100%, 44% 23%, 34% 23%, 34% 61%, 0 61%); }
.hero-index b { width: 3px; height: 3px; background: #aa7ce4; }
.hero-caption b { color: var(--accent); padding-inline: 5px; }

.section { padding-block: clamp(66px, 8.2vw, 118px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 37px; }
.section-heading > p { max-width: 320px; color: var(--muted); }
.section-label { color: var(--accent); margin-bottom: 12px; }
.section-label::before { content: ""; width: 21px; height: 1px; background: var(--accent); }
h2 { font-size: clamp(2.55rem, 5vw, 5.2rem); line-height: 1.01; letter-spacing: -.07em; }
h3 { font-size: 1.35rem; letter-spacing: -.026em; line-height: 1.25; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.service { position: relative; padding: 26px; border: 1px solid var(--line); background: linear-gradient(142deg, #1d1728, #15121e 71%); transition: border-color .25s, background-color .25s; }
.service:hover { border-color: #8c62b9; }
.service::after { position: absolute; top: -1px; left: -1px; width: 15px; height: 15px; content: ""; border: solid #b78be5; border-width: 1px 0 0 1px; }
.service p, .steps p { margin-top: 10px; color: var(--muted); }
.service-icon { position: relative; display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 31px; border: 1px solid #5b4278; color: var(--accent); background: #271a38; font: 500 1rem var(--mono); }
.chip::before { content: ""; width: 14px; height: 15px; border: 1.5px solid var(--accent); }
.chip::after { content: ""; position: absolute; inset: 13px 10px; background: repeating-linear-gradient(0deg, var(--accent) 0 1px, transparent 1px 5px); mask: linear-gradient(90deg, black 0 4px, transparent 4px calc(100% - 4px), black calc(100% - 4px)); }
.pulse::before { content: ""; width: 24px; height: 15px; background: var(--accent); clip-path: polygon(0 48%, 25% 48%, 37% 4%, 58% 85%, 70% 48%, 100% 48%, 100% 58%, 77% 58%, 57% 100%, 37% 27%, 31% 58%, 0 58%); }

.lab { border-block: 1px solid var(--line); background: radial-gradient(ellipse at 70% 110%, #24173a, #14101e 68%); padding-block: clamp(50px, 6vw, 90px); }
.lab-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(26px, 6vw, 90px); }
.lab-copy > p:last-child { color: var(--muted); margin-top: 19px; max-width: 355px; }
.instrument { padding: 15px; background: #100e16; border: 1px solid #5b4574; box-shadow: 0 20px 55px #08060b64; }
.instrument-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); font: 500 .82rem var(--mono); text-transform: uppercase; }
.instrument-header span:first-child { display: flex; align-items: center; gap: 8px; }
#scope { width: 100%; height: 200px; display: block; border: 1px solid #463657; background: #120e1d; }
.instrument-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.wave-options { display: flex; gap: 5px; }
.wave-options button { background: #171320; border: 1px solid #463655; color: #dfd3ed; padding: 8px 9px; font: 500 .875rem var(--mono); }
.wave-options button:hover, .wave-options button[aria-pressed="true"] { border-color: var(--accent); color: #eadbff; background: #392451; }
.frequency { display: grid; grid-template-columns: 1fr auto; column-gap: 9px; flex-grow: 1; max-width: 200px; min-width: 140px; color: var(--muted); font: 500 .875rem/1.3 var(--mono); }
.frequency output { color: var(--accent); white-space: nowrap; }
.frequency input { grid-column: 1 / -1; width: 100%; margin: 5px 0 0; accent-color: var(--accent); cursor: pointer; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.steps li { position: relative; border-top: 1px solid #65488a; padding-top: 22px; }
.steps li::before { position: absolute; content: ""; width: 8px; height: 8px; top: -4px; background: var(--accent); box-shadow: 0 0 13px #b782ed76; }
.contact { border-block: 1px solid #5a4074; background: radial-gradient(ellipse at 82% 50%, #36204f, transparent 61%), repeating-linear-gradient(90deg, #b785e716 0 1px, transparent 1px 37px), #20162d; }
.contact-inner { padding-block: clamp(58px, 7vw, 96px); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.contact p:last-child { max-width: 460px; margin-top: 17px; color: #d8c9e8; }
.contact-actions { display: grid; justify-items: start; gap: 10px; }
.email { font-family: var(--mono); text-decoration: underline; text-underline-offset: 4px; }
.copy { background: transparent; border: 0; padding: 0; color: var(--accent); font-size: .9rem; }
.copy:hover { text-decoration: underline; }
.copy-status { min-height: 1.3em; font-size: .85rem; color: var(--mint); }
.footer-inner { color: var(--muted); font-size: .875rem; }
.footer-inner .brand { color: var(--text); }

@media (max-width: 850px) {
  .shell { width: calc(100% - 64px); }
  .section-heading { align-items: start; flex-direction: column; gap: 14px; }
  .service { padding: 20px; }
  .lab-grid { gap: 32px; }
}

@media (max-width: 650px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; flex-wrap: wrap; }
  .header-inner:has(.menu-button[aria-expanded]) { row-gap: 0; }
  nav { width: 100%; padding-bottom: 14px; flex-wrap: wrap; gap: 8px 15px; }
  .js .menu-button { display: block; }
  .js .menu-button[aria-expanded="false"] + nav { display: none; }
  .hero { min-height: 638px; }
  .hero-image { width: 100%; height: 66%; object-position: 58% center; }
  .hero::before { background: linear-gradient(0deg, #100e17 17%, #100e17f9 29%, #100e17ae 59%, #100e1725 100%), linear-gradient(90deg, #100e1773, transparent 85%); }
  .hero-body { padding-top: 216px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(3.2rem, 11vw, 5rem); margin-top: 14px; }
  .hero p { margin-top: 20px; }
  .hero-actions { margin-top: 22px; }
  .hero-footer { min-height: 47px; }
  .hero-caption { display: none; }
  .service-grid, .lab-grid, .steps, .contact-inner { grid-template-columns: 1fr; }
  .service-icon { margin-bottom: 15px; }
  .instrument { padding: 10px; }
  #scope { height: 165px; }
  .frequency { max-width: 100%; }
  .footer-inner { min-height: auto; padding-block: 19px; flex-wrap: wrap; }
  .footer-inner > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
