:root {
  --bg-base: #0D0D0F;
  --bg-surface: #141418;
  --border: #232329;
  --text-body: #E8E6DF;
  --text-muted: #7A7A85;
  --accent: #00E5FF;
  --bone: #F0EDE5;
  --danger: #FF4455;

  --font-display: 'Syne', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-base);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Global atmosphere: grid + grain + glows */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,229,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: gridShift 16s linear infinite;
  opacity: .4;
  z-index: -3;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(900px 460px at 8% -10%, rgba(0,229,255,var(--dynamic-glow, .12)), transparent 55%),
    radial-gradient(800px 420px at 86% 14%, rgba(0,229,255,.08), transparent 60%),
    radial-gradient(1000px 520px at 50% 120%, rgba(0,229,255,.05), transparent 65%);
}

.container { width: min(1180px, calc(100% - 2.8rem)); margin-inline: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-shadow: 0 0 14px rgba(0,229,255,.5); }

.topline {
  border-bottom: 1px solid rgba(0,229,255,.5);
  background: linear-gradient(180deg, rgba(20,20,24,.95), rgba(20,20,24,.78));
  box-shadow: 0 8px 26px rgba(0,0,0,.45), inset 0 -1px 0 rgba(0,229,255,.18);
}

.ticker-wrap {
  overflow: hidden;
  width: 100%;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 2rem;
  padding: .54rem 0;
  animation: tickerScroll 26s linear infinite;
  color: var(--accent);
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(0,229,255,.36);
}
.ticker-track span { white-space: nowrap; }

.header {
  border-bottom: 1px solid rgba(0,229,255,.7);
  background: rgba(13,13,15,.84);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .95rem 0;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .08em;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--bone);
  text-shadow: 0 0 18px rgba(0,229,255,.2);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  font: 500 13px/1 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent); }

.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  padding: 5.3rem 0 4.4rem;
  overflow: hidden;
}

.hero-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .55;
}

.hero-glow {
  position: absolute;
  width: 780px;
  height: 380px;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,229,255,.16) 0%, rgba(0,229,255,.06) 35%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 1;
}

.hero-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,229,255,.06) 0px,
      rgba(0,229,255,.06) 1px,
      transparent 2px,
      transparent 9px
    );
  opacity: .2;
  animation: scanPulse 7s ease-in-out infinite;
}

.kicker {
  margin: 0 0 .8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font: 500 12px/1 var(--font-mono);
}

h1, h2, h3 {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-display);
  letter-spacing: .02em;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.03;
  max-width: 12ch;
  text-shadow: 0 0 26px rgba(0,229,255,.12);
}

.lede {
  margin: 1rem 0 0;
  color: var(--text-muted);
  max-width: 64ch;
}

.cta-row {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.btn {
  border-radius: 2px;
  border: 1px solid var(--border);
  padding: .68rem 1.02rem;
  font: 500 14px/1 var(--font-body);
  letter-spacing: .05em;
  display: inline-block;
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,229,255,.12) inset, 0 0 24px rgba(0,229,255,.1);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(0,229,255,.35) inset, 0 0 36px rgba(0,229,255,.24);
}

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--bone); border-color: #3a3b46; }

.section {
  position: relative;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(680px 260px at 15% 15%, rgba(0,229,255,.07), transparent 65%);
  opacity: .55;
}

.section-tight { padding: 2.9rem 0; }

.section-head { margin-bottom: 1.4rem; }
.mono-label, .mono-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); letter-spacing: .07em; }
.mono-label { margin: 0 0 .45rem; color: var(--accent); text-transform: uppercase; }
.section-sub { margin: .35rem 0 0; color: var(--text-muted); }

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

