/* Hero section + AuditBot section + chatbot styles */

/* ===== Hero (full-width text) ===== */

.hero {
  position: relative;
  padding: 88px 0 128px;
  overflow: hidden;
}
/* When hero is used as a layer inside the sticky scroll container */
.hero.hero-reveal-layer {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hero-reveal-container {
  /* Inherits the body background/grid for continuity */
}
.hero-reveal-sticky {
  background: transparent;
}
.hero::before {
  content: none;
}
.hero.hero-reveal-layer::before {
  display: none;
}

.orbit {
  position: absolute;
  top: -60px;
  right: -100px;
  width: 600px;
  height: 600px;
  z-index: 0;
  animation: slowspin 90s linear infinite;
  opacity: 0.32;
  pointer-events: none;
}
@keyframes slowspin { to { transform: rotate(360deg); } }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
}

.hero-title {
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.01;
  letter-spacing: -0.035em;
  margin: 28px 0 28px;
  color: #ffffff;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-blur-line {
  display: block;
  margin-bottom: 0.05em;
}
.hero-title-accent {
  color: #ffffff;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  max-width: 540px;
  margin: 0 0 40px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 540px;
}
.hero-meta-k { font-size: 10px; letter-spacing: 0.2em; color: var(--accent-2); margin-bottom: 6px; font-family: 'IBM Plex Mono', monospace; }
.hero-meta-v { font-size: 14px; color: rgba(255, 255, 255, 0.55); }

/* ===== AuditBot Section ===== */

.section-auditbot {
  padding: 40px 0 128px;
}

.auditbot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.auditbot-info {
  position: sticky;
  top: 96px;
  padding-top: 16px;
}

.auditbot-title {
  font-size: clamp(36px, 3.8vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 20px 0 0;
  color: var(--fg);
}
.auditbot-title em {
  font-style: italic;
  color: color-mix(in oklab, var(--fg) 50%, var(--accent) 50%);
}

.auditbot-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 20px 0 40px;
  max-width: 420px;
}

.auditbot-features {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
}

.auditbot-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}

.auditbot-feature-n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  padding: 6px 10px;
  border: 1px solid color-mix(in oklab, var(--accent-2) 25%, var(--line));
  border-radius: 7px;
  min-width: 44px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 3px;
  background: color-mix(in oklab, var(--accent-2) 6%, transparent);
}

.auditbot-feature-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.auditbot-feature-body {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* Blue chip variant */
.chip-blue {
  border-color: color-mix(in oklab, var(--accent-2) 30%, var(--line));
  color: var(--accent-2);
}
.chip-blue .dot-blue {
  background: var(--accent-2) !important;
  animation: pulse-blue 2s infinite !important;
}
@keyframes pulse-blue {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent-2) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent-2) 0%, transparent); }
}

/* ===== Chatbot ===== */

.chatbot {
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.chatbot-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.chatbot-head-left { display: flex; gap: 12px; align-items: center; }
.bot-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 30%, transparent);
}
.bot-avatar::after {
  content: ""; position: absolute; bottom: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 99px;
  background: var(--accent); border: 2px solid var(--bg-card);
}
.bot-name { font-size: 14px; font-weight: 500; color: var(--fg); }
.bot-status { font-size: 11px; color: var(--fg-muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; font-family: 'IBM Plex Mono', monospace; }
.bot-status .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); }
.bot-progress { font-size: 11px; color: var(--fg-muted); letter-spacing: 0.1em; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }

.chatbot-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
}
.chatbot-body::-webkit-scrollbar { width: 4px; }
.chatbot-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.msg { display: flex; animation: msgIn .3s ease; }
.msg-bot { justify-content: flex-start; }
.msg-user { justify-content: flex-end; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bubble {
  max-width: 85%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.msg-bot .bubble {
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  color: var(--fg);
  border-top-left-radius: 4px;
}
.msg-user .bubble {
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 75%, var(--accent-2) 25%));
  color: var(--accent-ink);
  border-top-right-radius: 4px;
  font-weight: 500;
}

