:root {
  --analyst-bg: #050505;
  --analyst-surface: rgba(19, 19, 17, 0.78);
  --analyst-surface-2: rgba(2, 6, 23, 0.6);
  --analyst-border: rgba(255, 255, 255, 0.10);
  --analyst-text: #f4f1df;
  --analyst-muted: #b8b49f;
  --analyst-accent: #ffff63;
  --analyst-accent-2: #f6a826;
  --analyst-danger: #fb7185; /* rose-400 */
  --analyst-success: #34d399; /* emerald-400 */
  --analyst-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html,
body {
  background: var(--analyst-bg);
}

body {
  color: var(--analyst-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 18% 5%, rgba(255, 255, 99, 0.14), transparent 62%),
    radial-gradient(800px 460px at 84% 12%, rgba(246, 168, 38, 0.13), transparent 58%),
    linear-gradient(to bottom, rgba(5, 5, 5, 0.82), rgba(5, 5, 5, 0.98));
}

/* Reusable components */
.analyst-card {
  background: var(--analyst-surface);
  border: 1px solid var(--analyst-border);
  box-shadow: var(--analyst-shadow);
  border-radius: 8px;
}

.analyst-card--flat {
  box-shadow: none;
  background: rgba(15, 23, 42, 0.55);
}

.analyst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, color 140ms ease;
  user-select: none;
}

.analyst-btn:active {
  transform: translateY(1px);
}

.analyst-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.analyst-btn--primary {
  background: linear-gradient(135deg, rgba(255, 255, 99, 0.98), rgba(246, 168, 38, 0.98));
  color: #111105;
}

.analyst-btn--primary:hover {
  filter: brightness(1.04);
}

.analyst-btn--secondary {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--analyst-text);
}

.analyst-btn--secondary:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.32);
}

.analyst-btn--danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.30);
  color: #fecdd3;
}

.analyst-btn--danger:hover {
  background: rgba(251, 113, 133, 0.18);
}

.analyst-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.35);
  color: var(--analyst-muted);
}

.analyst-link {
  color: rgba(255, 255, 99, 0.95);
  text-decoration: none;
}

.analyst-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.devra-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 74vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background-image: url("/static/devra_ai/images/data-science-bee-bkgnd-2.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: var(--analyst-shadow);
}

.devra-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 38% 44%, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.58) 100%);
}

#bee-animation-container {
  position: absolute;
  inset: 0;
  z-index: 2;
}

#bee-animation-container canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.devra-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.38));
  pointer-events: none;
}

.devra-hero__content {
  position: relative;
  z-index: 4;
  width: min(680px, calc(100% - 2rem));
  margin-left: clamp(1rem, 5vw, 4rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.devra-hero__logo {
  width: min(220px, 60vw);
  height: auto;
}

.devra-hero__eyebrow,
.devra-section-label {
  margin-top: 1.5rem;
  color: #ffff63;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.devra-section-label {
  margin-top: 0;
}

.devra-hero h1 {
  margin-top: 0.75rem;
  max-width: 12ch;
  color: #fffde5;
  font-size: clamp(2.5rem, 5.25rem, 5.5rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: 0;
}

.devra-hero__copy {
  margin-top: 1.2rem;
  max-width: 46rem;
  color: rgba(244, 241, 223, 0.9);
  font-size: clamp(1rem, 1.15rem, 1.2rem);
  line-height: 1.6;
}

.devra-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.devra-upload {
  scroll-margin-top: 6rem;
}

.devra-free-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 10rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 99, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 99, 0.08);
}

.devra-free-badge span {
  color: #ffff63;
  font-size: 1.1rem;
  font-weight: 800;
}

.devra-free-badge small {
  color: var(--analyst-muted);
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .devra-hero {
    min-height: 620px;
    align-items: flex-end;
  }

  .devra-hero__content {
    width: calc(100% - 1.5rem);
    margin: 0 0.75rem 0.75rem;
  }

  .devra-hero h1 {
    max-width: 11ch;
    font-size: 3rem;
  }
}

/* Form defaults */
.analyst-input,
.analyst-textarea {
  width: 100%;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--analyst-text);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
}

.analyst-input:focus,
.analyst-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .analyst-btn {
    transition: none;
  }
}
