:root {
  --bg: #0D0D0D;
  --bg-card: #161616;
  --bg-card-hover: #1E1E1E;
  --accent: #F59E0B;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --text: #F5F5F5;
  --text-muted: #888888;
  --text-dim: #555555;
  --border: #2A2A2A;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 60px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.nav-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* HERO */
.hero {
  padding: 80px 60px 60px;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 60px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-headline {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
}

/* TERMINAL */
.hero-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #1A1A1A;
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot.red { background: #FF5F57; }
.dot.amber { background: #FFBD2E; }
.dot.green { background: #28CA42; }
.terminal-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 8px;
}
.terminal-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--text-muted);
}
.t-comment { color: #555; }
.t-keyword { color: #C792EA; }
.t-func { color: #82AAFF; }
.t-str { color: #C3E88D; }
.t-var { color: var(--text); }
.t-prop { color: #FFCB6B; }
.terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: #141414;
}
.status-dot {
  width: 8px; height: 8px;
  background: #28CA42;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-text {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* HERO STATS */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.stat {
  background: var(--bg-card);
  padding: 28px 32px;
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SECTION COMMON */
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* APPROACH */
.approach {
  padding: 80px 60px;
  border-bottom: 1px solid var(--border);
}
.approach-header {
  margin-bottom: 56px;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.principle {
  background: var(--bg);
  padding: 40px;
}
.principle-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.principle-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.principle-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* SERVICES */
.services {
  padding: 80px 60px;
  border-bottom: 1px solid var(--border);
}
.services-header { margin-bottom: 48px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  position: relative;
  transition: border-color 0.2s;
}
.service-card:hover { border-color: #3A3A3A; }
.service-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245,158,11,0.05) 100%);
}
.service-badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--accent);
  color: #0D0D0D;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 0 0 6px 6px;
}
.service-icon {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent);
}
.service-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.service-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-list li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.service-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* WHY */
.why {
  padding: 80px 60px;
  border-bottom: 1px solid var(--border);
}
.why-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.why-lede {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}
.why-points {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.why-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.point-check {
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.why-point strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.why-point p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.why-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.market-block {
  background: var(--bg-card);
  padding: 28px 32px;
}
.market-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.market-stat {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.market-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* MANIFESTO */
.manifesto {
  padding: 80px 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.manifesto-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.manifesto-quote {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  font-style: normal;
  border: none;
  padding: 0;
}
.manifesto-cta {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* FOOTER */
.footer {
  padding: 40px 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-meta p {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav, .hero, .approach, .services, .why, .manifesto, .footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero-inner, .why-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-meta p { text-align: center; }
}
@media (max-width: 480px) {
  .hero-headline { font-size: 2.4rem; }
  .market-stat { font-size: 1.8rem; }
}

/* ============================================
   CHAT WIDGET
   ============================================ */

#chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #0D0D0D;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s, opacity 0.2s;
  z-index: 9999;
}
#chat-fab:hover {
  transform: scale(1.08);
}
#chat-fab.chat-fab-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

#chat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 56px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
#chat-panel.chat-closed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
}
#chat-panel.chat-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.chat-header-sub {
  font-size: 0.7rem;
  color: #28CA42;
  font-family: var(--mono);
}
.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg {
  display: flex;
  max-width: 85%;
}
.chat-msg.user {
  align-self: flex-end;
}
.chat-msg.assistant {
  align-self: flex-start;
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #0D0D0D;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-bubble.typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 18px;
}
.chat-bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-dot 1.4s infinite;
}
.chat-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.2s;
}
#chat-input::placeholder { color: var(--text-dim); }
#chat-input:focus { border-color: var(--accent); }
#chat-send {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--accent);
  color: #0D0D0D;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
#chat-send:hover { background: #D97706; }

/* Mobile adjustments for chat */
@media (max-width: 480px) {
  #chat-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  #chat-fab { bottom: 20px; right: 20px; }
}