/* ============================================
   Smart Desizns — Premium Agency Design System
   v2.0 · Dark-first · 2026-06-17
   ============================================ */

:root {
  /* Surfaces */
  --bg: #07090F;
  --surface: #0B0E18;
  --surface-1: #11152A;
  --surface-2: #161B33;
  --border: #1F2647;
  --border-bright: #2B345C;

  /* RGB triplets — drive Tailwind ink/white/brand utilities so light mode can flip them */
  --white-rgb: 255 255 255;
  --ink-0-rgb: 7 9 15;
  --ink-1-rgb: 11 14 24;
  --ink-2-rgb: 17 21 42;
  --ink-3-rgb: 22 27 51;
  --ink-4-rgb: 31 38 71;
  --brand-200-rgb: 199 205 255;
  --brand-400-rgb: 139 149 255;

  /* Text — all pass WCAG AA on #07090F, body+muted pass AAA */
  --text: #FAFAFC;          /* primary body — 19:1 contrast */
  --text-muted: #B6BDCC;    /* secondary — 9:1 contrast */
  --text-dim: #8189A0;      /* tertiary / captions — 5.5:1 contrast (was 5.0:1, lifted) */

  /* Brand — electric indigo */
  --brand-50: #EEF0FF;
  --brand-200: #C7CDFF;
  --brand-400: #8B95FF;
  --brand-500: #6366F1;
  --brand-600: #4F46E5;
  --brand-700: #3D38BD;

  /* CTA — warm amber */
  --warm-400: #FBBF24;
  --warm-500: #F59E0B;
  --warm-600: #D97706;

  /* State */
  --emerald: #10B981;
  --rose: #EF4444;
  --sky: #38BDF8;
  --violet: #A78BFA;

  /* Type */
  --font-display: 'Geist', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadow */
  --glow-brand: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 8px 40px -8px rgba(99, 102, 241, 0.35);
  --glow-warm: 0 0 0 1px rgba(245, 158, 11, 0.3), 0 12px 32px -8px rgba(245, 158, 11, 0.4);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: 'ss01', 'cv11';
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  font-weight: 600;
}

/* ============================================
   Mesh / gradient backgrounds
   ============================================ */

.bg-grid {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

.bg-mesh {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(245, 158, 11, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(167, 139, 250, 0.10) 0%, transparent 60%);
}

.bg-mesh-soft {
  background:
    radial-gradient(ellipse 40% 30% at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

/* glowing orbs */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: orb-breathe 10s var(--ease) infinite;
}
.orb-brand { background: rgba(99, 102, 241, 0.35); animation-delay: -2s; }
.orb-warm { background: rgba(245, 158, 11, 0.28); animation-delay: -5s; }
.orb-violet { background: rgba(167, 139, 250, 0.25); animation-delay: -7s; }

@keyframes orb-breathe {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.95; }
  50%      { transform: translate(20px, -16px) scale(1.06); opacity: 1; }
}

/* Animated mesh — slow shift behind hero */
.bg-mesh-animated {
  position: relative;
  isolation: isolate;
}
.bg-mesh-animated::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 45% 35% at 80% 30%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 90%, rgba(167, 139, 250, 0.14) 0%, transparent 60%);
  animation: mesh-shift 22s var(--ease) infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes mesh-shift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-3%, 1%) scale(1.04); }
  66%      { transform: translate(2%, -2%) scale(1.02); }
}

/* ============================================
   Scroll progress bar (top)
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-500), var(--warm-500));
  z-index: 100;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.55);
  transition: width 80ms linear;
  pointer-events: none;
}

/* ============================================
   Card surfaces
   ============================================ */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 240ms var(--ease), transform 240ms var(--ease), background 240ms var(--ease);
}

.card:hover {
  border-color: var(--border-bright);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
}

.card-glow {
  position: relative;
}
.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(245, 158, 11, 0.35), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 240ms var(--ease);
  pointer-events: none;
}
.card-glow:hover::before {
  opacity: 1;
}

/* ============================================
   Cursor spotlight (used on bento product cards)
   ============================================ */
.spotlight {
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
}
.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mx) var(--my),
    rgba(99, 102, 241, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 280ms var(--ease);
  pointer-events: none;
  z-index: 0;
}
.spotlight:hover::after { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* ============================================
   Tilt (3D mouse tracking)
   ============================================ */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 320ms var(--ease);
}

/* ============================================
   Magnetic buttons (JS sets translate)
   ============================================ */
.magnetic {
  will-change: transform;
  transition: transform 280ms var(--ease-spring), filter 200ms var(--ease), box-shadow 240ms var(--ease);
}

/* ============================================
   Product preview thumbnails (bento)
   ============================================ */
.thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.thumb-bg {
  position: absolute;
  inset: 0;
}
.thumb-pharmacy {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.30), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(99, 102, 241, 0.25), transparent 60%),
    linear-gradient(135deg, #062B22, #0A1530);
}
.thumb-society {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(99, 102, 241, 0.32), transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(245, 158, 11, 0.20), transparent 60%),
    linear-gradient(135deg, #131933, #0A1024);
}
.thumb-hospital {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(239, 68, 68, 0.28), transparent 60%),
    radial-gradient(ellipse at 50% 90%, rgba(56, 189, 248, 0.25), transparent 60%),
    linear-gradient(135deg, #23121C, #0A1530);
}
.thumb-school {
  background:
    radial-gradient(ellipse at 25% 30%, rgba(245, 158, 11, 0.32), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(99, 102, 241, 0.28), transparent 60%),
    linear-gradient(135deg, #2A1F0C, #0F1530);
}
.thumb-astrology {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(217, 119, 6, 0.40), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(99, 102, 241, 0.30), transparent 60%),
    linear-gradient(135deg, #1F1106, #0E0B2A);
}
.thumb-ride {
  background:
    radial-gradient(ellipse at 25% 30%, rgba(56, 189, 248, 0.30), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(167, 139, 250, 0.25), transparent 60%),
    linear-gradient(135deg, #0A1B2E, #0B0E2A);
}
.thumb-food {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(245, 158, 11, 0.32), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(239, 68, 68, 0.22), transparent 60%),
    linear-gradient(135deg, #2A1808, #1A0B18);
}
.thumb-quick {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(245, 158, 11, 0.35), transparent 60%),
    radial-gradient(ellipse at 75% 80%, rgba(16, 185, 129, 0.22), transparent 60%),
    linear-gradient(135deg, #2A1808, #052619);
}
.thumb-super {
  background:
    radial-gradient(ellipse at 25% 25%, rgba(99, 102, 241, 0.30), transparent 60%),
    radial-gradient(ellipse at 75% 75%, rgba(245, 158, 11, 0.25), transparent 60%),
    linear-gradient(135deg, #0B0E2A, #1F1B0A);
}
.thumb-video {
  background:
    radial-gradient(ellipse at 40% 40%, rgba(239, 68, 68, 0.30), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(167, 139, 250, 0.28), transparent 60%),
    linear-gradient(135deg, #23121C, #160B30);
}
.thumb-creator {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(217, 119, 6, 0.32), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(239, 68, 68, 0.22), transparent 60%),
    linear-gradient(135deg, #2A1808, #23121C);
}
.thumb-pharmacy-erp {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(56, 189, 248, 0.30), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(99, 102, 241, 0.30), transparent 60%),
    linear-gradient(135deg, #0A1B2E, #11152A);
}
.thumb-hospital-erp {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(167, 139, 250, 0.28), transparent 60%),
    radial-gradient(ellipse at 80% 75%, rgba(56, 189, 248, 0.30), transparent 60%),
    linear-gradient(135deg, #160B30, #0A1B2E);
}

.thumb svg.thumb-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56%;
  height: 56%;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}
.thumb-flagship svg.thumb-icon { width: 38%; height: 38%; }
.thumb-flagship { aspect-ratio: 16 / 7; }

/* Mock window chrome on thumbs */
.thumb-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  align-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent);
  z-index: 2;
}
.thumb-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
}
.thumb-chrome span:first-child { background: rgba(239, 68, 68, 0.7); }
.thumb-chrome span:nth-child(2) { background: rgba(245, 158, 11, 0.7); }
.thumb-chrome span:nth-child(3) { background: rgba(16, 185, 129, 0.7); }

/* HERO mockup showcase */
.mockup-stage {
  position: relative;
  perspective: 1400px;
}
.mockup-stage img,
.mockup-stage .mockup-window {
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.15);
  background: linear-gradient(180deg, var(--surface-1), var(--surface));
  overflow: hidden;
  position: absolute;
}
.mockup-window .mw-chrome {
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mockup-window .mw-chrome span {
  width: 10px; height: 10px; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
}
.mockup-window .mw-chrome span:first-child { background: rgba(239, 68, 68, 0.85); }
.mockup-window .mw-chrome span:nth-child(2) { background: rgba(245, 158, 11, 0.85); }
.mockup-window .mw-chrome span:nth-child(3) { background: rgba(16, 185, 129, 0.85); }

.float-slow { animation: float 9s var(--ease) infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Showcase / portfolio strip on homepage */
.showcase-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  isolation: isolate;
}
.showcase-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease);
  filter: saturate(0.85) brightness(0.55);
}
.showcase-card:hover img {
  transform: scale(1.06);
  filter: saturate(1) brightness(0.7);
}
.showcase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 9, 15, 0.85));
  z-index: 1;
}
.showcase-card-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 20px;
  z-index: 2;
}

.card-elevated {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 240ms var(--ease), background 240ms var(--ease);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--warm-400) 0%, var(--warm-500) 50%, var(--warm-600) 100%);
  color: #1a1505;
  box-shadow: var(--glow-warm), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================
   Nav
   ============================================ */

.nav-shell {
  background: rgba(11, 14, 24, 0.7);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.6);
  transition: padding 280ms var(--ease), background 280ms var(--ease), box-shadow 280ms var(--ease);
}
.nav-shell.nav-shrunk {
  background: rgba(11, 14, 24, 0.88);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 200ms var(--ease);
  position: relative;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link::after {
  content: '';
  position: absolute;
  inset-inline: 50%;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-500), transparent);
  border-radius: 2px;
  transform-origin: center;
  transform: scaleX(0);
  transition: transform 240ms var(--ease), inset-inline 240ms var(--ease);
}
.nav-link:hover::after {
  transform: scaleX(1);
  inset-inline: 0;
}

/* ============================================
   Pills / chips / badges
   ============================================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.pill-brand {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--brand-400);
}
.pill-warm {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--warm-400);
}
.pill-emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
}
.pill-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ============================================
   Typography helpers
   ============================================ */

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-400);
}

