/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-input: #16161f;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-muted: #6b6b80;
  --accent: #00d4aa;
  --accent-glow: rgba(0, 212, 170, 0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(0, 212, 170, 0.06) 0%, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header === */
.site-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--accent);
}

.nav-link {
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

/* === Hero === */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #00b4d8, var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* === Features === */
.features {
  padding: 2rem 0 4rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.05);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === Chat Section === */
.chat-section {
  padding: 2rem 0 6rem;
  text-align: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.chat-form {
  max-width: 600px;
  margin: 0 auto;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.25rem 0.25rem 0.25rem 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 0 32px rgba(0, 212, 170, 0.08);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.75rem 0;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-submit {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.chat-submit:hover {
  opacity: 0.85;
}

/* === Processing Overlay === */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.3s;
}

.processing-overlay.hidden {
  display: none;
}

.processing-box {
  text-align: left;
  max-width: 440px;
  width: 100%;
  padding: 0 1.5rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.status-msg {
  font-size: 0.9rem;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(4px);
  animation: fadeUp 0.3s forwards;
}

.status-msg.active {
  color: var(--accent);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Footer === */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .chat-section {
    padding: 2rem 0 4rem;
  }
}
