/* ============================
   AUTOMATEHQ — Landing Page
   ============================ */

:root {
  --bg: #0F0F12;
  --bg-2: #16161B;
  --bg-3: #1E1E25;
  --fg: #F2F2F4;
  --fg-muted: #8E8E9A;
  --accent: #FF6B2B;
  --accent-2: #FF9A6B;
  --accent-glow: rgba(255, 107, 43, 0.15);
  --border: rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================
   NAV
   ============================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  background: rgba(15, 15, 18, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.nav-tagline {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
}

/* ============================
   HERO
   ============================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 40px 100px;
  position: relative;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,43,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,43,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,43,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 820px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-headline {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-proof span {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.proof-sep {
  color: rgba(255,255,255,0.1) !important;
}
.hero-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 28px 40px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 680px;
  margin: 0 auto;
}
.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.workflow-step span {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}
.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
}
.step-icon.ai-icon {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(255,107,43,0.2);
}
.step-icon.booked-icon { color: #7ED4AD; background: rgba(126,212,173,0.08); border-color: rgba(126,212,173,0.15); }
.step-icon.done-icon { color: #A78BFA; background: rgba(167,139,250,0.08); border-color: rgba(167,139,250,0.15); }
.workflow-arrow {
  color: rgba(255,255,255,0.15);
  padding: 0 4px;
  margin-bottom: 24px;
}

/* ============================
   SHARED SECTION STYLES
   ============================ */
.section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ============================
   PAIN
   ============================ */
.pain {
  padding: 100px 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pain-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.pain-card {
  background: var(--bg-3);
  padding: 40px 36px;
  border: 1px solid var(--border);
  position: relative;
}
.pain-number {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: rgba(255,107,43,0.15);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.pain-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.3;
}
.pain-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ============================
   SERVICES
   ============================ */
.services {
  padding: 100px 40px;
}
.services-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 48px;
}
.service-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 44px 40px;
  transition: border-color 0.2s ease;
}
.service-card:hover {
  border-color: rgba(255,107,43,0.2);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 24px;
}
.service-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ============================
   HOW IT WORKS
   ============================ */
.howitworks {
  padding: 100px 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.howitworks-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 48px;
}
.step {
  flex: 1;
  padding: 40px 32px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.step-num {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.step h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
}
.step p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}
.step-connector {
  width: 60px;
  flex-shrink: 0;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,107,43,0.3), transparent);
}

/* ============================
   PRICING
   ============================ */
.pricing {
  padding: 100px 40px;
}
.pricing-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.pricing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 44px 40px;
  position: relative;
  text-align: center;
}
.pricing-card.featured {
  border-color: rgba(255,107,43,0.35);
  background: linear-gradient(180deg, rgba(255,107,43,0.06) 0%, var(--bg-2) 100%);
}
.pricing-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 20px;
}
.pricing-tier {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.pricing-price {
  font-family: 'Outfit', sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.pricing-period {
  font-size: 20px;
  font-weight: 400;
  color: var(--fg-muted);
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}
.pricing-features li {
  font-size: 15px;
  color: var(--fg-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,107,43,0.15);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FF6B2B' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.pricing-ideal {
  font-size: 12px;
  color: var(--fg-muted);
  font-style: italic;
}
.pricing-note {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
}

/* ============================
   TESTIMONIALS
   ============================ */
.testimonials {
  padding: 100px 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.testimonials-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 48px;
}
.testimonial-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 40px 36px;
  position: relative;
}
.testimonial-quote {
  font-family: 'Outfit', sans-serif;
  font-size: 64px;
  color: rgba(255,107,43,0.2);
  line-height: 0.8;
  margin-bottom: 16px;
}
.testimonial-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.testimonial-attr strong {
  display: block;
  font-size: 14px;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 4px;
}
.testimonial-attr span {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ============================
   CLOSING
   ============================ */
.closing {
  padding: 120px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.closing-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255,107,43,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.closing-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.closing h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 24px;
}
.closing p {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 48px;
}
.closing-targets {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.closing-targets span {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
}
.target-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

/* ============================
   FOOTER
   ============================ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 40px 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
  display: block;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--fg-muted);
  max-width: 240px;
}
.footer strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: block;
  margin-bottom: 16px;
}
.footer ul {
  list-style: none;
}
.footer ul li {
  font-size: 14px;
  color: var(--fg-muted);
  padding: 5px 0;
}
.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  font-size: 13px;
  color: rgba(255,255,255,0.2);
}

/* ============================
   LEAD FORM SECTION
   ============================ */
.lead-form-section {
  padding: 100px 40px;
  background: var(--bg);
}
.lead-form-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.lead-form-copy h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 20px;
}
.lead-form-copy p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.lead-trust-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lead-trust-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--fg-muted);
  font-weight: 500;
}

