/* Strategic Stealth Machines — deep-tech site
   Visual system from the redesign blueprint: deep navy base, electric cyan,
   violet tech layer, engineering amber, high-contrast text. */

:root {
  color-scheme: dark;
  --base: #050A12;
  --panel: #0A1220;
  --panel-2: #0E1829;
  --line: #1B2A40;
  --line-bright: #2A3F5E;
  --text: #F8FBFF;
  --muted: #9AABC2;
  --cyan: #18D6FF;
  --violet: #8B5CF6;
  --amber: #FFB000;
  --alert: #FF5C7A;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 64ch;
}
/* The brief fixes a dark, mission-control system; the light theme keeps the same palette. */
:root[data-theme="light"], :root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.headline {
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.95;
  margin: 0;
}
h1.headline { font-size: clamp(2.7rem, 8vw, 6.4rem); }
h2.title {
  font-variation-settings: "wdth" 118;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
}
h3 {
  font-variation-settings: "wdth" 110;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 .4rem;
}
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 54ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 10, 18, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 36px; height: 24px; flex: none; }
.brand span { font-variation-settings: "wdth" 120; font-weight: 800; font-size: .95rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--cyan); padding-bottom: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-bright); color: var(--text); font: inherit; padding: 8px 12px; border-radius: 4px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 4px;
  font: inherit; font-weight: 700; font-variation-settings: "wdth" 112;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--cyan); background: var(--cyan); color: var(--base);
}
.btn:hover { background: #5BE3FF; border-color: #5BE3FF; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-bright); }
.btn.ghost:hover { border-color: var(--cyan); background: rgba(24, 214, 255, .08); }
.btn.small { padding: 9px 16px; font-size: .95rem; }
.nav .btn { color: var(--base); }

@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 15px var(--gutter); border-top: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cyan); padding-bottom: 15px; }
  .nav .btn { margin: 12px var(--gutter) 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92vh, 860px);
  display: flex; align-items: flex-end;
  padding: 120px 0 clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--line);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,10,18,.94) 0%, rgba(5,10,18,.78) 38%, rgba(5,10,18,.15) 75%),
    linear-gradient(0deg, rgba(5,10,18,1) 0%, rgba(5,10,18,0) 40%);
}
/* single orchestrated motion: one slow scan line across the hero */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(24,214,255,.7), transparent);
  box-shadow: 0 0 18px rgba(24,214,255,.5);
  animation: scan 9s linear infinite;
}
@keyframes scan { from { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } to { transform: translateY(min(92vh, 860px)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero::after { display: none; } }
.hero h1 { max-width: 11ch; margin-bottom: 26px; }
.hero .lede { color: #C9D5E6; }
.hero .sub { color: var(--muted); max-width: 56ch; font-size: 1rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.domains { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 760px; color: var(--muted); font-size: .95rem; }
.domains span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); margin-right: 8px; vertical-align: middle; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(72px, 10vw, 128px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero .bg { position: absolute; inset: 0; z-index: -2; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,10,18,.96) 30%, rgba(5,10,18,.5)); }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); margin: 10px 0 20px; }
.crumb { color: var(--muted); font-size: .95rem; text-decoration: none; }
.crumb:hover { color: var(--cyan); }

/* ---------- Sections ---------- */
.block { padding: clamp(64px, 9vw, 120px) 0; border-bottom: 1px solid var(--line); }
.block.alt { background: var(--panel); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 56px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .section-head { grid-template-columns: 1fr; } }

/* Positioning statement */
.statement { padding: clamp(64px, 9vw, 120px) 0; border-bottom: 1px solid var(--line); }
.statement p.big {
  font-variation-settings: "wdth" 118; font-weight: 700;
  font-size: clamp(1.7rem, 3.8vw, 2.9rem); line-height: 1.12; letter-spacing: -0.01em;
  max-width: 24ch; margin: 0;
}
.statement .path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 36px; color: var(--muted); }
.statement .path b { color: var(--text); font-weight: 600; padding: 8px 14px; border: 1px solid var(--line-bright); border-radius: 4px; }
.statement .path i { font-style: normal; color: var(--cyan); }

