/* ═══════════════════════════════════════════════════════════════
   WILLIAMS QUANTUM — elite deep-tech dark mode
   Base #0B0F19 · Headers #FFFFFF · Sub #94A3B8 · Accent #00D2FF
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0B0F19;
  --panel: #111827;
  --panel-hi: #16202F;
  --white: #FFFFFF;
  --slate: #94A3B8;
  --slate-dim: #5B6B82;
  --cyan: #00D2FF;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  --green: #22C55E;
  --radius: 18px;
  --font-ui: "Segoe UI", Inter, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--slate);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Faint engineering grid backdrop — pure CSS, zero assets */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(0, 210, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark { width: 30px; height: 30px; flex: none; }

.brand-word {
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 14px;
}

.topnav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.topnav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.topnav a:hover { color: var(--cyan); }

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate);
}

/* ── Status dot ──────────────────────────────────────────────── */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot-live {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green), 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50%      { opacity: 0.6; box-shadow: 0 0 4px var(--green), 0 0 0 7px rgba(34, 197, 94, 0); }
}

/* ── Bento grid ──────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px 40px;
}

.tile {
  background: linear-gradient(160deg, var(--panel-hi), var(--panel) 65%);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  /* sequential slide-up + fade, 0.3s transition, staggered by --i */
  opacity: 0;
  transform: translateY(26px);
  animation: tile-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.3s);
  will-change: transform, opacity;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

/* hover: scale exactly 1% + neon cyan ring (borderless → shadow ring) */
.tile:hover {
  transform: scale(1.01);
  box-shadow:
    0 0 0 1.5px var(--cyan),
    0 0 26px var(--cyan-glow),
    0 18px 44px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

@keyframes tile-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; opacity: 1; transform: none; }
  .dot-live { animation: none; }
}

/* ── Tile anatomy ────────────────────────────────────────────── */
.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 5px 11px;
  border-radius: 999px;
}

.chip-license { color: var(--cyan);  background: rgba(0, 210, 255, 0.09);  box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.4); }
.chip-proto   { color: #FBBF24;     background: rgba(251, 191, 36, 0.08); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35); }
.chip-rd      { color: var(--slate); background: rgba(148, 163, 184, 0.08); box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3); }
.chip-concept { color: var(--green); background: rgba(34, 197, 94, 0.08);  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.45); }

.ref {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--slate-dim);
}

.tile-title {
  color: var(--white);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.tile-desc { font-size: 14.5px; margin-bottom: 16px; }

.spec-list {
  list-style: none;
  font-size: 13px;
}

.spec-list li {
  padding: 6px 0 6px 20px;
  position: relative;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.spec-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.schematic {
  background: rgba(11, 15, 25, 0.55);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 18px;
  /* uniform box across tiles — SVG letterboxes inside, titles stay aligned */
  aspect-ratio: 200 / 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schematic svg { display: block; width: 100%; height: 100%; }

/* ── Grid placement (desktop) ────────────────────────────────── */
.hero        { grid-column: span 8;  grid-row: span 2; }
.terminal    { grid-column: span 4;  grid-row: span 2; }
.product-hero{ grid-column: span 4; }
.product     { grid-column: span 4; }
.intake      { grid-column: span 12; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 44px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--cyan);
  margin-bottom: 20px;
}

.hero-title {
  color: var(--white);
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--slate);
  margin-bottom: 36px;
  max-width: 520px;
}

.btn-primary {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(0, 210, 255, 0.07);
  border: 1.5px solid var(--cyan);
  border-radius: 10px;
  padding: 15px 30px;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn-primary:hover {
  background: var(--cyan);
  color: #06202B;
  box-shadow: 0 0 30px var(--cyan-glow);
}

/* ── Terminal tile ───────────────────────────────────────────── */
.terminal {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #0D1420;
}

.term-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #26324A; }
.term-dots i:first-child { background: rgba(255, 95, 86, 0.55); }
.term-dots i:nth-child(2) { background: rgba(255, 189, 46, 0.55); }
.term-dots i:last-child { background: rgba(39, 201, 63, 0.55); }

.term-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-dim);
  letter-spacing: 0.08em;
}

