:root {
  --bg: #0a0f0c;
  --bg-elevated: #101712;
  --border: #1e2b23;
  --text: #f2f5f3;
  --text-muted: #9caaa2;
  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --max-width: 1080px;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  margin-bottom: 2.5rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #04140c;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button--ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.button--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 15, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav-links a:not(.button) {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-links a:not(.button):hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding: clamp(4rem, 3rem + 5vw, 7rem) 0 clamp(3rem, 2rem + 4vw, 5rem);
  background:
    radial-gradient(circle at 15% 0%, rgba(52, 211, 153, 0.14), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(52, 211, 153, 0.08), transparent 40%);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.5rem);
  max-width: 18ch;
  margin-bottom: 1.5rem;
}

.hero .lede {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Services */

.services {
  padding: clamp(3rem, 2.5rem + 2vw, 5rem) 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--text);
}

/* Approach */

.approach {
  padding: clamp(3rem, 2.5rem + 2vw, 5rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.steps {
  list-style: none;
  display: grid;
  gap: 2rem;
}

.steps li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-index {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steps h3 {
  color: var(--text);
}

/* CTA */

.cta {
  padding: clamp(3.5rem, 3rem + 3vw, 6rem) 0;
  text-align: center;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  max-width: 48ch;
  margin: 0 auto 2rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.site-footer p {
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 1rem;
  }
}

/* Chat widget */

.chat-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-toggle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #04140c;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.chat-toggle:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.chat-panel {
  width: min(340px, calc(100vw - 3rem));
  height: min(480px, calc(100vh - 8rem));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}

.chat-close:hover {
  color: var(--text);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-message {
  max-width: 85%;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message--assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-message--user {
  align-self: flex-end;
  background: var(--accent);
  color: #04140c;
}

.chat-message--error {
  align-self: flex-start;
  background: transparent;
  border: 1px solid #7f3d3d;
  color: #f3a3a3;
}

.chat-message--pending {
  align-self: flex-start;
  color: var(--text-muted);
  font-style: italic;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: var(--text);
  font-size: 0.9rem;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-send {
  background: var(--accent);
  color: #04140c;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.chat-send:hover {
  background: var(--accent-strong);
}

.chat-send:disabled,
.chat-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .chat-widget {
    right: 1rem;
    bottom: 1rem;
  }
}
