@import "tailwindcss";

:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --ink: #0f172a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ */
/*  Article / page prose                                               */
/* ------------------------------------------------------------------ */
.prose {
  line-height: 1.75;
  color: #1e293b;
  font-size: 1.0625rem;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.75em 0 0.6em;
  scroll-margin-top: 6rem;
}
.prose h1 {
  font-size: 2rem;
}
.prose h2 {
  font-size: 1.5rem;
  padding-bottom: 0.35em;
  border-bottom: 1px solid #e2e8f0;
}
.prose h3 {
  font-size: 1.2rem;
}
.prose p {
  margin: 0 0 1.1em;
}
.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li {
  margin: 0.35em 0;
}
.prose blockquote {
  border-left: 4px solid var(--brand);
  background: #eef2ff;
  padding: 0.9em 1.2em;
  margin: 0 0 1.1em;
  border-radius: 0.4rem;
  color: #3730a3;
}
.prose img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
  margin: 1.2em 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.1em;
  font-size: 0.95rem;
}
.prose table th,
.prose table td {
  border: 1px solid #e2e8f0;
  padding: 0.6em 0.8em;
  text-align: left;
}
.prose table th {
  background: #f1f5f9;
  font-weight: 600;
}
.prose .faq-item {
  margin: 0 0 0.9em;
  padding: 1em 1.1em;
  border: 1px solid #e2e8f0;
  border-radius: 0.7rem;
  background: #fff;
}
.prose .faq-item h3 {
  margin: 0 0 0.4em;
  font-size: 1.05rem;
}
.prose .faq-item p {
  margin: 0;
}
.prose hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

/* ------------------------------------------------------------------ */
/*  Rich text editor                                                   */
/* ------------------------------------------------------------------ */
.richtext {
  min-height: 320px;
  outline: none;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  background: #fff;
  line-height: 1.7;
  color: #1e293b;
}
.richtext:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.richtext h2,
.richtext h3 {
  font-weight: 700;
  margin: 0.8em 0 0.4em;
}
.richtext h2 {
  font-size: 1.4rem;
}
.richtext h3 {
  font-size: 1.15rem;
}
.richtext p {
  margin: 0 0 0.6em;
}
.richtext ul {
  list-style: disc;
  padding-left: 1.5em;
}
.richtext ol {
  list-style: decimal;
  padding-left: 1.5em;
}
.richtext blockquote {
  border-left: 4px solid var(--brand);
  background: #eef2ff;
  padding: 0.6em 1em;
  margin: 0.6em 0;
  border-radius: 0.4rem;
}
.richtext table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0;
}
.richtext table td,
.richtext table th {
  border: 1px solid #cbd5e1;
  padding: 0.4em 0.6em;
}
.richtext .faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.6em 0.8em;
  margin: 0.5em 0;
}
.richtext .faq-item h3 {
  margin: 0 0 0.3em;
}

/* ------------------------------------------------------------------ */
/*  Animations                                                         */
/* ------------------------------------------------------------------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-up {
  animation: fadeInUp 0.4s ease both;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.animate-pulse-dot {
  animation: pulseDot 1.2s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
}

/* Scrollbar polish */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