/* ---------- Deep-tech stack (interactive) ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.layers button {
  width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 4px 1fr auto; gap: 0 18px; align-items: center;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 16px 18px 16px 0; font: inherit;
  transition: border-color .2s, background .2s;
}
.layers button::before { content: ""; align-self: stretch; border-radius: 6px 0 0 6px; background: var(--line-bright); }
.layers .lname { font-variation-settings: "wdth" 120; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 1.02rem; }
.layers .lsub { color: var(--muted); font-size: .92rem; }
.layers button:hover { border-color: var(--line-bright); }
.layers button[aria-selected="true"] { border-color: var(--cyan); background: rgba(24, 214, 255, .07); }
.layers button[aria-selected="true"]::before { background: var(--cyan); }
.layers li:nth-child(1) button { margin: 0 12%; width: 76%; }
.layers li:nth-child(2) button { margin: 0 9%;  width: 82%; }
.layers li:nth-child(3) button { margin: 0 6%;  width: 88%; }
.layers li:nth-child(4) button { margin: 0 3%;  width: 94%; }
.layer-detail {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column;
}
.layer-detail .bgimg { position: absolute; inset: 0; z-index: 0; opacity: .18; }
.layer-detail .bgimg img { width: 100%; height: 100%; object-fit: cover; }
.layer-detail > *:not(.bgimg) { position: relative; z-index: 1; }
.layer-detail .kicker { color: var(--cyan); font-weight: 600; margin-bottom: 6px; }
.layer-detail h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-variation-settings: "wdth" 120; font-weight: 800; }
.layer-detail ul { margin: 12px 0 0; padding: 0; list-style: none; }
.layer-detail li { padding: 10px 0; border-top: 1px solid var(--line); }
.layer-detail .where { margin-top: auto; padding-top: 20px; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) {
  .stack { grid-template-columns: 1fr; }
  .layers li button { margin: 0 !important; width: 100% !important; }
}

/* ---------- Platforms ---------- */
.platforms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.platform {
  grid-column: span 2; position: relative; display: flex; flex-direction: column;
  padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  text-decoration: none; min-height: 260px;
}
.platform:nth-child(4), .platform:nth-child(5) { grid-column: span 3; }
.platform:hover { border-color: var(--cyan); }
.platform .pname { font-variation-settings: "wdth" 122; font-weight: 800; text-transform: uppercase; font-size: 1.25rem; letter-spacing: .01em; line-height: 1.1; margin-bottom: 12px; }
.platform .pname small { display: block; color: var(--cyan); font-size: .8rem; letter-spacing: .08em; margin-bottom: 2px; font-weight: 700; }
.platform p { color: var(--muted); font-size: 1rem; }
.platform .more { margin-top: auto; font-weight: 600; color: var(--cyan); }
.platform svg.glyph { width: 44px; height: 44px; margin-bottom: 20px; stroke: var(--cyan); fill: none; stroke-width: 1.5; }
@media (max-width: 980px) { .platform, .platform:nth-child(4), .platform:nth-child(5) { grid-column: span 3; } }
@media (max-width: 620px) { .platforms { grid-template-columns: 1fr; } .platform, .platform:nth-child(4), .platform:nth-child(5) { grid-column: auto; min-height: 0; } }

