/* ═══════════════════════════════════════════════════════════════
   IngenLab - Global Theme
   Private AI for Regulated Industries
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Brand palette */
  --color-primary: #10b981;        /* emerald-500 */
  --color-primary-light: #34d399;  /* emerald-400 */
  --color-primary-dark: #059669;   /* emerald-600 */

  /* Surface palette (zinc dark) */
  --color-bg: #09090b;             /* zinc-950 */
  --color-surface: #18181b;        /* zinc-900 */
  --color-surface-elevated: #27272a; /* zinc-800 */
  --color-surface-hover: #3f3f46;  /* zinc-700 */

  /* Text palette */
  --color-text: #ffffff;
  --color-text-secondary: #a1a1aa; /* zinc-400 */
  --color-text-muted: #71717a;     /* zinc-500 */
  --color-text-faint: #52525b;     /* zinc-600 */

  /* Border palette */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-subtle: rgba(255, 255, 255, 0.05);
  --color-border-hover: rgba(255, 255, 255, 0.10);

  /* Domain accent colors */
  --color-sales: #a78bfa;         /* violet-400 */
  --color-rnd: #34d399;           /* emerald-400 */
  --color-compliance: #60a5fa;    /* blue-400 */
  --color-productivity: #fb923c;  /* orange-400 */
  --color-ip-legal: #fbbf24;      /* amber-400 */

  /* Spacing scale */
  --section-padding-y: 6rem;      /* py-24 */
  --section-padding-y-lg: 7rem;   /* py-28 */
  --container-padding-x: 1.5rem;  /* px-6 */

  /* Border radius */
  --radius-sm: 0.75rem;           /* rounded-xl */
  --radius-md: 1rem;              /* rounded-2xl */
  --radius-lg: 1.5rem;            /* rounded-3xl */
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* ── Base / Reset ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Selection */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

/* Focus ring - accessible, brand-colored */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Scroll Snap (homepage) ─────────────────────────────────── */
html.snap-scroll {
  scroll-snap-type: y proximity;
}

.snap-scroll section {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

/* ── Parallax layers ────────────────────────────────────────── */
[data-parallax] {
  will-change: transform;
}

/* ── Hero gradient ──────────────────────────────────────────── */
.hero-gradient {
  background: radial-gradient(
    ellipse 80% 60% at 60% 100%,
    rgba(16, 185, 129, 0.08) 0%,
    transparent 70%
  );
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up   { animation: fadeUp 0.7s ease both; }
.fade-up-2 { animation: fadeUp 0.7s 0.12s ease both; }
.fade-up-3 { animation: fadeUp 0.7s 0.22s ease both; }
.fade-up-4 { animation: fadeUp 0.7s 0.32s ease both; }

/* ── Card Patterns ──────────────────────────────────────────── */

/* Gradient top-line accent (market page cards) */
.card-top-line {
  position: relative;
}

.card-top-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(52, 211, 153, 0.25),
    transparent
  );
}

/* ── Glow Effects ───────────────────────────────────────────── */
.glow-emerald {
  box-shadow: 0 0 48px rgba(16, 185, 129, 0.07);
}

.stat-glow {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.08);
}

/* ── Gradient Separators ────────────────────────────────────── */
.separator {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

/* ── Timeline connector (use-case page) ─────────────────────── */
.timeline-line {
  position: relative;
}

.timeline-line::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 3.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgb(52 211 153 / 0.4),
    rgb(52 211 153 / 0.05)
  );
}

/* ── Score Bars (market page comparison) ─────────────────────── */
.score-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Scrollbar Styling ──────────────────────────────────────── */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: var(--radius-full);
}

.scrollbar-none {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* ── Nav (frosted glass) ────────────────────────────────────── */
.nav-blur {
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base),
              color var(--transition-base);
}

.btn-primary:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base),
              transform var(--transition-fast);
}

.btn-cta:hover {
  background: var(--color-primary-light);
}

.btn-cta:active {
  transform: scale(0.95);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-base);
}

.btn-ghost:hover {
  color: var(--color-text);
}

/* ── Pill Badges ────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  transition: border-color var(--transition-base);
}

.pill:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary-light);
}

/* Category tag badges */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.625rem;
  border: 1px solid;
}

.tag-emerald {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.tag-violet {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}

.tag-blue {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

.tag-orange {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.2);
}

.tag-amber {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

/* ── Icon Badges ────────────────────────────────────────────── */
.icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
}

.icon-badge-sm {
  width: 2.25rem;
  height: 2.25rem;
}

.icon-badge-md {
  width: 2.5rem;
  height: 2.5rem;
}

.icon-badge-lg {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
}

/* ── Section Headings ───────────────────────────────────────── */
.section-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 0.75rem;
}

/* ── Comparison Table ───────────────────────────────────────── */
.comparison-table {
  width: 100%;
  font-size: 0.875rem;
  text-align: center;
  border-collapse: collapse;
}

.comparison-table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table tbody {
  --tw-divide-opacity: 1;
}

.comparison-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-base);
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
}

/* ── Survey Modal ───────────────────────────────────────────── */
.survey-backdrop {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --section-padding-y: 4rem;
    --section-padding-y-lg: 5rem;
  }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  nav,
  .survey-backdrop,
  #survey-modal,
  footer {
    display: none !important;
  }
}