.text-gradient {
  background: linear-gradient(180deg, #FFFFFF 0%, #C7CDFF 60%, #8B95FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-warm {
  background: linear-gradient(90deg, #FBBF24 0%, #F97316 60%, #6366F1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* ============================================
   Bento grid
   ============================================ */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.bento-3 { grid-column: span 3; }
.bento-4 { grid-column: span 4; }
.bento-6 { grid-column: span 6; }
.bento-2 { grid-column: span 2; }

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-3, .bento-4, .bento-6 { grid-column: span 2; }
  .bento-2 { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-3, .bento-4, .bento-6, .bento-2 { grid-column: span 1; }
}

/* ============================================
   Marquee
   ============================================ */

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marquee 36s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   Reveal on scroll
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* Staggered reveals when children are siblings */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 300ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 360ms; }

/* shimmer for pill on hero */
.pill-shimmer {
  position: relative;
  overflow: hidden;
}
.pill-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.18) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 4.5s ease infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(120%); }
}

/* ============================================
   FAQ
   ============================================ */

details.faq {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color 240ms var(--ease), background 240ms var(--ease);
}
details.faq[open] {
  border-color: var(--border-bright);
  background: var(--surface-1);
}
details.faq > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary .chev {
  transition: transform 240ms var(--ease);
  flex-shrink: 0;
  color: var(--brand-400);
}
details.faq[open] > summary .chev { transform: rotate(180deg); }

/* ============================================
   Misc
   ============================================ */

.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.ring-soft {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

input, textarea, select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font-body);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

