/* =========
   Base
   ========= */
:root {
  --bg-page: #f7f9fc;
  --bg-alt: #f3f4f6;
  --bg-card: #ffffff;
  --bg-chip-success: #dcfce7;
  --bg-chip-warning: #fef3c7;

  --border-soft: #e5e7eb;

  --text-main: #0f172a;
  --text-muted: #6b7280;
  --text-accent: #1d4ed8;

  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
}

/* keep old .container from css/style.css in charge;
   we only style our sections specifically */

/* Limit logo size so it doesn’t cover everything */
.logo-icon,
.footer-logo {
  max-width: 160px;
  height: auto;
  display: block;
}

/* =========
   Global buttons and chips
   ========= */

.btn,
.btn-outline,
.btn-ghost,
.btn-link,
.btn-solid {
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-primary,
.btn-solid {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

.btn-primary:hover,
.btn-solid:hover {
  background: #1e40af;
  border-color: #1e40af;
}

.btn-ghost,
.btn-outline {
  background: transparent;
  color: #111827;
  border-color: #d1d5db;
}

.btn-ghost:hover,
.btn-outline:hover {
  background: #e5e7eb;
}

.btn-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--text-accent);
}

.btn-link:hover {
  text-decoration: underline;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}

.metric-chip.success {
  background: var(--bg-chip-success);
  color: #15803d;
}

.metric-chip.warning {
  background: var(--bg-chip-warning);
  color: #b45309;
}

/* =========
   Auth banner (top)
   ========= */

.site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 0.75rem;
  padding: 0.45rem 1.25rem;
  font-size: 0.9rem;
  background: #e0ecff;
  color: #111827;
}

.site-banner .btn {
  font-size: 0.85rem;
  padding-inline: 0.85rem;
}

/* =========
   Hero
   ========= */

.hero {
  padding: 4rem 1.5rem 3.5rem;
  background: radial-gradient(circle at top left, #dbeafe 0, #eff6ff 45%, #f9fafb 100%);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.1;
  margin: 0.5rem 0 0.85rem;
}

.hero-subtitle {
  margin: 0.5rem 0 1.5rem;
  color: var(--text-muted);
  max-width: 35rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: #6366f1;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.hero-footnote {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========
   Hero panel card
   ========= */

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-panel-card {
  background: var(--bg-card);
  border-radius: 26px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  max-width: 380px;
  width: 100%;
}

.hero-panel-card h2 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.hero-metrics {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.hero-metrics li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 0.4rem;
  font-size: 0.9rem;
  border-bottom: 1px dashed #e5e7eb;
}

.hero-metrics li:last-child {
  border-bottom: none;
}

.metric-label {
  color: var(--text-muted);
}

.metric-value {
  font-weight: 600;
}

.hero-note {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* =========
   Sections
   ========= */

.section {
  padding: 3.5rem 1.5rem;
}

.section.alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: 960px;
  margin: 0 auto 2.25rem;
  text-align: left;
}

.section-header h2 {
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* =========
   Grids & Cards
   ========= */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.04);
}

.card.compact {
  padding: 1.25rem 1.35rem;
}

.card.ghost {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(9px);
  border-style: dashed;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.card p {
  margin-top: 0.35rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
}

.card-list {
  list-style: none;
  padding-left: 1rem;
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}

.card-list li {
  position: relative;
  margin-bottom: 0.4rem;
}

.card-list li::before {
  content: "•";
  position: absolute;
  left: -0.7rem;
  color: #4f46e5;
}

/* =========
   Cookie banner
   ========= */

.cookie-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.5rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  background: #111827;
  color: #f9fafb;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.5);
  z-index: 9000;
}

.cookie-content p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.cookie-content a {
  color: #bfdbfe;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9050;
}

.cookie-modal .modal-content {
  background: #ffffff;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: calc(100% - 2rem);
  color: #111827;
}

.cookie-modal label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* =========
   Back to top
   ========= */

#backToTop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #f9fafb;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
  z-index: 9100;
}

/* =========
   Chatbot widget
   ========= */

#chatbot-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

#chatbot-toggle {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.55);
}

#chatbot-box {
  width: 320px;
  max-height: 480px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chatbot-box.hidden {
  display: none;
}

#chatbot-header {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #f9fafb;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.7rem;
  font-size: 0.86rem;
}

#chatbot-controls {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-top: 1px solid #e5e7eb;
}

#chatbot-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
}

#chatbot-send {
  border-radius: 999px;
  border: none;
  padding: 0.35rem 0.9rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.86rem;
  cursor: pointer;
}
#chatbot-send:hover {
  background: #1e40af;
}

/* =========
   Small tweaks
   ========= */

.page-updated {
  text-align: left;
  padding-inline: 1.5rem;
}
/* === CRITICAL FIX: prevent SPA layers from blocking chatbot clicks === */

#page-root {
  pointer-events: none;
}

#home-content {
  pointer-events: auto;
}

/* Ensure chatbot always receives clicks */
#chatbot-container,
#chatbot-container * {
  pointer-events: auto !important;
}
/* --- Chatbot interaction safety override --- */
#chatbot-container,
#chatbot-container * {
  pointer-events: auto !important;
}

#chatbot-container {
  z-index: 99999 !important;
}
/* --- SPA container should not block fixed widgets --- */
#page-root:empty {
  pointer-events: none;
}