.term-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 2;
  flex: 1;
}

.t-line { white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--cyan); }
.t-dim { color: var(--slate-dim); }
.t-status { color: var(--green); display: flex; align-items: center; gap: 9px; }
.t-status b { letter-spacing: 0.08em; }

.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Engine console (investor-facing terminal re-skin) ───────── */
.engine-body {
  padding: 22px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eng-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.eng-status span {
  color: var(--slate-dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-left: auto;
  text-align: right;
}

.eng-rows {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.eng-rows li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
}

.eng-rows li b {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.eng-rows li span { font-size: 12.5px; color: var(--slate); line-height: 1.45; }

.eng-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--slate-dim);
}

.eng-link.is-live { color: var(--green); }

/* ── Intake tile ─────────────────────────────────────────────── */
.intake-mail {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.7vw, 19px);
  color: var(--cyan);
  text-decoration: none;
  padding: 13px 18px;
  margin-top: 10px;
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 10px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
  word-break: break-all;
}

.intake-mail:hover {
  background: rgba(0, 210, 255, 0.12);
  box-shadow: 0 0 22px var(--cyan-glow);
}

.intake-row { display: flex; gap: 10px; align-items: stretch; }
.intake-row .intake-mail { flex: 1; }

.copy-btn {
  margin-top: 10px;
  width: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-btn svg { width: 17px; height: 17px; }

.copy-btn:hover {
  background: rgba(0, 210, 255, 0.12);
  box-shadow: 0 0 22px var(--cyan-glow);
}

.copy-btn.copied { color: var(--green); border-color: var(--green); }

.intake-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--slate-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ── Intake form ─────────────────────────────────────────────── */
.intake-form { margin-top: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { margin-bottom: 14px; }

.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-dim);
}

.field-label em { font-style: normal; opacity: 0.7; text-transform: none; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--white);
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 18px rgba(0, 210, 255, 0.18);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--slate) 50%), linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.field option { background: var(--panel); color: var(--white); }

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-send { cursor: pointer; font-size: 13px; padding: 13px 26px; }
.btn-send:disabled { opacity: 0.45; cursor: wait; }

.form-status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.form-status.is-ok { color: var(--green); }
.form-status.is-err { color: #F87171; }

.intake-alt { margin-top: 22px; }

.intake-mail-static { cursor: default; }
.intake-mail-static:hover {
  background: rgba(0, 210, 255, 0.06);
  box-shadow: none;
}

/* ── Explore link (tile → product page) ──────────────────────── */
.explore {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}

/* stretched link: the whole product tile is clickable */
.explore::after {
  content: "";
  position: absolute;
  inset: 0;
}

.explore:hover { text-shadow: 0 0 12px var(--cyan-glow); }

/* ── Product detail pages ────────────────────────────────────── */
.prod {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 28px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prod .tile {
  animation-delay: 0.05s;
}

.prod .tile:nth-of-type(2) {
  animation-delay: 0.35s;
}

.crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--slate-dim);
  text-decoration: none;
}

.crumb:hover { color: var(--cyan); }

.prod-title { font-size: clamp(30px, 4vw, 44px); }

.prod-hero .schematic { max-width: 600px; }
.prod-hero .tile-desc b { color: var(--white); font-weight: 600; }

.nda-box .btn-primary { margin-top: 14px; }

.render-fig {
  margin: 0 0 18px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(11, 15, 25, 0.55);
}

.render-fig img {
  display: block;
  width: 100%;
  height: auto;
}

.mech-box .spec-list li b { color: var(--cyan); font-weight: 600; }
.mech-box .intake-note { margin-top: 14px; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px 34px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate-dim);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero, .terminal { grid-column: span 12; grid-row: auto; }
  .product-hero, .product { grid-column: span 6; }
}

@media (max-width: 720px) {
  .bento { gap: 14px; padding: 8px 16px 30px; }
  .tile { padding: 24px 20px; }
  .hero { padding: 40px 26px; }
  .product-hero, .product, .intake { grid-column: span 12; }
  .topnav { display: none; }
  .topbar { padding: 18px 16px; }
}