/* ---------- Labs ---------- */
.labs { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.labs figure { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.labs figure img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.lab-list { list-style: none; margin: 0; padding: 0; }
.lab-list li { display: grid; grid-template-columns: 10rem 1fr; gap: 4px 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.lab-list li:last-child { border-bottom: 1px solid var(--line); }
.lab-list b { font-variation-settings: "wdth" 120; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.lab-list span { color: var(--muted); }
@media (max-width: 900px) { .labs { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .lab-list li { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-2); display: flex; flex-direction: column; }
.project img { aspect-ratio: 17 / 10; object-fit: cover; width: 100%; }
.project .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.project h3 { font-size: 1.15rem; }
.project p { color: var(--muted); font-size: .98rem; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 6px 0 16px; font-size: .88rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.trl { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.trl i { width: 7px; height: 10px; border-radius: 1px; background: var(--line-bright); }
.trl i.on { background: var(--amber); }
.project .go { margin-top: auto; font-weight: 600; color: var(--cyan); text-decoration: none; }
.project .go:hover { text-decoration: underline; }
@media (max-width: 980px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .projects { grid-template-columns: 1fr; } }

/* ---------- Industries ---------- */
.industries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-bright); }
.industries > div { padding: 24px 24px 10px; border-bottom: 1px solid var(--line); }
.industries > div:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.industries > div:nth-child(3n+1) { padding-left: 0; }
.industries h3 { font-variation-settings: "wdth" 120; text-transform: uppercase; font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.industries p { color: var(--muted); font-size: .96rem; }
@media (max-width: 980px) {
  .industries { grid-template-columns: 1fr 1fr; }
  .industries > div, .industries > div:not(:nth-child(3n+1)), .industries > div:nth-child(3n+1) { padding: 20px 16px 6px 0; border-left: 0; }
}
@media (max-width: 520px) { .industries { grid-template-columns: 1fr; } }

/* ---------- Digital twin simulator ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
.sim-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: clamp(20px, 3vw, 32px); }
.sim-panel h3 { margin-bottom: 18px; }
.control { margin-bottom: 22px; }
.control label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 8px; }
.control output { color: var(--cyan); font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; }
.control .range-hint { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type="range"] { width: 100%; accent-color: var(--cyan); height: 28px; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.readout { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; background: var(--base); }
.readout .k { color: var(--muted); font-size: .85rem; }
.readout .v { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; line-height: 1.2; }
.readout .v.ok { color: var(--cyan); } .readout .v.warn { color: var(--amber); } .readout .v.crit { color: var(--alert); }
.chart { border: 1px solid var(--line); border-radius: 6px; background: var(--base); padding: 12px 14px 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .cap { color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; }
.sim-note { color: var(--muted); font-size: .88rem; margin: 14px 0 0; }
.advice { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--cyan); background: rgba(24,214,255,.06); font-size: .96rem; }
.advice.warn { border-color: var(--amber); background: rgba(255,176,0,.07); }
.advice.crit { border-color: var(--alert); background: rgba(255,92,122,.08); }
@media (max-width: 900px) { .sim { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .readouts { grid-template-columns: 1fr; } }

/* ---------- Platform page details ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 64px; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.caps li { padding: 14px 0; border-top: 1px solid var(--line); }
.caps li b { display: block; }
.caps li span { color: var(--muted); font-size: .95rem; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.uses li { border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: var(--panel-2); }
.uses li b { display: block; margin-bottom: 6px; font-variation-settings: "wdth" 110; }
.uses li span { color: var(--muted); font-size: .96rem; }
@media (max-width: 860px) { .two-col, .caps { grid-template-columns: 1fr; } .uses { grid-template-columns: 1fr; } }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: clamp(20px, 3vw, 32px); }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--base);
  border: 1px solid var(--line-bright); border-radius: 4px; padding: 11px 12px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(24,214,255,.18); }
.form .status { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .95rem; }
.form .status.error { color: var(--alert); }
.contact-facts { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-facts li { padding: 14px 0; border-top: 1px solid var(--line); }
.contact-facts span { display: block; color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .contact-grid, .form { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta { padding: clamp(64px, 9vw, 112px) 0; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 80% 0%, rgba(139,92,246,.22), transparent 60%), radial-gradient(ellipse at 10% 100%, rgba(24,214,255,.14), transparent 55%), var(--base); }
.cta .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px 48px; align-items: end; }
.cta p { color: var(--muted); }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 820px) { .cta .wrap { grid-template-columns: 1fr; } .cta .actions { justify-content: flex-start; } }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 40px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--text); margin: 0 0 12px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .legal { grid-column: 1 / -1; max-width: none; border-top: 1px solid var(--line); padding-top: 20px; margin: 8px 0 0; }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; } }
