:root {
  --bg: #0b0f0d;
  --bg-alt: #0e130f;
  --panel: #121712;
  --panel-border: #223026;
  --text: #e9f2ec;
  --text-dim: #93a89c;
  --jade: #10b981;
  --jade-dim: #0d7a5a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* .widget-panel sets its own `display`, which would otherwise beat the UA
   stylesheet's [hidden] rule and leave it visible on load. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
p { margin: 0 0 16px; color: var(--text-dim); }

.logo { font-size: 1.4em; font-weight: 800; letter-spacing: -0.02em; }
.logo span { color: var(--jade); }

/* --- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 15, 13, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-cta {
  background: var(--jade);
  color: #052e22;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9em;
  cursor: pointer;
}
.nav-cta:hover { background: #17c98e; }

/* --- Hero --- */
.hero {
  background: radial-gradient(circle at 25% -10%, #10382a 0%, var(--bg) 55%);
  padding: 110px 24px 90px;
  text-align: center;
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2.2em, 5vw, 3.4em);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.15em;
  max-width: 620px;
  margin: 0 auto 32px;
}
.cta-primary {
  background: var(--jade);
  color: #052e22;
  border: none;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.cta-primary:hover { background: #17c98e; transform: translateY(-1px); }

/* --- Services --- */
.services { max-width: 1100px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.services h2 { font-size: 1.8em; margin-bottom: 40px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 28px 22px;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}
.service-card:hover { border-color: var(--jade-dim); transform: translateY(-2px); }
.service-icon { font-size: 1.8em; margin-bottom: 10px; }
.service-card h3 { font-size: 1.05em; }
.service-card p { font-size: 0.9em; margin: 0; }

/* --- How it works --- */
.how-it-works { background: var(--bg-alt); padding: 80px 24px; text-align: center; }
.how-it-works h2 { font-size: 1.8em; margin-bottom: 40px; }
.steps {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  text-align: left;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--jade);
  color: #052e22;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05em; }
.step p { font-size: 0.9em; margin: 0; }

/* --- CTA banner --- */
.cta-banner {
  max-width: 700px;
  margin: 0 auto;
  padding: 90px 24px;
  text-align: center;
}
.cta-banner h2 { font-size: 1.8em; }
.cta-banner p { max-width: 480px; margin: 0 auto 28px; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--panel-border); padding: 32px 24px; }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner p { margin: 0; font-size: 0.85em; }

/* --- Chat widget --- */
.widget-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--jade);
  color: #052e22;
  border: none;
  font-size: 1.6em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 40;
  transition: transform 0.15s;
}
.widget-bubble:hover { transform: scale(1.06); }

.widget-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 48px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
  background: var(--bg-alt);
}
.widget-title { font-weight: 800; }
.widget-subtitle { font-size: 0.78em; color: var(--text-dim); }
.widget-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1em;
  cursor: pointer;
  padding: 4px 8px;
}
.widget-close:hover { color: var(--text); }

.widget-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.w-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9em;
  line-height: 1.45;
  white-space: pre-wrap;
}
.w-msg-user { align-self: flex-end; background: var(--jade); color: #052e22; border-bottom-right-radius: 2px; }
.w-msg-assistant { align-self: flex-start; background: var(--bg-alt); border-bottom-left-radius: 2px; }
.w-msg-system { align-self: center; color: var(--text-dim); font-size: 0.8em; font-style: italic; }
.w-msg-error { align-self: center; color: #ef4444; font-size: 0.8em; }

.widget-input-row {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--panel-border);
}
.widget-input-row input {
  flex-grow: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.95em;
}
.widget-input-row input:focus { outline: 2px solid var(--jade-dim); }
.widget-input-row button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--jade);
  color: #052e22;
  font-weight: 700;
  cursor: pointer;
}
.widget-input-row button:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
  .widget-panel { right: 16px; bottom: 16px; width: calc(100vw - 32px); }
  .widget-bubble { right: 16px; bottom: 16px; }
}