.card {
  background:
    linear-gradient(170deg, rgba(255,255,255,.02), rgba(255,255,255,0) 40%),
    var(--bg-surface);
  border: 1px solid #2a2d37;
  border-radius: 2px;
  padding: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 10px 24px rgba(0,0,0,.32);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: 2px;
  pointer-events: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.card:hover::after {
  border-color: rgba(0,229,255,.42);
  box-shadow: 0 0 26px rgba(0,229,255,.16);
}

.tag {
  margin: 0 0 .55rem;
  text-transform: uppercase;
  color: var(--accent);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .1em;
  text-shadow: 0 0 10px rgba(0,229,255,.25);
}

.story-card h3 { font-size: 1.2rem; line-height: 1.2; }
.story-card p { margin: .55rem 0 0; color: var(--text-muted); }
.story-card .mono-meta { margin-top: .75rem; }

.robot-row { display: flex; justify-content: space-between; align-items: start; gap: .65rem; }
.robot-card h3 { font-size: 1.1rem; line-height: 1.14; }
.maker { margin: .45rem 0 .35rem; color: var(--text-muted); }

.status {
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .1em;
  border-radius: 999px;
  padding: .28rem .5rem;
  border: 1px solid;
  white-space: nowrap;
  text-shadow: 0 0 10px currentColor;
}

.status-active {
  color: var(--accent);
  border-color: rgba(0,229,255,.55);
  background: rgba(0,229,255,.14);
  box-shadow: inset 0 0 16px rgba(0,229,255,.12), 0 0 14px rgba(0,229,255,.2);
}
.status-proto {
  color: #e4cb85;
  border-color: rgba(228,203,133,.5);
  background: rgba(228,203,133,.12);
  box-shadow: inset 0 0 12px rgba(228,203,133,.12);
}
.status-deployed {
  color: #8fdbb0;
  border-color: rgba(143,219,176,.5);
  background: rgba(143,219,176,.12);
  box-shadow: inset 0 0 12px rgba(143,219,176,.12);
}
.status-discontinued {
  color: var(--danger);
  border-color: rgba(255,68,85,.5);
  background: rgba(255,68,85,.12);
}

.view-all-wrap { margin: 1rem 0 0; }
.view-all { font: 500 13px/1 var(--font-mono); }

.about-copy p { margin: 0 0 .8rem; }
.about-copy .mono-meta { margin-top: 1rem; }

.footer { padding: 1.6rem 0 2.3rem; }
.footer-row { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; }
.footer-logo { margin: 0; }
.footer-note { margin: .25rem 0 0; font: 400 12px/1.2 var(--font-mono); color: var(--text-muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: .95rem; }
.footer-links a { color: var(--text-muted); font-size: 13px; }
.footer-links a:hover { color: var(--accent); }

/* Safe reveal: content is visible by default unless JS marks page as reveal-ready */
.pre-reveal {
  opacity: 1;
  transform: none;
}

body.reveal-ready .pre-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease, transform .65s ease;
}

body.reveal-ready .pre-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 1rem)); }
}

@keyframes gridShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(42px); }
}

@keyframes scanPulse {
  0%, 100% { opacity: .16; }
  50% { opacity: .28; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track, body::before, .hero-scan { animation: none; }
  .pre-reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 980px) {
  .story-grid, .robot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .container { width: min(1180px, calc(100% - 1.3rem)); }
  .nav-row { flex-direction: column; align-items: start; gap: .8rem; }
  .story-grid, .robot-grid { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; align-items: start; }
}

/* =========================
   ATMOSPHERIC DEPTH LAYERS
   ========================= */

main {
  position: relative;
  isolation: isolate;
}

main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(640px 220px at 18% 18%, rgba(0,229,255,.075), transparent 70%),
    radial-gradient(560px 180px at 80% 46%, rgba(0,229,255,.055), transparent 72%),
    radial-gradient(520px 220px at 44% 84%, rgba(0,229,255,.045), transparent 74%);
  filter: blur(.2px);
}

main::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,.01) 0px,
    rgba(255,255,255,.01) 1px,
    transparent 2px,
    transparent 8px
  );
  opacity: .25;
}

/* section edge lines */
.section {
  overflow: clip;
}

.section::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0,229,255,.35),
    transparent
  );
  opacity: .35;
}

/* hero atmosphere */
.hero .container {
  position: relative;
  z-index: 2;
}

.hero .container::before {
  content: '';
  position: absolute;
  inset: -18px -28px;
  pointer-events: none;
  background: radial-gradient(circle at 24% 35%, rgba(0,229,255,.08), transparent 62%);
  filter: blur(6px);
  z-index: -1;
}

.hero .container::after {
  content: '';
  position: absolute;
  inset: -26px;
  pointer-events: none;
  border: 1px solid rgba(0,229,255,.1);
  border-radius: 2px;
  mask: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  opacity: .35;
}

/* subtle pulse line through hero */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,.46), transparent);
  filter: drop-shadow(0 0 12px rgba(0,229,255,.45));
  animation: pulseLine 5.8s ease-in-out infinite;
}

/* Elevated card interactions */
.story-card,
.robot-card {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.story-card:hover,
.robot-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 14px 36px rgba(0,0,0,.45),
    0 0 30px rgba(0,229,255,.13);
}

.story-card::before,
.robot-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 2px;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,.05),
    rgba(255,255,255,0) 28%,
    rgba(0,229,255,.06) 72%,
    rgba(255,255,255,.02)
  );
  opacity: .7;
}

.story-card::after,
.robot-card::after {
  background: radial-gradient(circle at 15% 15%, rgba(0,229,255,.2), transparent 50%);
}