.typing { display: inline-flex; gap: 4px; align-items: center; height: 14px; }
.typing span {
  width: 6px; height: 6px; border-radius: 99px;
  background: var(--fg-muted);
  animation: dot 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chatbot-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-card-2) 40%, transparent);
}
.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-reply {
  padding: 9px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--fg);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.chip-reply:hover { border-color: var(--accent); color: var(--accent); }
.chip-reply.selected { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.send-btn {
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 99px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 16px color-mix(in oklab, var(--accent) 30%, transparent);
}

.email-input { display: flex; gap: 8px; }
.email-input input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
}
.email-input input:focus { outline: none; border-color: var(--accent-2); }
.email-input button {
  padding: 12px 18px;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.email-input button:disabled { opacity: 0.4; cursor: not-allowed; }

.done-footer {
  font-size: 11px; letter-spacing: 0.15em; color: var(--accent);
  text-align: center; padding: 6px;
}

/* ── Chatbot completion state ──────────────────────────────────── */

.chatbot-done-card {
  margin: 8px 0 4px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, #22c55e 30%, var(--line));
  background: color-mix(in oklab, #22c55e 6%, var(--bg-card));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  animation: doneIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes doneIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-done-icon {
  width: 40px;
  height: 40px;
  border-radius: 99px;
  background: color-mix(in oklab, #22c55e 20%, var(--bg-card));
  border: 1.5px solid color-mix(in oklab, #22c55e 50%, transparent);
  display: grid;
  place-items: center;
  color: #22c55e;
}

.chatbot-done-icon svg {
  width: 18px;
  height: 18px;
}

.chatbot-done-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.chatbot-done-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 280px;
}

.chatbot-done-note {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
  margin-top: 4px;
}

.chatbot-done-input-placeholder {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in oklab, #22c55e 30%, var(--line));
  background: color-mix(in oklab, #22c55e 5%, var(--bg));
  color: #22c55e;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-align: center;
  width: 100%;
}

/* ===== Responsive ===== */

@media (max-width: 1100px) {
  .auditbot-grid { grid-template-columns: 1fr; gap: 48px; }
  .auditbot-info { position: static; }
}
@media (max-width: 960px) {
  .hero { padding: 64px 0 100px; }
  .orbit { width: 380px; height: 380px; right: -60px; top: -20px; opacity: 0.22; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .auditbot-grid { gap: 36px; }
}

/* ===== Mobile fixes (max 767px) ===== */
@media (max-width: 767px) {
  /* Hero — reduce vertical padding and ensure no horizontal bleed */
  .hero {
    padding: 56px 0 80px;
    overflow-x: hidden;
  }

  /* Hero content — constrain to available width so no child can widen it */
  .hero-content {
    min-width: 0;
    width: 100%;
  }

  /* Hero title — reduce font size floor on very small screens */
  .hero-title {
    font-size: clamp(28px, 8vw, 48px);
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Hero sub — allow full width on mobile */
  .hero-sub {
    max-width: 100%;
    font-size: 15px;
  }

  /* Hero meta — collapse two-column grid to single column on mobile */
  .hero-meta {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 16px;
  }

  /* Hero CTA buttons — allow vertical stacking if both buttons don't fit */
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 48px;
  }

  /* Orbit — hide entirely on very small screens to eliminate decorative overflow */
  .orbit {
    display: none;
  }

  /* AuditBot — reorder columns so chatbot appears below the copy on mobile */
  .auditbot-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Move chatbot to bottom on mobile (info copy is more important above the fold) */
  .auditbot-chatbot {
    order: 2;
  }
  .auditbot-info {
    order: 1;
  }

  /* Allow desc to fill full width */
  .auditbot-desc {
    max-width: 100%;
  }

  /* Section auditbot — tighten bottom padding */
  .section-auditbot {
    padding: 32px 0 80px;
  }

  /* Email input — stack vertically on very small screens */
  .email-input {
    flex-direction: column;
  }
  .email-input button {
    width: 100%;
    padding: 14px 18px;
  }
}
