/* A Dev With Purpose - "The Network" v3 */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latinext.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latinext.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #070b18;
  --bg-2: #0b1122;
  --panel: rgba(17, 24, 46, 0.55);
  --line: rgba(129, 140, 248, 0.13);
  --line-strong: rgba(129, 140, 248, 0.28);
  --text: #e8ecf7;
  --dim: #93a1c0;
  --faint: #6b7a9c;
  --accent: #6366f1;
  --accent-2: #a5b4fc;
  --cyan: #38bdf8;
  --amber: #fbbf24;
  --font-d: 'Space Grotesk', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-d);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before { /* fine grid texture over everything */
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(129,140,248,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129,140,248,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
}
main, .site-header, .site-footer { position: relative; z-index: 1; }
a { color: var(--accent); text-decoration: none; }
section { scroll-margin-top: 72px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 24, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.9rem 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: var(--text); }
.brand-mark {
  font-family: var(--font-m); font-weight: 600; color: var(--accent);
  font-size: 1.05rem; text-shadow: 0 0 18px rgba(99, 102, 241, 0.55);
}
.brand-name { font-family: var(--font-m); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--dim); }
.site-nav { margin-left: auto; display: flex; gap: 1.6rem; }
.site-nav a {
  font-family: var(--font-m); font-size: 0.78rem; color: var(--dim);
  position: relative; padding: 0.2rem 0; transition: color 0.25s;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); }