/* status glow pulse */
.status-active {
  animation: statusPulseCyan 3.4s ease-in-out infinite;
}
.status-proto {
  animation: statusPulseAmber 3.8s ease-in-out infinite;
}
.status-deployed {
  animation: statusPulseGreen 4.2s ease-in-out infinite;
}

/* nav hover bars */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, rgba(0,229,255,.8), transparent);
  transition: transform .25s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* CTA shine pass */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -120%;
  left: -40%;
  width: 30%;
  height: 320%;
  transform: rotate(18deg);
  background: linear-gradient(180deg, transparent, rgba(0,229,255,.24), transparent);
  animation: ctaSweep 4.8s linear infinite;
}

/* footer ambiance */
.footer {
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,.35), transparent);
}

.footer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(550px 140px at 12% 100%, rgba(0,229,255,.08), transparent 70%);
}

/* extra motion primitives */
@keyframes pulseLine {
  0%, 100% { opacity: .2; }
  50% { opacity: .72; }
}

@keyframes ctaSweep {
  0% { left: -40%; }
  100% { left: 140%; }
}

@keyframes statusPulseCyan {
  0%, 100% { box-shadow: inset 0 0 16px rgba(0,229,255,.12), 0 0 12px rgba(0,229,255,.18); }
  50% { box-shadow: inset 0 0 18px rgba(0,229,255,.22), 0 0 20px rgba(0,229,255,.32); }
}

@keyframes statusPulseAmber {
  0%, 100% { box-shadow: inset 0 0 10px rgba(228,203,133,.12), 0 0 9px rgba(228,203,133,.12); }
  50% { box-shadow: inset 0 0 16px rgba(228,203,133,.22), 0 0 14px rgba(228,203,133,.24); }
}

@keyframes statusPulseGreen {
  0%, 100% { box-shadow: inset 0 0 10px rgba(143,219,176,.12), 0 0 9px rgba(143,219,176,.12); }
  50% { box-shadow: inset 0 0 16px rgba(143,219,176,.22), 0 0 14px rgba(143,219,176,.24); }
}

/* Progressive enhancement for large displays */
@media (min-width: 1280px) {
  .hero {
    padding-top: 6.1rem;
    padding-bottom: 5rem;
  }

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

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

  .card {
    padding: 1.1rem 1.05rem;
  }
}

/* tighter fallback on very small screens */
@media (max-width: 420px) {
  .topline { border-bottom-color: rgba(0,229,255,.35); }
  .ticker-track { font-size: 11px; letter-spacing: .06em; }
  .kicker { font-size: 11px; }
  .btn { width: 100%; text-align: center; }
  .footer-links { flex-wrap: wrap; }
}

/* =========================
   ARTICLE PAGE
   ========================= */
.article-main {
  position: relative;
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 4.2rem;
}

.article-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.back-home {
  display: inline-block;
  margin-bottom: 1rem;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.article-hero {
  position: relative;
  padding: 1rem 0 1.2rem;
  margin-bottom: 1.2rem;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: -16px -28px;
  background: radial-gradient(420px 180px at 30% 25%, rgba(0,229,255,.18), transparent 70%);
  filter: blur(10px);
  z-index: -1;
}

.article-title {
  font: 800 clamp(2rem, 4.8vw, 3.5rem)/1.07 var(--font-display);
  color: var(--bone);
  margin: 0 0 .9rem;
  letter-spacing: .02em;
  text-wrap: balance;
}

.article-subtitle {
  margin: 0 0 1rem;
  color: var(--text-body);
  font-size: 1.08rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: .4rem;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.article-prose {
  background:
    linear-gradient(170deg, rgba(255,255,255,.02), rgba(255,255,255,0) 45%),
    var(--bg-surface);
  border: 1px solid #2a2d37;
  border-radius: 2px;
  padding: 1.35rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 26px rgba(0,0,0,.36);
}

.article-prose p,
.article-prose li {
  font-size: 1.02rem;
  color: var(--text-body);
}

.article-prose p { margin: 0 0 1rem; }
.article-prose h2 {
  margin: 1.7rem 0 .7rem;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.article-prose ul {
  margin: .4rem 0 1rem 1.2rem;
  padding: 0;
}

.article-prose li { margin: .38rem 0; }

.article-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

.article-prose blockquote {
  margin: 1rem 0;
  padding: .8rem .9rem;
  border-left: 2px solid rgba(0,229,255,.65);
  background: rgba(0,229,255,.06);
}

.article-prose blockquote p {
  margin: 0;
  color: var(--bone);
}

.article-prose .deck {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 760px) {
  .article-main { padding-top: 2rem; }
  .article-prose { padding: 1rem; }
}
