* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f8;
  --text: #0d0d0d;
  --text-secondary: #6e6e80;
  --border: #e5e5e5;
  --accent: #0d0d0d;
  --accent-hover: #2d2d2d;
  --card-bg: #ffffff;
  --chat-bg: #f7f7f8;
  --green: #10a37f;
  --orange: #f59e0b;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-btn {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.2s !important;
}

.nav-btn:hover {
  background: var(--accent-hover) !important;
}

/* HERO */
.hero {
  padding: 160px 24px 100px;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-banner {
  height: 60px;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 400;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text);
}

/* SECTIONS */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.products, .about {
  padding: 100px 0;
}

.products {
  background: var(--bg-secondary);
}

h2 {
  font-size: 36px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -0.5px;
}

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: box-shadow 0.3s, transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.product-card.active {
  border-color: var(--accent);
}

.product-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.product-status.live {
  background: #0d0d0d;
  color: #fff;
}

.product-status.dev {
  background: var(--border);
  color: var(--text-secondary);
}

.product-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.product-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.product-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}

.product-link:hover {
  opacity: 0.7;
}

.product-link.disabled {
  color: var(--text-secondary);
  cursor: default;
}

/* CHATOM SECTION */
.chatom-section {
  padding: 100px 0;
  background: var(--bg);
}

.chatom-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: -40px;
  margin-bottom: 40px;
}

.chat-container {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.chat-messages {
  height: 450px;
  overflow-y: auto;
  padding: 24px;
}

.msg {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-avatar img {
  width: 24px;
  height: 24px;
}

.msg.user .msg-avatar {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.msg-content {
  font-size: 15px;
  line-height: 1.7;
  padding-top: 4px;
  max-width: 680px;
  word-wrap: break-word;
}

.msg-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
  font-size: 13px;
}

.msg-content code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.msg-content pre code {
  background: none;
  padding: 0;
}

/* CHAT INPUT */
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

#chatInput {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: var(--bg);
  max-height: 150px;
  line-height: 1.5;
  transition: border-color 0.2s;
}

#chatInput:focus {
  border-color: var(--accent);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--accent-hover);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ABOUT */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  flex: 1;
}

.about-mission {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 15px;
}

.about-founder {
  margin-top: 20px;
  color: var(--text) !important;
}

.about-logo img {
  width: 120px;
  opacity: 0.8;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.footer-logo {
  width: 24px;
  height: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 13px;
}

/* TYPING INDICATOR */
.typing-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  margin-right: 4px;
  animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links a:not(.nav-btn) { display: none; }
  .hero { padding: 120px 24px 60px; }
  .hero-banner { height: 40px; }
  h2 { font-size: 28px; }
  .about-content { flex-direction: column; text-align: center; }
  .about-logo { order: -1; }
  .chat-messages { height: 350px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* SCROLLBAR */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