.header-status {
  font-family: var(--font-m); font-size: 0.72rem; color: var(--accent);
  display: flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.28rem 0.75rem;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.9);
  animation: pulse 2.4s ease-in-out infinite; display: inline-block; flex: none;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(52% 44% at 72% 42%, rgba(99, 102, 241, 0.10), transparent 70%),
    radial-gradient(40% 36% at 18% 78%, rgba(56, 189, 248, 0.06), transparent 70%);
}
.hero-static { /* mobile / no-webgl fallback node field */
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(99,102,241,0.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 14%, rgba(56,189,248,0.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 86% 42%, rgba(99,102,241,0.6) 50%, transparent 51%),
    radial-gradient(2px 2px at 30% 66%, rgba(56,189,248,0.4) 50%, transparent 51%),
    radial-gradient(2px 2px at 58% 84%, rgba(99,102,241,0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 34%, rgba(232,236,247,0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 70%, rgba(232,236,247,0.4) 50%, transparent 51%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 7rem 1.5rem 4rem; width: 100%;
}
.kicker {
  font-family: var(--font-m); font-size: 0.8rem; color: var(--accent);
  letter-spacing: 0.08em; margin-bottom: 1.4rem;
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}
h1 {
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  max-width: 15ch; margin-bottom: 1.5rem;
}
.accent {
  background: linear-gradient(100deg, var(--accent) 20%, var(--cyan) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 26px rgba(99, 102, 241, 0.35));
}
.sub { color: var(--dim); font-size: 1.12rem; max-width: 46ch; margin-bottom: 1.8rem; }
.hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.2rem; }
.hero-chips li {
  font-family: var(--font-m); font-size: 0.74rem; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem;
  background: rgba(11, 17, 34, 0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 0.5rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn {
  font-family: var(--font-m); font-size: 0.86rem; font-weight: 600;
  padding: 0.85rem 1.7rem; border-radius: 10px; transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  display: inline-block;
}
.btn-primary {
  background: var(--accent); color: #0b1122;
  box-shadow: 0 0 0 rgba(99, 102, 241, 0);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 34px rgba(99, 102, 241, 0.35); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: rgba(11,17,34,0.4); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }
.hero-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-m); font-size: 0.7rem; letter-spacing: 0.34em; color: var(--faint);
  z-index: 2;
}
.hero-hint::after {
  content: ''; display: block; width: 1px; height: 34px; margin: 0.5rem auto 0;
  background: linear-gradient(var(--accent), transparent);
  animation: hint 2s ease-in-out infinite;
}
@keyframes hint { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- ticker ---------- */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 0.85rem 0; background: rgba(11, 17, 34, 0.45);
  position: relative; z-index: 1;
}
.ticker-track {
  display: flex; gap: 3.5rem; width: max-content;
  animation: tick 30s linear infinite;
}
.ticker-track span {
  font-family: var(--font-m); font-size: 0.78rem; letter-spacing: 0.12em;
  color: var(--faint); white-space: nowrap;
}
.ticker-track span::before { content: '// '; color: var(--accent); opacity: 0.6; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- scenes ---------- */
.scene { position: relative; }
.scene-pin {
  min-height: 100vh;
  max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.scene-eyebrow {
  font-family: var(--font-m); font-size: 0.76rem; letter-spacing: 0.14em;
  color: var(--faint); text-transform: uppercase; margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.scene-num { color: var(--accent); font-weight: 600; }
.scene h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 1.1rem;
}
.scene-text { color: var(--dim); font-size: 1.05rem; max-width: 42ch; margin-bottom: 1.4rem; }
.scene-list { list-style: none; display: grid; gap: 0.5rem; }
.scene-list li {
  font-family: var(--font-m); font-size: 0.82rem; color: var(--dim);
  padding-left: 1.3rem; position: relative;
}
.scene-list li::before { content: '>'; position: absolute; left: 0; color: var(--accent); }

.scene-visual {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(232,236,247,0.05), 0 24px 60px rgba(0,0,0,0.45);
  padding: 2rem; min-height: 340px;
  display: flex; flex-direction: column; justify-content: center; gap: 0.8rem;
}
.frag {
  font-family: var(--font-m); font-size: 0.84rem; color: var(--dim);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.65rem 0.95rem;
  background: rgba(7, 11, 24, 0.55);
}
.frag.lit { color: var(--accent-2); border-color: var(--line-strong); text-shadow: 0 0 14px rgba(99,102,241,0.45); }
.memory-status {
  margin-top: 0.9rem; font-family: var(--font-m); font-size: 0.8rem;
  color: var(--amber); letter-spacing: 0.04em;
}
.memory-status.ok { color: var(--accent); }

.pipe-track {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  gap: 0.6rem; padding: 1.2rem 0.2rem;
}
.pipe-track::before {
  content: ''; position: absolute; left: 4%; right: 4%; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.pipe-stage {
  font-family: var(--font-m); font-size: 0.78rem; color: var(--faint);
  border: 1px solid var(--line); border-radius: 9px; padding: 0.55rem 0.85rem;
  background: var(--bg-2); position: relative; z-index: 1; transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.pipe-stage.lit {
  color: var(--accent-2); border-color: var(--accent);
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.25);
}
.pipe-token {
  position: absolute; top: 50%; left: 0; width: 12px; height: 12px; z-index: 2;
  margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 18px 4px rgba(99, 102, 241, 0.55);
}
.pipe-log {
  margin-top: 1.4rem; font-family: var(--font-m); font-size: 0.8rem; color: var(--dim);
  border-top: 1px dashed var(--line); padding-top: 1rem;
}

.dev-window {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #070b18; box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.dev-titlebar { display: flex; gap: 7px; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); background: rgba(17,24,46,0.6); }
.dev-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); opacity: 0.5; }
.dev-titlebar span:first-child { background: var(--accent); opacity: 0.8; }
.dev-lines { padding: 1.1rem 1.2rem; display: grid; gap: 0.55rem; }
.dev-line { font-family: var(--font-m); font-size: 0.84rem; color: var(--dim); }
.dev-line em { font-style: normal; color: var(--accent); margin-right: 0.5rem; }
.dev-pass { color: var(--accent-2); }
.dev-guard { color: var(--amber); }

/* ---------- shared section chrome ---------- */
.section-eyebrow {
  font-family: var(--font-m); font-size: 0.76rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.9rem;
}
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 1rem;
}
.section-sub { color: var(--dim); max-width: 56ch; margin-bottom: 2.4rem; }
.proof, .how, .chat, .about { max-width: 1200px; margin: 0 auto; padding: 6.5rem 1.5rem; }

/* ---------- proof ---------- */
.proof-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.proof-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
.proof-card {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--panel); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(232,236,247,0.05), 0 18px 50px rgba(0,0,0,0.35);
  transition: transform 0.3s, border-color 0.3s;
}
.proof-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.proof-media { border-right: 1px solid var(--line); background: #070b18; display: flex; align-items: center; }
.proof-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof-body { padding: 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; }
.proof-body h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.proof-body p { color: var(--dim); font-size: 0.95rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tags li {
  font-family: var(--font-m); font-size: 0.68rem; color: var(--accent-2);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.22rem 0.55rem;
}
.proof-link {
  font-family: var(--font-m); font-size: 0.8rem; font-weight: 600; color: var(--accent);
  margin-top: auto;
}
.proof-link:hover { text-shadow: 0 0 16px rgba(99, 102, 241, 0.6); }

/* ---------- how ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.steps li {
  border: 1px solid var(--line); border-radius: 16px; padding: 1.8rem;
  background: var(--panel); backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(232,236,247,0.05);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.step-num {
  font-family: var(--font-m); font-weight: 600; font-size: 0.85rem; color: var(--accent);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.3rem 0.6rem; align-self: flex-start;
  text-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
}
.steps h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.steps p { color: var(--dim); font-size: 0.95rem; }
.how-note {
  margin-top: 1.6rem; font-family: var(--font-m); font-size: 0.82rem; color: var(--faint);
}
.how-note::before { content: '// '; color: var(--accent); }

/* ---------- chat ---------- */
.chat-window {
  max-width: 720px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--panel); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(232,236,247,0.05), 0 24px 60px rgba(0,0,0,0.45);
}
.chat-scroll { padding: 1.6rem; display: flex; flex-direction: column; gap: 0.85rem; min-height: 300px; }
.msg {
  max-width: 78%; padding: 0.75rem 1.05rem; border-radius: 14px;
  font-size: 0.95rem; line-height: 1.5;
}
.msg-bot { background: rgba(17, 24, 46, 0.9); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user {
  background: rgba(99, 102, 241, 0.14); border: 1px solid var(--line-strong);
  align-self: flex-end; border-bottom-right-radius: 4px; color: var(--accent-2);
}
.msg-cta a { font-weight: 600; }
.chat-input { display: flex; border-top: 1px solid var(--line); }
.chat-input input {
  flex: 1; background: transparent; border: 0; outline: 0;
  padding: 1rem 1.2rem; color: var(--text); font-family: var(--font-m); font-size: 0.84rem;
}
.chat-input input::placeholder { color: var(--faint); }
.chat-input button {
  background: transparent; border: 0; border-left: 1px solid var(--line);
  color: var(--accent); font-size: 1.1rem; padding: 0 1.3rem; cursor: pointer;
}
.chat-note { margin-top: 0.9rem; font-family: var(--font-m); font-size: 0.74rem; color: var(--faint); }

/* ---------- about ---------- */
.about p { color: var(--dim); max-width: 60ch; margin-bottom: 1.8rem; font-size: 1.05rem; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin-bottom: 2.2rem; max-width: 760px; }
.facts li {
  border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem;
  background: rgba(11, 17, 34, 0.45); font-size: 0.94rem;
}
.facts li span {
  display: block; font-family: var(--font-m); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem;
}
.about .cta-row { margin-top: 0.4rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(7, 11, 24, 0.8); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between;
}
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a, .footer-mail { font-family: var(--font-m); font-size: 0.78rem; color: var(--dim); transition: color 0.25s; }
.footer-links a:hover, .footer-mail:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .header-inner { gap: 1rem; }
  .header-status { display: none; }
  .site-nav { gap: 1rem; }
  .brand-name { display: none; }
  .hero-content { padding-top: 6rem; }
  .scene-pin { grid-template-columns: 1fr; gap: 2.2rem; min-height: 0; padding: 4.5rem 1.5rem; }
  .scene-visual { min-height: 0; }
  .proof-grid, .proof-feature { grid-template-columns: 1fr; }
  .proof-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.3rem, 9vw, 3.2rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .pulse-dot, .hero-hint::after { animation: none; }
  * { transition: none !important; }
}

/* ---------- v3.1 polish pass (craft-floor: browser surfaces, states, targets) ---------- */
::selection { background: rgba(99, 102, 241, 0.85); color: #0b1122; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { text-underline-offset: 3px; }
.site-nav a, .footer-links a, .footer-mail { display: inline-flex; align-items: center; min-height: 44px; }
html { scrollbar-color: rgba(99, 102, 241, 0.35) #0b1122; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0b1122; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.28); border-radius: 6px; border: 2px solid #0b1122; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.45); }
.chat-input input { caret-color: var(--accent); }
.chat-input button { display: inline-flex; align-items: center; }
.btn:active { transform: translateY(0); }
/* proof gif: crop the gray band at its bottom, keep the app window */
.proof-media img { aspect-ratio: 56 / 37; object-fit: cover; object-position: top center; height: auto; }
/* pipeline card: pull the log line out of the dead space */
.pipe-log { margin-top: auto; }
