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

:root {
  --bg: #0c0c0e;
  --bg-2: #111114;
  --bg-card: #16161a;
  --amber: #e8a849;
  --amber-dim: #c4873a;
  --text: #ede8e0;
  --text-dim: #7a7570;
  --text-muted: #4a4744;
  --border: #232328;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.nav-tag {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 28px;
  font-weight: 500;
}
.hero-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.5rem, 9vw, 9rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 32px;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 520px;
  font-weight: 300;
  margin-bottom: 64px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.stat {
  padding-right: 48px;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  margin-right: 48px;
}

/* FEATURES */
.features {
  padding: 100px 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.feature-card {
  background: var(--bg-2);
  padding: 48px;
  transition: background 0.2s;
}
.feature-card:hover {
  background: var(--bg-card);
}
.feature-icon {
  color: var(--amber);
  margin-bottom: 24px;
}
.feature-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 12px;
}
.feature-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-dim);
  font-weight: 300;
}

/* PRINCIPLES */
.principles {
  padding: 100px 40px;
}
.principles-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.principles-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 28px;
  font-weight: 500;
}
.principles-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 64px;
  max-width: 600px;
}
.principles-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 80px;
}
.principle {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.principle-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  margin-top: 4px;
}
.principle-body h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.principle-body p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
  font-weight: 300;
}

/* CLOSING */
.closing {
  padding: 120px 40px;
  background: var(--amber);
  color: #0c0c0e;
}
.closing-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.closing-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(12, 12, 14, 0.5);
  margin-bottom: 32px;
}
.closing-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  color: #0c0c0e;
  margin-bottom: 28px;
}
.closing-sub {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(12, 12, 14, 0.7);
  max-width: 540px;
  font-weight: 400;
  margin-bottom: 48px;
}
.closing-cta {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(12, 12, 14, 0.55);
}

/* FOOTER */
.footer {
  padding: 48px 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--amber);
}
.footer-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-copy {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── CHAT WIDGET ─────────────────────────────────────────────────────────── */
#cw-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* Launcher button */
#cw-launcher {
  width: auto;
  min-width: 56px;
  height: 56px;
  border-radius: 28px;
  background: var(--amber);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 0 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  color: #0c0c0e;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
#cw-launcher:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.6); }
#cw-launcher.hidden, #cw-launcher.cw-hidden { display: none; }

#cw-badge {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Chat window */
#cw-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 390px;
  max-width: calc(100vw - 40px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 580px;
}
#cw-window.cw-open { display: flex; animation: cwSlideUp 0.22s ease; }

@keyframes cwSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.cw-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cw-header-info { display: flex; flex-direction: column; gap: 3px; }
.cw-header-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.cw-header-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 400;
}
.cw-header-sub::before { content: '● '; color: #22c55e; font-size: 0.6rem; }
.cw-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.cw-icon-btn:hover { background: var(--border); color: var(--text); }
#cw-voice-toggle.cw-voice-active { color: var(--amber); }
#cw-voice-toggle.cw-voice-active:hover { background: rgba(232,168,73,0.15); }

/* Messages area */
#cw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 360px;
  scroll-behavior: smooth;
}
#cw-messages::-webkit-scrollbar { width: 4px; }
#cw-messages::-webkit-scrollbar-track { background: transparent; }
#cw-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.cw-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 88%;
  word-break: break-word;
}
.cw-msg-user {
  align-self: flex-end;
  background: var(--amber);
  color: #0c0c0e;
  border-bottom-right-radius: 4px;
}
.cw-msg-asst {
  align-self: flex-start;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.cw-msg code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82em;
}
.cw-msg strong { color: var(--amber); }

/* Typing indicator */
.cw-dots { display: flex; gap: 4px; align-items: center; }
.cw-dots span {
  width: 6px; height: 6px;
  background: var(--text-dim);
  border-radius: 50%;
  animation: cwBounce 1.2s infinite ease-in-out;
}
.cw-dots span:nth-child(2) { animation-delay: 0.2s; }
.cw-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cwBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Suggestions */
#cw-suggestions {
  padding: 10px 16px 6px;
  border-top: 1px solid var(--border);
}
.cw-suggestions-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 500;
}
.cw-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.cw-chip:hover { background: var(--bg-card); color: var(--text); border-color: var(--text-dim); }

/* Input area */
.cw-input-area {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.cw-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 6px 6px 12px;
  transition: border-color 0.2s;
}
.cw-input-wrap:focus-within { border-color: var(--amber); }
#cw-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  min-height: 24px;
  max-height: 120px;
  overflow-y: auto;
}
#cw-input::placeholder { color: var(--text-muted); }
.cw-send-btn {
  background: var(--amber);
  border: none;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c0c0e;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.cw-send-btn:hover { background: var(--amber-dim); transform: scale(1.05); }
.cw-send-btn:active { transform: scale(0.95); }
.cw-footer-note {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 7px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; }
  .hero { padding: 100px 20px 60px; }
  .features { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .principles { padding: 60px 20px; }
  .principles-list { grid-template-columns: 1fr; }
  .closing { padding: 80px 20px; }
  .footer { padding: 40px 20px; }
  .footer-copy { margin-left: 0; }
  .hero-stats { flex-direction: column; gap: 24px; align-items: flex-start; }
  .stat-divider { display: none; }
  .stat { padding-right: 0; }
}