::selection {
  background: rgba(99, 102, 241, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* table reset for dark */
table { border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
tbody tr { border-bottom: 1px solid rgba(31, 38, 71, 0.5); }

/* ============================================
   Legacy shim — retrofit existing product/service
   pages onto the new dark design without rewriting
   every page. Maps old classes (.glass, .btn-primary,
   .bg-hero-grad, etc.) to dark-mode equivalents.
   ============================================ */

/* Old "glass" cards become dark elevated cards */
.glass,
.glass-strong {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  border: 1px solid var(--border) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--text);
}

/* Old gradient hero background */
.bg-hero-grad {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(99, 102, 241, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    var(--bg) !important;
}

/* Old grid background */
.grid-bg {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

/* Old gradient text — map to new gradient */
.gradient-text {
  background: linear-gradient(180deg, #FFFFFF 0%, #C7CDFF 60%, #8B95FF 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
.gradient-cosmic {
  background: linear-gradient(90deg, #FBBF24 0%, #F97316 60%, #6366F1 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Old buttons */
.btn-primary {
  background: linear-gradient(180deg, var(--warm-400) 0%, var(--warm-500) 50%, var(--warm-600) 100%) !important;
  color: #1a1505 !important;
  box-shadow: var(--glow-warm), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  border: none !important;
  transition: transform 180ms var(--ease), box-shadow 240ms var(--ease) !important;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  transition: background 240ms var(--ease), border-color 240ms var(--ease) !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-bright) !important;
}

/* Old ring */
.ring-soft { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important; }

/* Card hover */
.card-hover {
  transition: border-color 240ms var(--ease), background 240ms var(--ease), transform 240ms var(--ease) !important;
}
.card-hover:hover {
  border-color: var(--border-bright) !important;
  transform: translateY(-2px);
}

/* Old hotspot — flip onto dark */
.hotspot {
  background: var(--warm-500) !important;
  color: #1a1505 !important;
  border-color: var(--surface-1) !important;
}
.hotspot .tip {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

/* Map old "white" backgrounds → dark surface (used in countless places) */
.bg-white {
  background-color: var(--bg) !important;
  color: var(--text);
}

/* white-with-opacity overlays — keep as subtle dark overlays */
.bg-white\/70 { background-color: rgba(255, 255, 255, 0.06) !important; }
.bg-white\/72 { background-color: rgba(255, 255, 255, 0.06) !important; }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.07) !important; }
.bg-white\/85 { background-color: rgba(255, 255, 255, 0.08) !important; }
.bg-white\/86 { background-color: rgba(255, 255, 255, 0.08) !important; }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.09) !important; }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.10) !important; }
/* very-low-opacity stays */

/* Slate / gray neutrals — flip to dark surfaces */
.bg-slate-50  { background-color: var(--surface) !important; }
.bg-slate-100 { background-color: var(--surface-1) !important; }
.bg-slate-200 { background-color: var(--surface-2) !important; }
.bg-slate-300 { background-color: var(--surface-2) !important; }
.bg-gray-50   { background-color: var(--surface) !important; }
.bg-gray-100  { background-color: var(--surface-1) !important; }
.bg-gray-200  { background-color: var(--surface-2) !important; }

.text-slate-400, .text-slate-500, .text-slate-600,
.text-gray-400, .text-gray-500, .text-gray-600 { color: var(--text-muted) !important; }
.text-slate-700, .text-slate-800, .text-slate-900,
.text-gray-700, .text-gray-800, .text-gray-900 { color: var(--text) !important; }

/* State color text — flip 700-800 (dark for light bg) to 300-400 (light for dark bg) */
.text-emerald-600 { color: #34D399 !important; }
.text-emerald-700 { color: #34D399 !important; }
.text-emerald-800 { color: #6EE7B7 !important; }
.text-emerald-900 { color: #6EE7B7 !important; }
.text-rose-600    { color: #FB7185 !important; }
.text-rose-700    { color: #FB7185 !important; }
.text-rose-800    { color: #FDA4AF !important; }
.text-amber-600   { color: #FBBF24 !important; }
.text-amber-700   { color: #FBBF24 !important; }
.text-amber-800   { color: #FCD34D !important; }
.text-amber-900   { color: #FCD34D !important; }
.text-sky-600     { color: #38BDF8 !important; }
.text-sky-700     { color: #38BDF8 !important; }
.text-violet-700  { color: #A78BFA !important; }
.text-indigo-700  { color: #8B95FF !important; }

/* State color backgrounds — light tints → dark tints */
.bg-emerald-50  { background-color: rgba(16, 185, 129, 0.13) !important; border-color: rgba(16, 185, 129, 0.25) !important; }
.bg-emerald-100 { background-color: rgba(16, 185, 129, 0.16) !important; }
.bg-rose-50     { background-color: rgba(239, 68, 68, 0.13) !important; border-color: rgba(239, 68, 68, 0.25) !important; }
.bg-rose-100    { background-color: rgba(239, 68, 68, 0.16) !important; }
.bg-amber-50    { background-color: rgba(245, 158, 11, 0.13) !important; border-color: rgba(245, 158, 11, 0.25) !important; }
.bg-amber-100   { background-color: rgba(245, 158, 11, 0.16) !important; }
.bg-sky-50      { background-color: rgba(56, 189, 248, 0.13) !important; }
.bg-sky-100     { background-color: rgba(56, 189, 248, 0.16) !important; }
.bg-violet-50   { background-color: rgba(167, 139, 250, 0.13) !important; }

/* State backgrounds — solid */
.bg-emerald-500 { background-color: #10B981 !important; }
.bg-rose-500    { background-color: #EF4444 !important; }
.bg-amber-500   { background-color: #F59E0B !important; }

/* State borders */
.border-emerald-200 { border-color: rgba(16, 185, 129, 0.30) !important; }
.border-rose-200    { border-color: rgba(239, 68, 68, 0.30) !important; }
.border-amber-200   { border-color: rgba(245, 158, 11, 0.30) !important; }

/* Brand-100/200/200-with-opacity (commonly footer / dark-section text — KEEP brighter) */
.text-brand-100 { color: var(--text-muted) !important; }
.text-brand-200 { color: var(--brand-200) !important; }
.text-brand-200\/70 { color: rgba(199, 205, 255, 0.7) !important; }
.text-brand-200\/80 { color: rgba(199, 205, 255, 0.85) !important; }
.text-brand-100\/60 { color: rgba(182, 189, 204, 0.7) !important; }
.text-brand-100\/70 { color: rgba(182, 189, 204, 0.8) !important; }
.text-brand-100\/80 { color: rgba(182, 189, 204, 0.85) !important; }
.text-brand-100\/85 { color: rgba(182, 189, 204, 0.9) !important; }
.text-brand-300     { color: var(--brand-200) !important; }
.text-brand-400     { color: var(--brand-400) !important; }
.text-brand-500     { color: var(--brand-500) !important; }
.text-brand-600     { color: var(--brand-500) !important; }

/* Accent colors */
.text-accent-300   { color: #FCD34D !important; }
.text-accent-400   { color: #FBBF24 !important; }
.text-accent-500   { color: #F59E0B !important; }
.text-accent-600   { color: #F59E0B !important; }
.text-accent-600\/80 { color: rgba(245, 158, 11, 0.85) !important; }
.bg-accent-500\/5  { background: rgba(245, 158, 11, 0.06) !important; }
.bg-accent-500\/10 { background: rgba(245, 158, 11, 0.10) !important; }
.bg-accent-500\/15 { background: rgba(245, 158, 11, 0.13) !important; }
.bg-accent-500\/20 { background: rgba(245, 158, 11, 0.18) !important; }

/* Hover state flips */
.hover\:bg-emerald-50:hover { background-color: rgba(16, 185, 129, 0.16) !important; }
.hover\:bg-rose-50:hover    { background-color: rgba(239, 68, 68, 0.16) !important; }
.hover\:bg-amber-50:hover   { background-color: rgba(245, 158, 11, 0.16) !important; }
.hover\:bg-slate-100:hover  { background-color: var(--surface-1) !important; }
.hover\:bg-gray-100:hover   { background-color: var(--surface-1) !important; }

/* Section gradient backgrounds — flatten */
.bg-gradient-to-b.from-brand-50\/40,
.bg-gradient-to-b.from-brand-50\/30,
.bg-gradient-to-b.from-brand-50,
.bg-gradient-to-b.from-emerald-50,
.bg-gradient-to-b.from-rose-50,
.bg-gradient-to-b.from-amber-50,
.bg-gradient-to-b.from-slate-50,
.bg-gradient-to-b.from-slate-100,
.bg-gradient-to-b.from-gray-50,
.bg-gradient-to-b.from-gray-100 { background: var(--surface) !important; }

.bg-gradient-to-b.to-brand-50\/40,
.bg-gradient-to-b.to-brand-50,
.bg-gradient-to-b.to-emerald-50,
.bg-gradient-to-b.to-amber-50,
.bg-gradient-to-b.to-slate-50,
.bg-gradient-to-b.to-gray-50 { background: var(--surface) !important; }

.bg-gradient-to-b.from-white.to-white { background: var(--bg) !important; }
.bg-gradient-to-br.from-white { background: var(--surface) !important; }
.bg-gradient-to-br.to-white { background: var(--surface) !important; }

/* Borders */
.border-slate-100, .border-slate-200, .border-gray-100, .border-gray-200 { border-color: var(--border) !important; }
.border-white\/10, .border-white\/15, .border-white\/20 { border-color: var(--border) !important; }

/* Divide colors */
.divide-slate-100 > * + *, .divide-slate-200 > * + *,
.divide-gray-100 > * + *, .divide-gray-200 > * + * { border-color: var(--border) !important; }

/* Ring colors used for focus rings on light bg */
.ring-brand-300, .focus-visible\:ring-brand-300 { --tw-ring-color: var(--brand-500) !important; }

/* Group hover bg flips */
.group:hover .group-hover\:bg-brand-50 { background-color: rgba(99, 102, 241, 0.10) !important; }

/* Existing border-y/border-t mappings */
.border-y { border-color: var(--border) !important; }
.border-t { border-color: var(--border) !important; }
.border-b { border-color: var(--border) !important; }

/* Specific gradients used in product page pricing tiers — keep the dark popular card */
.bg-gradient-to-br.from-brand-900.to-brand-700 {
  background: linear-gradient(135deg, #1F1B5C 0%, #4F46E5 100%) !important;
  color: white;
}
.bg-gradient-to-br.from-brand-700.to-brand-500 {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%) !important;
  color: white;
}
.bg-gradient-to-br.from-saffron-500.to-accent-600 {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: white;
}

/* Old utility colors map to dark */
.text-ink { color: var(--text) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-brand-700,
.text-brand-800,
.text-brand-900 { color: var(--brand-400) !important; }
.text-brand-100 { color: var(--text-muted) !important; }
.text-brand-200 { color: var(--text-muted) !important; }

.bg-brand-50,
.bg-brand-50\/40,
.bg-brand-50\/30 { background: rgba(99, 102, 241, 0.08) !important; }
.bg-brand-100,
.bg-brand-100\/40 { background: rgba(99, 102, 241, 0.1) !important; }

.bg-brand-900 { background: var(--surface) !important; }
.bg-brand-800 { background: var(--surface-1) !important; }

/* Borders */
.border-brand-800\/5,
.border-brand-800\/10,
.border-brand-800\/15,
.border-brand-800\/20,
.border-brand-800\/25 { border-color: var(--border) !important; }

/* Gradient-to-b sections — flatten to dark */
.bg-gradient-to-b.from-white { background: var(--bg) !important; }
.bg-gradient-to-b.from-brand-50\/40,
.bg-gradient-to-b.from-brand-50\/30 { background: var(--surface) !important; }
.bg-gradient-to-b.to-white { background: var(--bg) !important; }
.bg-gradient-to-b.to-brand-50 { background: var(--surface) !important; }

/* Old nav header — make it dark */
header.fixed nav { color: var(--text); }
header.fixed nav ul a { color: var(--text-muted); }
header.fixed nav ul a:hover { color: var(--text); }

/* Old footer (legacy product pages) */
footer.bg-brand-900 {
  background: var(--surface) !important;
  border-top: 1px solid var(--border);
  color: var(--text-muted) !important;
}

/* tables on legacy pages */
.divide-brand-800\/5 > * + *,
.divide-brand-800\/10 > * + * { border-color: var(--border) !important; }

/* Soft border ones */
.border-y.border-brand-800\/5,
.border-y.border-brand-800\/10 { border-color: var(--border) !important; }

/* "white/85" backgrounds become subtle dark */
.bg-white\/5,
.bg-white\/10,
.bg-white\/20 { background: rgba(255, 255, 255, 0.04) !important; }

/* Hover bg-brand-50 → brand tint */
.hover\:bg-brand-50:hover { background: rgba(99, 102, 241, 0.08) !important; }

/* Emerald/rose/amber soft chips remain — they look fine on dark */

/* Old saffron section (astrology page) */
.bg-saffron-500\/5,
.bg-saffron-500\/10 { background: rgba(245, 158, 11, 0.1) !important; }
.border-saffron-500\/20 { border-color: rgba(245, 158, 11, 0.3) !important; }
.text-saffron-500 { color: var(--warm-400) !important; }

/* Lightweight typographic flips for legacy headings */
.text-brand-900 { color: var(--text) !important; }

/* ============================================
   LEGACY COMPATIBILITY v2 — fills the gap left
   when retrofit removed per-page Tailwind extras
   (shadow-glass, brand opacity tints, etc.)
   ============================================ */

/* Shadow utilities the old per-page config defined */
.shadow-glass    { box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.10) !important; }
.shadow-glass-lg { box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.12) !important; }
.shadow,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl       { box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.6) !important; }

/* Brand colour gradation — used in heatmaps, icon backgrounds, chips.
   Map old "light-blue progression" -> "dark indigo progression on dark bg". */
.bg-brand-50,
.bg-brand-50\/40,
.bg-brand-50\/30,
.bg-brand-50\/50 { background-color: rgba(99, 102, 241, 0.06) !important; }
.bg-brand-100,
.bg-brand-100\/40,
.bg-brand-100\/50,
.bg-brand-100\/60 { background-color: rgba(99, 102, 241, 0.12) !important; }
.bg-brand-200,
.bg-brand-200\/50,
.bg-brand-200\/60,
.bg-brand-200\/70 { background-color: rgba(99, 102, 241, 0.20) !important; }
.bg-brand-300    { background-color: rgba(99, 102, 241, 0.30) !important; }
.bg-brand-500    { background-color: #6366F1 !important; }
.bg-brand-500\/10 { background-color: rgba(99, 102, 241, 0.10) !important; }
.bg-brand-500\/15 { background-color: rgba(99, 102, 241, 0.15) !important; }
.bg-brand-500\/20 { background-color: rgba(99, 102, 241, 0.20) !important; }
.bg-brand-500\/30 { background-color: rgba(99, 102, 241, 0.32) !important; }
.bg-brand-500\/40 { background-color: rgba(99, 102, 241, 0.40) !important; }
.bg-brand-500\/50 { background-color: rgba(99, 102, 241, 0.50) !important; }
.bg-brand-500\/60 { background-color: rgba(99, 102, 241, 0.60) !important; }
.bg-brand-500\/70 { background-color: rgba(99, 102, 241, 0.70) !important; }
.bg-brand-500\/80 { background-color: rgba(99, 102, 241, 0.80) !important; }
.bg-brand-600    { background-color: #4F46E5 !important; }
.bg-brand-700    { background-color: #4F46E5 !important; }
.bg-brand-700\/60 { background-color: rgba(79, 70, 229, 0.60) !important; }
.bg-brand-700\/70 { background-color: rgba(79, 70, 229, 0.70) !important; }
.bg-brand-700\/80 { background-color: rgba(79, 70, 229, 0.80) !important; }
.bg-brand-800    { background-color: #3D38BD !important; }

/* Accent (saffron / amber) opacity tints */
.bg-accent-300   { background-color: rgba(245, 158, 11, 0.32) !important; }
.bg-accent-400   { background-color: rgba(245, 158, 11, 0.46) !important; }
.bg-accent-500   { background-color: #F59E0B !important; }
.bg-accent-500\/40 { background-color: rgba(245, 158, 11, 0.40) !important; }
.bg-accent-500\/50 { background-color: rgba(245, 158, 11, 0.50) !important; }
.bg-accent-500\/60 { background-color: rgba(245, 158, 11, 0.60) !important; }
.bg-accent-500\/70 { background-color: rgba(245, 158, 11, 0.70) !important; }
.bg-accent-600   { background-color: #D97706 !important; }

/* white-overlay retune block REMOVED 2026-07-15 — Tailwind var-driven
   bg-white/N now themes correctly in both dark and light modes.
   NOTE: high-alpha tiles (bg-white/95 logo tiles) render truly white now. */

/* Brand → light gradient (icon backgrounds). Force a consistent indigo→amber
   so SVG icons sit on something with depth & brand identity. */
.bg-gradient-to-br.from-brand-700.to-brand-500,
.bg-gradient-to-r.from-brand-700.to-brand-500 {
  background: linear-gradient(135deg, #6366F1 0%, #818CF8 100%) !important;
  color: #fff;
}
.bg-gradient-to-br.from-brand-500.to-brand-700,
.bg-gradient-to-r.from-brand-500.to-brand-700 {
  background: linear-gradient(135deg, #818CF8 0%, #6366F1 100%) !important;
  color: #fff;
}
.bg-gradient-to-br.from-brand-500.to-accent-500 {
  background: linear-gradient(135deg, #6366F1 0%, #F59E0B 100%) !important;
  color: #fff;
}
.bg-gradient-to-r.from-brand-500.via-accent-500.to-brand-500 {
  background: linear-gradient(90deg, #6366F1, #F59E0B, #6366F1) !important;
  color: #fff;
}

/* Common rose / emerald solid backgrounds used as alert chips */
.bg-emerald-500\/15 { background-color: rgba(16, 185, 129, 0.15) !important; }
.bg-emerald-500\/20 { background-color: rgba(16, 185, 129, 0.20) !important; }
.bg-rose-500\/10    { background-color: rgba(239, 68, 68, 0.10) !important; }
.bg-rose-500\/15    { background-color: rgba(239, 68, 68, 0.15) !important; }
.bg-rose-500\/20    { background-color: rgba(239, 68, 68, 0.20) !important; }
.bg-amber-500\/10   { background-color: rgba(245, 158, 11, 0.10) !important; }
.bg-amber-500\/15   { background-color: rgba(245, 158, 11, 0.15) !important; }

/* Page-level full-section "bg-brand-900" footers */
.bg-brand-900,
section.bg-brand-900 { background: var(--surface) !important; border-top: 1px solid var(--border); color: var(--text) !important; }

/* Industries-grid dark-theme overrides on legacy product pages */
section.bg-brand-900 article { border-color: var(--border) !important; background: rgba(255, 255, 255, 0.04) !important; }

/* border-white + text-white !important fall-throughs REMOVED 2026-07-15 —
   they hardcoded white and broke the light theme; Tailwind var-driven
   utilities now handle both modes. */

.text-brand-800     { color: var(--brand-400) !important; }
.text-brand-700     { color: var(--brand-400) !important; }

/* Tables in product comparison sections */
table thead th { color: var(--text-muted) !important; }
table tbody td { color: var(--text); }
table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Pricing edition card "Most popular" amber pill */
.bg-accent-500.text-white { color: #1a1505 !important; background: linear-gradient(180deg, #FBBF24, #F59E0B) !important; }

/* Inputs on light bg become dark */
.bg-white input, .bg-white textarea, .bg-white select { background: var(--surface) !important; color: var(--text) !important; }

/* Page section "from-brand-50/40 to-white" sections */
.bg-gradient-to-b.from-brand-50\/40.to-white,
.bg-gradient-to-b.from-white.to-brand-50,
.bg-gradient-to-b.from-white.to-brand-50\/30,
.bg-gradient-to-b.from-white.to-brand-50\/40 { background: var(--bg) !important; }

/* dividers */
.divide-brand-800\/5 > * + *,
.divide-brand-800\/10 > * + * { border-color: var(--border) !important; }

/* Card-hover light hover -> dark hover */
.card-hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)) !important;
}

/* Hotspot tooltip — overlay readable on either bg */
.hotspot .tip,
.hotspot.tip-below .tip,
.hotspot.tip-left .tip {
  background: rgba(11, 14, 24, 0.96) !important;
  border: 1px solid var(--border) !important;
  color: #FAFAFC !important;
}
.hotspot .tip strong { color: #FBBF24 !important; }

/* Laptop frame (pharmos page) */
.laptop-screen-outer { background: var(--surface-2) !important; }
.laptop-base { background: linear-gradient(180deg, #2B345C 0%, #1F2647 100%) !important; }

/* Skip-link override (was bg-white text-brand-800) */
a[href="#main"].focus\:bg-white:focus,
a[href="#main"]:focus { background: var(--surface-1) !important; color: var(--text) !important; border: 1px solid var(--brand-500) !important; }

/* ============================================
   DEVICE MOCKUPS — recovered from per-page styles
   that the retrofit removed (browser, laptop, phone)
   Re-styled for the new dark theme.
   ============================================ */

.device-shell { position: relative; }

/* ---- Browser window (website-design.html showcase) ---- */
.browser-frame {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(99, 102, 241, 0.10);
  overflow: hidden;
}
.browser-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.browser-dots {
  display: flex;
  gap: 6px;
}
.browser-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
}
.browser-url {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto;
}
.browser-url svg { color: #34D399; }
.browser-body {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(ellipse 60% 50% at 25% 20%, rgba(99, 102, 241, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-1) 0%, var(--surface) 100%);
  overflow: hidden;
}

/* ---- Laptop (Mac) — pharmos.html ---- */
.laptop-frame {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.laptop-screen-outer {
  background: #0A0F1A;
  padding: 14px 14px 10px;
  border-radius: 18px 18px 6px 6px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.65);
}
.laptop-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface) 100%);
}
.laptop-base {
  height: 14px;
  border-radius: 0 0 14px 14px;
  margin: 0 -3%;
  background: linear-gradient(180deg, #3A4263 0%, #1F2647 100%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  position: relative;
}
.laptop-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 6px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0 0 6px 6px;
}
.laptop-cam {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 2;
}

/* ---- Phone (iPhone) — mobile-app-development.html ---- */
.phone-frame {
  position: relative;
  width: 240px;
  aspect-ratio: 9 / 19;
  background: #07090F;
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 10px;
  margin: 0 auto;
  box-shadow: 0 32px 60px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.phone-screen {
  position: relative;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface) 100%);
  border-radius: 28px;
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #07090F;
  border-radius: 12px;
  z-index: 3;
}
.phone-label {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Process flow step (ride-hailing.html) ---- */
.flow-step {
  position: relative;
}
.flow-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  width: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-500), transparent);
}
.flow-step:last-child::after { display: none; }
@media (max-width: 768px) {
  .flow-step::after { display: none; }
}

/* ---- Generic chev (FAQ-style chevron container) ---- */
.chev {
  transition: transform 240ms var(--ease);
  flex-shrink: 0;
}

/* Aspect-square heatmap cells used in product hero ---
   Make brand-50/100/200 produce a visible gradation on dark */
.aspect-square.rounded.bg-brand-50  { background: rgba(99, 102, 241, 0.10) !important; }
.aspect-square.rounded.bg-brand-100 { background: rgba(99, 102, 241, 0.18) !important; }
.aspect-square.rounded.bg-brand-200 { background: rgba(99, 102, 241, 0.28) !important; }

/* Section bg-white inside product pages — should be ink */
section.bg-white { background: var(--bg) !important; }

/* Stat tiles on dark sections that had bg-white/10 etc */
.stat-tile, .metric-tile { background: rgba(255, 255, 255, 0.04) !important; border: 1px solid var(--border) !important; }

/* ============================================
   LIGHT THEME — html.light · 2026-07-15
   Toggle: sd-theme in localStorage (js/site.js)
   ============================================ */

html.light {
  color-scheme: light;

  /* Surfaces */
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-1: #F0F2F9;
  --surface-2: #E8EBF5;
  --border: #E2E6F0;
  --border-bright: #C9D1E4;

  /* Tailwind utility flips: text-white → deep ink, bg-white/5 → soft dark tint,
     bg-ink-* → light surfaces, border-ink-4 → light border */
  --white-rgb: 16 20 43;
  --ink-0-rgb: 246 247 251;
  --ink-1-rgb: 255 255 255;
  --ink-2-rgb: 240 242 249;
  --ink-3-rgb: 232 235 245;
  --ink-4-rgb: 214 221 236;
  /* pale brand tints (readable on dark) darken for light bg —
     hex vars too: legacy-shim rules (.text-brand-400 { color: var(--brand-400) })
     out-cascade the Tailwind var-driven utilities */
  --brand-200-rgb: 67 56 202;
  --brand-400-rgb: 79 70 229;
  --brand-200: #4338CA;
  --brand-400: #4F46E5;

  /* Text — AA+ on #F6F7FB */
  --text: #10142B;
  --text-muted: #414B66;
  --text-dim: #5E6A88;

  /* Shadow */
  --glow-brand: 0 0 0 1px rgba(99, 102, 241, 0.18), 0 8px 32px -10px rgba(99, 102, 241, 0.30);
  --glow-warm: 0 0 0 1px rgba(245, 158, 11, 0.25), 0 12px 28px -10px rgba(245, 158, 11, 0.35);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 44px -22px rgba(23, 28, 60, 0.18);
}

/* Dark-text utilities (text-ink-*) sit on chips that stay light in both themes */
html.light [class*="text-ink-"] { color: #10142B; }

/* Gradient headlines: white→lavender reads as washout on light — go ink→indigo */
html.light .text-gradient {
  background: linear-gradient(180deg, #10142B 0%, #34307A 55%, #4F46E5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Containers with solid color fills keep true-white text (var inherits to descendants) */
html.light .bg-brand-400, html.light .bg-brand-500, html.light .bg-brand-600, html.light .bg-brand-700,
html.light .bg-warm-500, html.light .bg-warm-600,
html.light .bg-emerald-500, html.light .bg-emerald-600,
html.light .bg-rose-500, html.light .bg-sky-500, html.light .bg-violet-500,
html.light .bg-black, html.light .btn-primary,
html.light .mockup-window, html.light .thumb-chrome, html.light .showcase-card {
  --white-rgb: 255 255 255;
}

/* True-white surfaces stay white (incl. high-alpha logo tiles) */
html.light .bg-white,
html.light [class*="bg-white/7"], html.light [class*="bg-white/8"], html.light [class*="bg-white/9"] {
  --white-rgb: 255 255 255;
}

/* Opt-out: elements inside re-whitened containers whose surface DOES flip light */
html.light .theme-flip { --white-rgb: 16 20 43; }

/* Mock windows stay fully DARK in light mode — self-consistent dark app previews.
   Re-pin every flipped var inside so panels, chips and text all read as dark theme. */
html.light .mockup-window {
  --white-rgb: 255 255 255;
  --ink-0-rgb: 7 9 15;
  --ink-1-rgb: 11 14 24;
  --ink-2-rgb: 17 21 42;
  --ink-3-rgb: 22 27 51;
  --ink-4-rgb: 31 38 71;
  --brand-200-rgb: 199 205 255;
  --brand-400-rgb: 139 149 255;
  --brand-200: #C7CDFF;
  --brand-400: #8B95FF;
  --surface: #0B0E18;
  --surface-1: #11152A;
  --surface-2: #161B33;
  --border: #1F2647;
  --border-bright: #2B345C;
  --text: #FAFAFC;
  --text-muted: #B6BDCC;
  --text-dim: #8189A0;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}
html.light .mockup-window .card,
html.light .mockup-window .card:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
}

/* Accent-400 tints (Tailwind default palette, tuned for dark bg) darken on light —
   except inside mock windows, which stay dark */
html.light .text-emerald-400 { color: #059669; }
html.light .text-warm-400, html.light .text-amber-400 { color: #B45309; }
html.light .text-sky-400 { color: #0369A1; }
html.light .text-rose-400 { color: #BE123C; }
html.light .text-violet-400 { color: #7C3AED; }
html.light .text-brand-200\/70, html.light .text-brand-200\/80 { color: rgba(67, 56, 202, 0.85); }
html.light .mockup-window .text-emerald-400 { color: #34D399; }
html.light .mockup-window .text-warm-400, html.light .mockup-window .text-amber-400 { color: #FBBF24; }
html.light .mockup-window .text-sky-400 { color: #38BDF8; }
html.light .mockup-window .text-rose-400 { color: #FB7185; }
html.light .mockup-window .text-violet-400 { color: #A78BFA; }

/* Component re-skins */
html.light .card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
}
html.light .card:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FD 100%);
}

html.light .nav-shell {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 28, 60, 0.08);
  box-shadow: 0 12px 36px -16px rgba(23, 28, 60, 0.20);
}
html.light .nav-shell.nav-shrunk {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px -16px rgba(23, 28, 60, 0.25);
}

html.light .btn-secondary { background: rgba(16, 20, 43, 0.04); }
html.light .btn-secondary:hover { background: rgba(16, 20, 43, 0.08); }
html.light .btn-ghost:hover { background: rgba(16, 20, 43, 0.05); }

html.light .pill { background: rgba(16, 20, 43, 0.04); }
html.light .pill-brand { background: rgba(99, 102, 241, 0.10); color: var(--brand-600); }
html.light .pill-warm { background: rgba(245, 158, 11, 0.12); color: #B45309; }
html.light .pill-emerald { background: rgba(16, 185, 129, 0.12); color: #047857; }
html.light .pill-shimmer::after {
  background: linear-gradient(110deg, transparent 25%, rgba(16, 20, 43, 0.08) 50%, transparent 75%);
}

/* Atmosphere — softer on light */
html.light .bg-mesh {
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(99, 102, 241, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(245, 158, 11, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(167, 139, 250, 0.07) 0%, transparent 60%);
}
html.light .bg-mesh-soft {
  background: radial-gradient(ellipse 40% 30% at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}
html.light .bg-mesh-animated {
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 45% 35% at 80% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 90%, rgba(167, 139, 250, 0.09) 0%, transparent 60%);
}
html.light .bg-grid {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.09) 1px, transparent 1px);
}
html.light .orb-brand { background: rgba(99, 102, 241, 0.16); }
html.light .orb-warm { background: rgba(245, 158, 11, 0.13); }
html.light .orb-violet { background: rgba(167, 139, 250, 0.13); }

html.light .mockup-stage img,
html.light .mockup-stage .mockup-window {
  box-shadow: 0 30px 70px -24px rgba(23, 28, 60, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.12);
}
html.light .thumb-flagship { color: rgba(16, 20, 43, 0.75); filter: drop-shadow(0 6px 16px rgba(23, 28, 60, 0.18)); }
html.light .ring-soft { box-shadow: inset 0 0 0 1px rgba(16, 20, 43, 0.08); }
html.light tbody tr { border-bottom: 1px solid rgba(203, 211, 228, 0.6); }
html.light ::selection { background: rgba(99, 102, 241, 0.25); color: #10142B; }

/* Theme toggle button (injected by js/site.js) */
.sd-theme-toggle svg { width: 1.15rem; height: 1.15rem; }