.lead-form-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-color: rgba(255,107,43,0.3);
  border-radius: 16px;
  padding: 44px 40px;
}
.lead-form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}
.lead-form-sub {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(142, 142, 154, 0.5);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(255, 107, 43, 0.5);
}
.form-group select option {
  background: var(--bg-3);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-options {
  display: flex;
  gap: 16px;
}
.contact-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg-muted);
}
.contact-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.contact-option span {
  user-select: none;
}

.opt-in-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.opt-in-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.4;
}
.opt-in-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  margin-top: 1px;
}
.opt-in-label span {
  user-select: none;
}

@media (max-width: 600px) {
  .opt-in-group {
    flex-direction: column;
    gap: 10px;
  }
}

.btn-lead-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 24px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 16px;
}
.btn-lead-submit:hover {
  background: #e55a1f;
}
.btn-lead-submit:active {
  transform: scale(0.99);
}
.btn-lead-submit:disabled {
  background: #7a4a2b;
  cursor: not-allowed;
}

.form-trust {
  font-size: 12px;
  color: rgba(142, 142, 154, 0.5);
  text-align: center;
}

.lead-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 20px 0;
}
.lead-success p {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  .hero { padding: 120px 24px 80px; }
  .hero-workflow { padding: 20px; gap: 12px; }
  .workflow-arrow { display: none; }
  .pain, .services, .howitworks, .pricing, .testimonials, .closing { padding: 60px 24px; }
  .pain-grid, .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; gap: 2px; }
  .step-connector { width: 100%; height: 1px; background: linear-gradient(180deg, transparent, rgba(255,107,43,0.3), transparent); }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .nav { padding: 16px 24px; }
  .closing-targets { gap: 10px; }
}

/* ============================
   CHATBOT WIDGET
   ============================ */
#ahq-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'DM Sans', sans-serif;
}

/* Trigger button */
.chat-trigger {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.chat-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(255, 107, 43, 0.5);
}
.chat-trigger.chat-open {
  background: var(--bg-3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.chat-trigger svg {
  transition: transform 0.3s;
}
.chat-trigger.chat-open svg {
  transform: rotate(90deg);
}

/* Callout bubble */
.chat-bubble {
  display: none;
  position: absolute;
  bottom: 76px;
  right: 0;
  background: var(--bg-2);
  border: 1px solid rgba(255,107,43,0.25);
  border-radius: 14px;
  padding: 14px 18px;
  max-width: 240px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  animation: none;
}
.chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 28px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(255,107,43,0.25);
}
.chat-bubble p {
  font-size: 13px;
  color: var(--fg);
  line-height: 1.5;
  margin: 0;
}
.chat-bubble span {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

@keyframes chatPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
  50% { transform: scale(1.03); box-shadow: 0 4px 28px rgba(255,107,43,0.25); }
}

/* Chat window */
.chat-box {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 380px;
  height: 520px;
  background: var(--bg-2);
  border: 1px solid rgba(255,107,43,0.2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: chatSlideUp 0.25s ease-out;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-header {
  background: linear-gradient(135deg, var(--accent) 0%, #e55a1f 100%);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-header-text h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 2px;
}
.chat-header-text p {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin: 0;
}
.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  padding: 4px;
  display: flex;
  border-radius: 6px;
  transition: background 0.15s;
}
.chat-close:hover { background: rgba(255,255,255,0.15); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  animation: msgFadeIn 0.2s ease-out;
}
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg-user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg-ai {
  background: var(--bg-3);
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

/* Typing indicator */
.chat-typing {
  display: none;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: typingDot 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  max-height: 100px;
  overflow-y: auto;
}
.chat-input:focus { border-color: rgba(255,107,43,0.4); }
.chat-input::placeholder { color: rgba(142,142,154,0.5); }
.chat-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, transform 0.1s;
  align-self: flex-end;
}
.chat-send:hover { background: #e55a1f; }
.chat-send:active { transform: scale(0.95); }

@media (max-width: 480px) {
  .hero-headline { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .chat-box { width: calc(100vw - 32px); right: -8px; bottom: 72px; }
  .chat-bubble { right: -4px; }
}
