:root {
  --rk-blue: #2563eb;
  --rk-blue-dark: #1d4ed8;
  --rk-blue-700: #1e40af;
  --rk-sky: #eff6ff;
  --rk-ink: #0f172a;
  --rk-slate: #475569;
  --rk-muted: #64748b;
  --rk-border: #dbeafe;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--rk-ink);
  background: linear-gradient(180deg, #f0f7ff 0%, #eef4ff 40%, #ffffff 100%);
  background-attachment: fixed;
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
   Fixed WebGL background canvas — stays put while the page scrolls, so the blue
   plasma lines flow continuously through every section and across pages.
   Drawing logic lives in assets/js/shader-background.js.
--------------------------------------------------------------------------- */
.rk-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  pointer-events: none;
  /* Light fallback shown before WebGL paints / if unsupported. */
  background: linear-gradient(180deg, #f0f7ff 0%, #eaf2ff 50%, #ffffff 100%);
}

/* ---------------------------------------------------------------------------
   Layout helpers / translucent surfaces so the background shows through.
--------------------------------------------------------------------------- */
.rk-navbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rk-border);
}

.rk-logo {
  height: 34px;
  width: auto;
}

.rk-section {
  padding: 6rem 0;
  border-top: 1px solid rgba(219, 234, 254, 0.7);
}

.rk-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rk-blue);
}

.rk-display {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.text-rk-slate {
  color: var(--rk-slate);
}

.text-rk-muted {
  color: var(--rk-muted);
}

.btn-rk {
  background: var(--rk-blue);
  border-color: var(--rk-blue);
  color: #fff;
  font-weight: 600;
}
.btn-rk:hover {
  background: var(--rk-blue-dark);
  border-color: var(--rk-blue-dark);
  color: #fff;
}

.btn-rk-outline {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--rk-border);
  color: var(--rk-blue-700);
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.btn-rk-outline:hover {
  background: #fff;
  color: var(--rk-blue-dark);
}

/* Cards / surfaces */
.rk-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--rk-border);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
}
.rk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(37, 99, 235, 0.35);
  border-color: #bfdbfe;
}

.rk-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: var(--rk-sky);
  color: var(--rk-blue);
  font-size: 1.35rem;
}

.rk-badge-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rk-border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--rk-blue-700);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
}

.rk-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0;
  color: var(--rk-slate);
  font-size: 0.95rem;
}
.rk-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--rk-blue);
}

/* Step badges */
.rk-step-num {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 1px solid var(--rk-border);
  background: #fff;
  color: var(--rk-blue);
  font-weight: 700;
  box-shadow: 0 6px 16px -10px rgba(37, 99, 235, 0.5);
}

/* CTA banner */
.rk-cta {
  background: linear-gradient(135deg, var(--rk-blue) 0%, #3b82f6 100%);
  border-radius: 1.5rem;
  color: #fff;
  box-shadow: 0 30px 60px -25px rgba(37, 99, 235, 0.6);
}

/* Footer */
.rk-footer {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--rk-border);
}
.rk-social a {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--rk-sky);
  color: var(--rk-blue);
  font-size: 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.rk-social a:hover {
  background: var(--rk-blue);
  color: #fff;
}

/* Hero spacing under fixed navbar */
.rk-hero {
  padding: 7rem 0 6rem;
}

/* Document cards */
.rk-doc:hover h3 {
  color: var(--rk-blue-dark) !important;
}

/* ---------------------------------------------------------------------------
   Chat widget
--------------------------------------------------------------------------- */
.rk-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1080;
}

.rk-chat-toggle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  border: none;
  background: var(--rk-blue);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.rk-chat-toggle:hover {
  background: var(--rk-blue-dark);
  transform: translateY(-2px);
}

.rk-chat-panel {
  position: absolute;
  right: 0;
  bottom: 4.25rem;
  width: min(23rem, calc(100vw - 2.5rem));
  height: min(30rem, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--rk-border);
  border-radius: 1rem;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.4);
  overflow: hidden;
}

.rk-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rk-border);
  background: var(--rk-sky);
}
.rk-chat-avatar {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--rk-blue);
  color: #fff;
  font-weight: 700;
}

.rk-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.rk-msg {
  display: flex;
}
.rk-msg-user {
  justify-content: flex-end;
}
.rk-bubble {
  max-width: 85%;
  padding: 0.55rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.rk-msg-assistant .rk-bubble {
  background: var(--rk-sky);
  color: var(--rk-ink);
  border-bottom-left-radius: 0.25rem;
}
.rk-msg-user .rk-bubble {
  background: var(--rk-blue);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.rk-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--rk-border);
  background: #fff;
}
.rk-chat-form .btn {
  flex: 0 0 auto;
}
