/* ============================================================
   JODABRIRO — Design System
   Premium B2B AI Automation Company
   ============================================================ */

/* ── CSS Custom Properties (Dark Mode Default) ─────────────── */
:root {
  /* Colors */
  --bg-primary: #0a0f1e;
  --bg-secondary: #111827;
  --bg-tertiary: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --accent-violet: #7c3aed;
  --accent-violet-dark: #6d28d9;
  --accent-violet-light: #a78bfa;
  --accent-cyan: #06b6d4;
  --accent-cyan-dark: #0891b2;
  --accent-cyan-light: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --accent-gradient-reverse: linear-gradient(135deg, #06b6d4, #7c3aed);
  --white: #ffffff;
  --black: #000000;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(20px) saturate(180%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.3);
  --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);

  /* Typography */
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 2.5vw, 1.5rem);
  --fs-h4: clamp(1.0625rem, 2vw, 1.25rem);
  --fs-body: clamp(0.9375rem, 2vw, 1.0625rem);
  --fs-body-lg: clamp(1rem, 2vw, 1.125rem);
  --fs-small: clamp(0.8125rem, 1.5vw, 0.875rem);
  --fs-xs: clamp(0.6875rem, 1.2vw, 0.75rem);
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.025em;
  --ls-wider: 0.05em;

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --space-3xl: 12rem;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1400px;
  --container-narrow: 800px;
  --nav-height: 72px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light Mode Overrides ──────────────────────────────────── */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
  --shadow-glow-cyan: 0 0 40px rgba(6, 182, 212, 0.15);
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.menu-open {
  overflow: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background-color: rgba(124, 58, 237, 0.3);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Base Typography ───────────────────────────────────────── */
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

.text-hero {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-reverse {
  background: var(--accent-gradient-reverse);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-body-lg {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
}

.text-small {
  font-size: var(--fs-small);
}

.text-xs {
  font-size: var(--fs-xs);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ── Utility Classes ───────────────────────────────────────── */

/* Display */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none; }

/* Flex */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Spacing */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Width */
.w-full { width: 100%; }
.mx-auto { margin-inline: auto; }

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
