:root {
  /* Primitive Color Tokens */
  --color-white: rgba(255, 255, 255, 1);
  --color-black: rgba(0, 0, 0, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-slate-500: rgba(98, 108, 113, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-slate-900: rgba(19, 52, 59, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);

  /* RGB versions for opacity control */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  --color-slate-500-rgb: 98, 108, 113;
  --color-red-500-rgb: 192, 21, 47;
  --color-red-400-rgb: 255, 84, 89;
  --color-orange-500-rgb: 168, 75, 47;
  --color-orange-400-rgb: 230, 129, 97;

  /* Background color tokens (Light Mode) */
  --color-bg-1: rgba(59, 130, 246, 0.08); /* Light blue */
  --color-bg-2: rgba(245, 158, 11, 0.08); /* Light yellow */
  --color-bg-3: rgba(34, 197, 94, 0.08); /* Light green */
  --color-bg-4: rgba(239, 68, 68, 0.08); /* Light red */
  --color-bg-5: rgba(147, 51, 234, 0.08); /* Light purple */
  --color-bg-6: rgba(249, 115, 22, 0.08); /* Light orange */
  --color-bg-7: rgba(236, 72, 153, 0.08); /* Light pink */
  --color-bg-8: rgba(6, 182, 212, 0.08); /* Light cyan */

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
  --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    /* RGB versions for opacity control (Dark Mode) */
    --color-gray-400-rgb: 119, 124, 124;
    --color-teal-300-rgb: 50, 184, 198;
    --color-gray-300-rgb: 167, 169, 169;
    --color-gray-200-rgb: 245, 245, 245;

    /* Background color tokens (Dark Mode) */
    --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
    --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
    --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
    --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
    --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
    --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
    --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
    --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */

    /* Semantic Color Tokens (Dark Mode) */
    --color-background: var(--color-charcoal-700);
    --color-surface: var(--color-charcoal-800);
    --color-text: var(--color-gray-200);
    --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
    --color-primary: var(--color-teal-300);
    --color-primary-hover: var(--color-teal-400);
    --color-primary-active: var(--color-teal-800);
    --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
    --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
    --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
    --color-border: rgba(var(--color-gray-400-rgb), 0.3);
    --color-error: var(--color-red-400);
    --color-success: var(--color-teal-300);
    --color-warning: var(--color-orange-400);
    --color-info: var(--color-gray-300);
    --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
    --color-btn-primary-text: var(--color-slate-900);
    --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
    --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: var(--color-teal-300-rgb);
    --color-error-rgb: var(--color-red-400-rgb);
    --color-warning-rgb: var(--color-orange-400-rgb);
    --color-info-rgb: var(--color-gray-300-rgb);
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  /* RGB versions for opacity control (dark mode) */
  --color-gray-400-rgb: 119, 124, 124;
  --color-teal-300-rgb: 50, 184, 198;
  --color-gray-300-rgb: 167, 169, 169;
  --color-gray-200-rgb: 245, 245, 245;

  /* Colorful background palette - Dark Mode */
  --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
  --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
  --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
  --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
  --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
  --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
  --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
  --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */

  /* Semantic Color Tokens (Dark Mode) */
  --color-background: var(--color-charcoal-700);
  --color-surface: var(--color-charcoal-800);
  --color-text: var(--color-gray-200);
  --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
  --color-primary: var(--color-teal-300);
  --color-primary-hover: var(--color-teal-400);
  --color-primary-active: var(--color-teal-800);
  --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
  --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
  --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
  --color-border: rgba(var(--color-gray-400-rgb), 0.3);
  --color-error: var(--color-red-400);
  --color-success: var(--color-teal-300);
  --color-warning: var(--color-orange-400);
  --color-info: var(--color-gray-300);
  --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
  --color-btn-primary-text: var(--color-slate-900);
  --color-card-border: rgba(var(--color-gray-400-rgb), 0.15);
  --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
  --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for dark mode */
  --color-success-rgb: var(--color-teal-300-rgb);
  --color-error-rgb: var(--color-red-400-rgb);
  --color-warning-rgb: var(--color-orange-400-rgb);
  --color-info-rgb: var(--color-gray-300-rgb);
}

[data-color-scheme="light"] {
  /* RGB versions for opacity control (light mode) */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);

  /* RGB versions for light mode */
  --color-success-rgb: var(--color-teal-500-rgb);
  --color-error-rgb: var(--color-red-500-rgb);
  --color-warning-rgb: var(--color-orange-500-rgb);
  --color-info-rgb: var(--color-slate-500-rgb);
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
}

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-secondary);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme="dark"] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

/* Accessibility */
.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;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
    format('woff2');
}

/* END PERPLEXITY DESIGN SYSTEM */
/* ============================================
   GLOBAL RESETS & BASE STYLES
============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
}

/* Respect user's motion preferences */
@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;
  }
}

/* ============================================
   TYPOGRAPHY
============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-16);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
  margin-bottom: var(--space-16);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

/* ============================================
   LAYOUT UTILITIES
============================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-24);
  padding-right: var(--space-24);
}

.section {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
  position: relative;
}

.section--dark {
  background: linear-gradient(135deg, var(--color-charcoal-700) 0%, var(--color-slate-900) 100%);
  color: var(--color-surface);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-32);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-16);
}

.section-title__accent {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section--dark .section-subtitle {
  color: rgba(var(--color-gray-300-rgb, 167, 169, 169), 0.8);
}

/* ============================================
   HERO 3D SECTION WITH PARALLAX
============================================ */
.hero-3d {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 50%, var(--color-teal-800) 100%);
  padding-top: 80px;
}

.hero-3d__scene {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.hero-3d__layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform var(--duration-normal) var(--ease-standard);
  will-change: transform;
}

.hero-3d__layer--bg {
  z-index: 1;
}

.hero-3d__layer--mid {
  z-index: 2;
}

.hero-3d__layer--content {
  z-index: 3;
  position: relative;
}

.hero-3d__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 50%, rgba(var(--color-teal-300-rgb, 50, 184, 198), 0.3) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.shape {
  position: absolute;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.shape--circle {
  width: 300px;
  height: 300px;
  border-radius: var(--radius-full);
  background: var(--color-teal-400);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape--square {
  width: 200px;
  height: 200px;
  background: var(--color-teal-700);
  top: 50%;
  right: 15%;
  transform: rotate(45deg);
  animation-delay: 2s;
}

.shape--triangle {
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 260px solid var(--color-teal-600);
  bottom: 10%;
  left: 50%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-3d__content {
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
  padding: var(--space-32) 0;
}

.hero-3d__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-surface);
  margin-bottom: var(--space-24);
  line-height: var(--line-height-tight);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.animate-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-text .word.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-text .word.highlight {
  background: linear-gradient(135deg, var(--color-orange-400) 0%, var(--color-orange-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-3d__subtitle {
  font-size: var(--font-size-lg);
  color: rgba(var(--color-gray-200-rgb, 245, 245, 245), 0.9);
  margin-bottom: var(--space-32);
  line-height: var(--line-height-normal);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-3d__actions {
  display: flex;
  gap: var(--space-16);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-24);
}

/* ============================================
   BUTTONS WITH 3D EFFECT
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-16) var(--space-32);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn--3d {
  transform-style: preserve-3d;
  transform: perspective(1000px) translateZ(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: var(--color-btn-primary-text);
  box-shadow: 0 10px 30px rgba(var(--color-teal-500-rgb, 33, 128, 141), 0.3);
}

.btn--primary:hover {
  transform: perspective(1000px) translateZ(10px) translateY(-2px);
  box-shadow: 0 15px 40px rgba(var(--color-teal-500-rgb, 33, 128, 141), 0.4);
  background: var(--color-primary-hover);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
  border-color: var(--color-border);
  transform: perspective(1000px) translateZ(10px) translateY(-2px);
}

.btn--large {
  padding: var(--space-24) var(--space-32);
  font-size: var(--font-size-lg);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn__icon {
  font-size: var(--font-size-xl);
  transition: transform var(--duration-normal) var(--ease-standard);
}

.btn:hover .btn__icon {
  transform: translateX(5px);
}

/* ============================================
   TRUST BADGES
============================================ */
.trust-badges {
  display: flex;
  gap: var(--space-24);
  justify-content: center;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-20);
  background: var(--color-secondary);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.trust-badge__icon {
  width: 20px;
  height: 20px;
  color: var(--color-teal-300);
}

/* ============================================
   SCROLL INDICATOR
============================================ */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-32);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-surface);
  opacity: 0.7;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-indicator__icon {
  width: 24px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: var(--radius-full);
  position: relative;
}

.scroll-indicator__icon::before {
  content: '';
  position: absolute;
  top: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  width: var(--space-4);
  height: var(--space-8);
  background: currentColor;
  border-radius: var(--radius-full);
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(var(--space-12)); }
}

.scroll-indicator__text {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   3D FEATURE CARDS
============================================ */
.features-3d {
  background: var(--color-background);
}

.features-3d__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-32);
}

.feature-card-3d {
  position: relative;
  transition: transform var(--duration-normal) var(--ease-standard);
  transform-style: preserve-3d;
}

.feature-card-3d__inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.feature-card-3d__front {
  background: var(--color-surface);
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-standard);
  border: 1px solid var(--color-card-border);
}

.feature-card-3d:hover .feature-card-3d__front {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.feature-card-3d__icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-16);
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(var(--color-teal-500-rgb, 33, 128, 141), 0.1) 0%, rgba(var(--color-teal-600-rgb, 29, 116, 128), 0.2) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card-3d__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-12);
  color: var(--color-text);
}

.feature-card-3d__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

/* ============================================
   ANIMATED TIMELINE
============================================ */
.timeline-3d__wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-3d__wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--color-primary) 10%, var(--color-primary) 90%, transparent 100%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-32);
  margin-bottom: var(--space-32);
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(even) .timeline-item__content {
  grid-column: 1;
  grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-item__marker {
  grid-column: 2;
}

.timeline-item__marker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item__number {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-btn-primary-text);
  box-shadow: 0 0 0 8px rgba(var(--color-teal-500-rgb, 33, 128, 141), 0.2),
              0 0 30px rgba(var(--color-teal-500-rgb, 33, 128, 141), 0.3);
}

.timeline-item__content {
  background: var(--color-secondary);
  backdrop-filter: blur(10px);
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.timeline-item__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-12);
  color: var(--color-text);
}

.section--dark .timeline-item__title {
  color: var(--color-surface);
}

.timeline-item__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-normal);
}

.section--dark .timeline-item__desc {
  color: rgba(var(--color-gray-300-rgb, 167, 169, 169), 0.8);
}

.timeline-item__list {
  list-style: none;
  padding: 0;
}

.timeline-item__list li {
  position: relative;
  padding-left: var(--space-24);
  margin-bottom: var(--space-8);
  color: var(--color-text-secondary);
}

.section--dark .timeline-item__list li {
  color: rgba(var(--color-gray-400-rgb, 119, 124, 124), 0.9);
}

.timeline-item__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

/* ============================================
   INTERACTIVE PROCESS STEPS
============================================ */
.process-steps {
  display: grid;
  gap: var(--space-24);
}

.process-step {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-32);
  align-items: center;
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.process-step.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.process-step:nth-child(even) {
  grid-template-columns: 1fr 200px;
  transform: translateX(50px);
}

.process-step:nth-child(even) .process-step__visual {
  order: 2;
}

.process-step__visual {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step__number {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-teal-700) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-btn-primary-text);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.process-step__icon {
  width: 160px;
  height: 160px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
  transition: all var(--duration-normal) var(--ease-standard);
}

.process-step:hover .process-step__icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.process-step__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-12);
  color: var(--color-text);
}

.process-step__desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-normal);
}

.process-step__tags {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.tag {
  padding: var(--space-8) var(--space-16);
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

/* ============================================
   3D CAROUSEL
============================================ */
.services-carousel {
  overflow: hidden;
}

.carousel-3d {
  position: relative;
  max-width: 100%;
  overflow: hidden;
}

.carousel-3d__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card {
  min-width: 100%;
  padding: var(--space-16);
}

.service-card__image {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-24);
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-standard);
}

.service-card:hover .service-card__image img {
  transform: scale(1.05);
}

.service-card__content {
  text-align: center;
}

.service-card__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-16);
  color: var(--color-surface);
}

.service-card__desc {
  font-size: var(--font-size-lg);
  color: rgba(var(--color-gray-300-rgb, 167, 169, 169), 0.8);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--line-height-normal);
}

.carousel-3d__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  transition: all var(--duration-normal) var(--ease-standard);
  color: var(--color-primary);
}

.carousel-3d__btn:hover {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
  transform: translateY(-50%) scale(1.1);
}

.carousel-3d__btn--prev {
  left: var(--space-16);
}

.carousel-3d__btn--next {
  right: var(--space-16);
}

.carousel-3d__indicators {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  margin-top: var(--space-32);
}

.carousel-3d__indicator {
  width: var(--space-12);
  height: var(--space-12);
  background: var(--color-secondary);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
}

.carousel-3d__indicator.is-active {
  background: var(--color-surface);
  transform: scale(1.3);
}

/* ============================================
   ANIMATED STATISTICS
============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-32);
}

.stat-item {
  text-align: center;
  padding: var(--space-32);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-normal) var(--ease-standard);
  opacity: 0;
  transform: scale(0.8);
}

.stat-item.is-visible {
  opacity: 1;
  transform: scale(1);
}

.stat-item:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-item__visual {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-24);
}

.stat-item__circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.stat-item__circle-bg {
  fill: none;
  stroke: var(--color-secondary);
  stroke-width: 10;
}

.stat-item__circle-progress {
  fill: none;
  stroke: url(#gradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-item__number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.stat-item__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-8);
}

.stat-item__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

/* SVG Gradient for stat circles */
svg defs {
  display: none;
}

/* ============================================
   CTA SECTION WITH 3D EFFECT
============================================ */
.cta-3d {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.cta-3d__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.cta-3d__gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 50%, var(--color-teal-800) 100%);
  opacity: 0.95;
}

.cta-3d__shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.floating-shape {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.1;
}

.floating-shape--1 {
  width: 300px;
  height: 300px;
  background: var(--color-surface);
  top: -150px;
  right: -150px;
}

.floating-shape--2 {
  width: 200px;
  height: 200px;
  background: var(--color-teal-400);
  bottom: -100px;
  left: 10%;
}

.floating-shape--3 {
  width: 150px;
  height: 150px;
  background: var(--color-teal-700);
  top: 50%;
  right: 20%;
}

.cta-3d__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-surface);
}

.cta-3d__title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-24);
  color: var(--color-surface);
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.cta-3d__title .highlight {
  background: linear-gradient(135deg, var(--color-orange-400) 0%, var(--color-orange-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-3d__desc {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-32);
  line-height: var(--line-height-normal);
  color: rgba(var(--color-gray-200-rgb, 245, 245, 245), 0.9);
}

.cta-3d__actions {
  margin-bottom: var(--space-32);
}

.cta-3d__trust {
  display: flex;
  gap: var(--space-24);
  justify-content: center;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: rgba(var(--color-gray-200-rgb, 245, 245, 245), 0.9);
  font-size: var(--font-size-sm);
}

.trust-item__icon {
  color: var(--color-teal-400);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1024px) {
  .hero-3d__title {
    font-size: var(--font-size-3xl);
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .timeline-3d__wrapper::before {
    left: 20px;
  }
  
  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: var(--space-16);
  }
  
  .timeline-item:nth-child(even) .timeline-item__content {
    grid-column: 2;
  }
  
  .timeline-item__marker {
    grid-column: 1;
  }
  
  .process-step {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .process-step:nth-child(even) {
    grid-template-columns: 1fr;
  }
  
  .process-step__visual {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
  
  .hero-3d {
    min-height: 80vh;
  }
  
  .hero-3d__title {
    font-size: var(--font-size-2xl);
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
  }
  
  .hero-3d__actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .features-3d__grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .carousel-3d__btn {
    display: none;
  }
  
  .cta-3d__title {
    font-size: var(--font-size-2xl);
  }
  
  .cta-3d__trust {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }
  
  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
  
  .hero-3d__title {
    font-size: var(--font-size-xl);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .timeline-item__number {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-xl);
  }
  
  .process-step__visual {
    width: 150px;
    height: 150px;
  }
  
  .process-step__icon {
    width: 120px;
    height: 120px;
  }
  
  .service-card__image {
    height: 250px;
  }
  
  .btn {
    padding: var(--space-12) var(--space-24);
    font-size: var(--font-size-sm);
  }
  
  .btn--large {
    padding: var(--space-16) var(--space-24);
    font-size: var(--font-size-base);
  }
  
  .hero-3d__subtitle {
    font-size: var(--font-size-base);
  }
  
  .section-subtitle {
    font-size: var(--font-size-base);
  }
  
  .feature-card-3d__front {
    padding: var(--space-24);
  }
  
  .timeline-item__content {
    padding: var(--space-24);
  }
  
  .stat-item {
    padding: var(--space-24);
  }
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
  .hero-3d__gradient,
  .floating-shapes,
  .cta-3d__shapes,
  .scroll-indicator,
  .carousel-3d__btn,
  .carousel-3d__indicators {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
}

.timeline-item__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-normal);
}

.section--dark .timeline-item__desc {
  color: #fff; /* سفید توی سکشن تیره */
}
/* لیست بدون بولت پیش‌فرض */
.timeline-item__list {
  list-style: none;
  margin: var(--space-12) 0 0;
  padding: 0;
}

/* متن آیتم‌ها: سفید ملایم روی پس‌زمینه تیره */
.section--dark .timeline-item__list li {
  position: relative;
  padding-left: 1.6rem; /* جا برای آیکن */
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88); /* سفید اما نه 100% */
  font-weight: var(--font-weight-normal);
  transition: color .2s ease;
}

/* هاور: کمی روشن‌تر برای حس تعامل */
.section--dark .timeline-item__list li:hover {
  color: #fff;
}

/* بولت/آیکن: به‌جای خاکستری، پرایمری و تمیز */
.section--dark .timeline-item__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0.1rem; /* با فونتت تنظیم کن؛ 0 تا .2rem */
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  opacity: 0.95;
}

/* اگر می‌خوای به‌جای فلش، دایره نئونی داشته باشی (گزینه B) */

.section--dark .timeline-item__list li::before {
  content: '';
  position: absolute;
  left: 0.1rem;
  top: 0.6em;
  transform: translateY(-50%);
  width: 0.45rem; height: 0.45rem; border-radius: 999px;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.timeline-item__desc {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
}

.section--dark .timeline-item__desc {
  color: #fff; /* متن سفید */
  font-weight: 400;
  letter-spacing: 0.2px; /* کمی بازتر، خواناتر */
  background: linear-gradient(90deg, #ffffff 0%, #b4b4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; /* افکت گرادینت روی متن */
  display: inline-block; /* برای اینکه گرادینت درست اعمال بشه */
}
.timeline-item__desc {
  font-size: 1.125rem; /* کمی بزرگ‌تر از base */
  line-height: 1.7;
  margin: 1rem 0 1.25rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.section--dark .timeline-item__desc {
  color: #fff;
  font-weight: 600;         /* ضخیم‌تر از متن معمولی */
  font-size: 1.0rem;       /* بزرگ‌تر از بادی‌تکست، نزدیک تیتر */
  line-height: 1.8;
  letter-spacing: 0.3px;    /* کمی فاصله برای خوانایی */
  text-shadow: 0 2px 8px rgba(0,0,0,.45); /* کنتراست بیشتر */
}
.process-step__desc {
  font-size: 1rem; /* بزرگ‌تر از base (قبلاً var(--font-size-lg) بود) */
  line-height: 1.7;
  margin-bottom: var(--space-16);
  font-weight: 500;

  /* گرادینت روی متن */
  background: linear-gradient(90deg, #ffffff 0%, #8aa8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow: 0 2px 6px rgba(0,0,0,0.35); /* برای جدا شدن از بک‌گراند */
}

.process-step__tags {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
/* ===== PROCESS (solid, no gradients/opacity) ===== */

.process-steps {
  display: grid;
  gap: var(--space-24);
}

.process-step {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-32);
  align-items: center;
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.process-step.is-visible { opacity: 1; transform: translateX(0); }

.process-step:nth-child(even) {
  grid-template-columns: 1fr 200px;
  transform: translateX(50px);
}
.process-step:nth-child(even) .process-step__visual { order: 2; }

.process-step__visual {
  position: relative;
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}

/* شماره: پس‌زمینه کاملاً سولید با رنگ پرایمری */
.process-step__number {
  position: absolute; top: 0; right: 0;
  width: 60px; height: 60px;
  background: var(--color-primary);             /* solid */
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-btn-primary-text);         /* متن متضادِ ثابت */
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

/* آیکن: کارت سولید با سطح ثابت + بوردر ظریف */
.process-step__icon {
  width: 160px; height: 160px;
  background: var(--color-surface);             /* solid surface */
  border: 1px solid var(--color-card-border);   /* خط مرزی ثابت */
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  color: var(--color-primary);
  transition: transform var(--duration-normal) var(--ease-standard),
              box-shadow var(--duration-normal) var(--ease-standard);
}
.process-step:hover .process-step__icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 30px 60px rgba(0,0,0,.3), 0 15px 30px rgba(0,0,0,.2);
}

/* توضیح: بدون گرادینت/شفافیت، خوانایِ روشن روی تیره */
.process-step__desc {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-16);
  font-weight: 500;
  color: var(--color-text-secondary);
}
.section--dark .process-step__desc { color: #fff; }

/* تگ‌ها: قرص‌های کاملاً سولید و خوانا */
.process-step__tags { display: flex; gap: var(--space-8); flex-wrap: wrap; }

.tag {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  background: var(--color-primary);             /* solid */
  color: var(--color-btn-primary-text);         /* متن متضاد ثابت */
  border: none;
  transition: background .2s ease, color .2s ease;
}
.tag:hover { background: var(--color-primary-hover); }
/* تیتر هر استپ */
.process-step__title {
  font-size: 1.25rem;               /* کمی بزرگ‌تر از متن */
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-heading, #fff);
}

/* توضیح هر استپ */
.process-step__desc {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: var(--space-16);
  font-weight: 400;
  color: var(--color-text-secondary);
}

/* در دارک مود روشن‌تر کن */
.section--dark .process-step__title {
  color: #ffffff;
}
.section--dark .process-step__desc {
  color: rgba(255,255,255,0.92);
}
/* ===================== Global / Base ===================== */
html, body{
  margin:0; padding:0; overflow-x:hidden; scroll-behavior:smooth;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
*,*::before,*::after{ box-sizing:border-box; }

/* ===================== Theme Tokens ===================== */
:root{
  --dark-bg:#0b0b14;
  --panel-bg:rgba(20,22,34,.72);
  --text:#e8ebf3;
  --text-dim:#b7bfd6;
  --accent:#00F0FF;
  --accent-2:#00BFFF;
  --glass-border:rgba(255,255,255,.12);
  --shadow:0 10px 30px rgba(0,0,0,.4);
  --gap:24px;

  /* Layout sizes */
  --container-max:1200px;
  --title-size:clamp(1.6rem, 2vw + 1rem, 3rem);

  /* Carousel sizing */
  --card-w: clamp(280px, 30vw, 420px);     /* تو دسکتاپ بزرگ نمی‌شود */
  --media-h: clamp(220px, 28vw, 360px);    /* کنترل حداکثر ارتفاع مدیا */
  --btn-size:60px;
}

/* ===================== Section ===================== */
.section{ padding:5rem 0; background:var(--dark-bg); color:var(--text); }
.container{ width:100%; max-width:var(--container-max); margin:0 auto; padding:0 1.2rem; }

.section-header{ text-align:center; margin-bottom:2.25rem; }
.section-title{
  font-size:var(--title-size); line-height:1.2; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
}
.section-title__accent{
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  text-shadow:0 0 6px rgba(0,240,255,.55), 0 0 16px rgba(0,191,255,.25);
}

/* ===================== Carousel ===================== */
.carousel{
  position:relative; overflow:hidden;
  padding-block:1.5rem;
  padding-inline: calc(var(--btn-size) + 8px); /* فضای امن برای دکمه‌ها؛ بریدگی کنار رخ نمی‌دهد */
  cursor:grab; perspective:1000px;
  -webkit-tap-highlight-color: transparent;
}
.carousel.is-dragging{ cursor:grabbing; }

.carousel__track{
  display:flex; align-items:stretch;
  gap:var(--gap);
  will-change:transform;
  transition:transform .5s cubic-bezier(.22,.61,.36,1);
  backface-visibility:hidden; transform:translateZ(0);
  user-select:none; touch-action:pan-y;
}

/* ===================== Card ===================== */
.service-card{
  flex:0 0 var(--card-w);
  display:flex; flex-direction:column;
  background:var(--panel-bg);
  border:1px solid var(--glass-border);
  border-radius:18px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .25s ease;
  opacity:.85;
}
.service-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.35);
  opacity:1; border-color:var(--accent);
}
.service-card.is-active{
  /* بدون scale تا عرض مؤثر تغییر نکند و کنارها نبُرد */
  transform: translateY(-8px);
  border-color:var(--accent);
  box-shadow: 0 22px 50px rgba(0,0,0,.6), 0 10px 24px rgba(0,0,0,.45);
  opacity:1; z-index:1;
}

/* Media: 16:9 و «تقریباً کامل» دیده شود (contain) */
.service-card__media{
  width:100%;
  aspect-ratio:16 / 9;                    /* 16:9 ثابت */
  max-height: var(--media-h);             /* در دسکتاپ خیلی بزرگ نشود */
  border-bottom:1px solid var(--glass-border);
  position:relative; background:#0e111c;
}
.service-card__media img{
  width:100%; height:100%;
  object-fit:contain;                     /* تصویر تقریباً کامل دیده شود */
  object-position:center;
  backface-visibility:hidden; transform:translateZ(0);
  transition: filter .3s ease, transform .3s ease;
}
.service-card:not(.is-active) .service-card__media img{ filter:brightness(.92) contrast(.98) saturate(.96); }
.service-card:hover .service-card__media img{ filter:none; transform:scale(1.01); }

.service-card__content{
  padding:1.3rem 1.4rem 1.6rem;
  display:flex; flex-direction:column; gap:.8rem; justify-content:center; text-align:center;
}
.service-card__title{
  margin:0; font-weight:800; letter-spacing:.06em; font-size:clamp(1rem, .6vw + .9rem, 1.25rem);
}
.service-card__description{
  margin:0; color:var(--text-dim);
  font-size:clamp(.92rem, .4vw + .78rem, 1.02rem);
  line-height:1.7;
}

/* ===================== Nav Buttons ===================== */
.carousel__button{
  position:absolute; top:50%; translate:0 -50%;
  width:var(--btn-size); height:var(--btn-size);
  display:flex; place-content:center; place-items:center;
  border-radius:50%; border:1px solid var(--glass-border);
  background: radial-gradient(120% 120% at 30% 30%, rgba(0,240,255,.35), rgba(0,240,255,.08) 60%, rgba(255,255,255,.06) 100%);
  color:var(--accent); cursor:pointer; z-index:10;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}
.carousel__button:hover{
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 22px rgba(0,240,255,.35);
  border-color:var(--accent);
}
.carousel__button:active{ transform: translateY(-50%) scale(.95); }
.carousel__button:focus, .carousel__button:focus-visible{ outline:none; }

.carousel__button--prev{ left:12px; }
.carousel__button--next{ right:12px; }
.carousel__button svg{ width:32px; height:32px; stroke:currentColor; stroke-width:2.4; }

/* ===================== Indicators ===================== */
.carousel__indicators{
  display:flex; justify-content:center; gap:12px;
  margin-top:1.6rem; position:relative; z-index:1;
}
.carousel__indicator-dot{
  width:12px; height:12px; border-radius:50%;
  background:rgba(255,255,255,.22); border:2px solid transparent; cursor:pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,.35);
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.carousel__indicator-dot:hover{ transform:scale(1.1); background:rgba(255,255,255,.4); }
.carousel__indicator-dot--active{
  background:var(--accent); transform:scale(1.28);
  border-color:rgba(255,255,255,.75);
  box-shadow: 0 0 18px rgba(0,240,255,.6), 0 2px 8px rgba(0,0,0,.5);
}

/* ===================== Responsive ===================== */
@media (max-width:1200px){
  :root{ --btn-size:54px; }
  .section{ padding:4.2rem 0; }
}
@media (max-width:992px){
  :root{ --btn-size:48px; --gap:20px; }
  .service-card__content{ padding:1.1rem 1.1rem 1.4rem; }
}
@media (max-width:768px){
  .carousel{ padding-inline: 1rem; }           /* موبایل: فضای کناری کم */
  .carousel__button{ display:none; }           /* فقط درگ/سوایپ */
  .section-title{ font-size:clamp(1.4rem, 4.2vw + .6rem, 1.9rem); }
}
@media (max-width:480px){
  :root{ --gap:16px; }
  .carousel__indicators{ gap:10px; }
}

/* ===================== A11y (اختیاری اما مفید) ===================== */
@media (prefers-reduced-motion:reduce){
  .carousel__track{ transition:none !important; }
  .service-card, .carousel__button{ transition:none !important; }
}
.section {
  position: relative;
  isolation: isolate;          /* جلو نشت فیلتر/بلور از سکشن قبلی را می‌گیرد */
  background: #0b0b14;         /* پس‌زمینه‌ی صلب تا هیچ هاله‌ای از پشت دیده نشود */
}
/* باکس مدیا ثابت 16:9 و بدون محدودیت ارتفاع اضافی */
.service-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  /* max-height را اگر قبلأ گذاشته بودیم، حذف یا کامنت کن */
  /* max-height: none; */
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  background: #0e111c; /* می‌تونی برداری؛ فقط برای زمان لود */
}

/* عکس تمام باکس مدیا را پُر کند؛ بدون letterbox */
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* قبلاً contain بود → همین باعث سفیدی/خالی کناره‌ها می‌شد */
  object-position: center;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: filter .3s ease, transform .3s ease;
}
.carousel {
  padding-inline: 24px;  /* قبلاً برابر --btn-size بود؛ کمترش کردیم تا ستون‌های تیره دیده نشود */
}
.carousel__button--prev { left: 6px; }
.carousel__button--next { right: 6px; }
.carousel { background: transparent; }      /* یا هم‌رنگ پس‌زمینه‌ی سکشن */
.service-card.is-active{
  transform: translateY(-8px);
  border-color: rgba(255,255,255,.16);   /* به‌جای accent تیز */
  box-shadow: 0 20px 44px rgba(0,0,0,.55),
              0 0 18px rgba(0,240,255,.25); /* نور نرم‌تر */
  opacity: 1; z-index: 1;
}
.carousel__track { backface-visibility: hidden; transform: translateZ(0); }
/* استایل فقط برای Branding-Cases ansehen */
a[href*="projekte.php"]:not(.btn--primary) {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  
  /* رنگ سفید */
  background: var(--color-surface);
  color: var(--color-text) !important;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-base);
  
  /* تایپوگرافی */
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  
  /* جلوه‌ها */
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  
  transition: all var(--duration-normal) var(--ease-standard);
}
/* ===== FIX: Timeline line stays behind on scroll ===== */

/* خط عمودی همیشه پشت همه بمونه - حتی موقع animation */
.timeline-3d::before,
.timeline-3dwrapper::before {
  z-index: 0 !important;
  pointer-events: none;
}

/* کارت‌ها و محتوا همیشه جلو */
.timeline-item {
  position: relative;
  z-index: 2;
  isolation: isolate; /* ایزوله کردن stacking context */
}

.timeline-itemcontent {
  position: relative;
  z-index: 3;
  background: var(--color-secondary);
  backdrop-filter: blur(10px);
}

/* دایره شماره‌ها جلوی همه */
.timeline-itemmarker {
  position: relative;
  z-index: 4;
}

.timeline-itemnumber {
  position: relative;
  z-index: 5;
}

/* مطمئن شیم که animation روی z-index اثر نذاره */
.timeline-item.is-visible {
  z-index: 2; /* همون مقدار پایه */
}
/* ===== FIX: Mobile Responsive Issues ===== */

/* موبایل - زیر 768px */
@media (max-width: 768px) {
  
  /* منوی ناوبری - چیدمان عمودی */
  .header-nav {
    flex-direction: column;
    gap: var(--space-8);
    padding: var(--space-12);
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--space-12) var(--space-16);
    font-size: var(--font-size-sm);
  }
  
  /* لوگو کوچک‌تر */
  .header-logo {
    width: 120px;
    height: auto;
  }
  
  /* دکمه‌های Hero */
  .hero-3d__actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* تایتل Hero کوچک‌تر */
  .hero-3d__title {
    font-size: var(--font-size-2xl);
    line-height: 1.3;
  }
  
  .hero-3d__subtitle {
    font-size: var(--font-size-base);
  }
  
  /* تایم‌لاین - چیدمان تک‌ستونی */
  .timeline-3d__wrapper::before {
    left: 20px; /* خط عمودی سمت چپ */
    transform: none;
  }
  
  .timeline-item {
    grid-template-columns: auto 1fr;
    gap: var(--space-16);
  }
  
  .timeline-item:nth-child(even) .timeline-item__content {
    grid-column: 2;
  }
  
  .timeline-item__marker {
    grid-column: 1;
  }
  
  .timeline-item__number {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-xl);
  }
  
  .timeline-item__content {
    padding: var(--space-20);
  }
  
  /* کارت‌های Feature */
  .features-3d__grid {
    grid-template-columns: 1fr;
    gap: var(--space-20);
  }
  
  /* Process Steps */
  .process-step {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-16);
  }
  
  .process-step:nth-child(even) {
    grid-template-columns: 1fr;
  }
  
  .process-step__visual {
    margin: 0 auto;
    width: 150px;
    height: 150px;
  }
  
  .process-step__icon {
    width: 120px;
    height: 120px;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-20);
  }
  
  .stat-item__visual {
    width: 160px;
    height: 160px;
  }
  
  /* CTA Section */
  .cta-3d__title {
    font-size: var(--font-size-2xl);
  }
  
  .cta-3d__trust {
    flex-direction: column;
    align-items: center;
  }
  
  /* Container Padding */
  .container {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }
  
  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

/* موبایل کوچک - زیر 480px */
@media (max-width: 480px) {
  
  /* تایتل‌ها خیلی کوچک‌تر */
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .hero-3d__title {
    font-size: var(--font-size-xl);
  }
  
  /* دکمه‌ها کوچک‌تر */
  .btn {
    padding: var(--space-12) var(--space-20);
    font-size: var(--font-size-sm);
  }
  
  .btn--large {
    padding: var(--space-14) var(--space-24);
    font-size: var(--font-size-base);
  }
  
  /* تایم‌لاین شماره‌ها کوچک‌تر */
  .timeline-item__number {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-lg);
  }
  
  .timeline-item__content {
    padding: var(--space-16);
  }
  
  /* کارت محتوا کوچک‌تر */
  .feature-card-3d__front {
    padding: var(--space-20);
  }
  
  .stat-item {
    padding: var(--space-20);
  }
}

/* تبلت - بین 769px تا 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  
  .hero-3d__title {
    font-size: var(--font-size-3xl);
  }
  
  .section-title {
    font-size: var(--font-size-3xl);
  }
  
  .timeline-3d__wrapper::before {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .features-3d__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-step {
    grid-template-columns: 180px 1fr;
  }
}

/* فیکس برای orientation تبلت */
@media (orientation: landscape) and (max-height: 600px) {
  
  .hero-3d {
    min-height: auto;
    padding: var(--space-32) 0;
  }
  
  .section {
    padding: var(--space-20) 0;
  }
}
/* ===== ZIGZAG TIMELINE LAYOUT (DESKTOP + MOBILE) ===== */

/* تایم‌لاین - خط عمودی وسط */
.timeline-3d__wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-32) 0;
}

.timeline-3d__wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-primary) 10%,
    var(--color-primary) 90%,
    transparent 100%
  );
  z-index: 0;
}

/* آیتم تایم‌لاین - چیدمان Grid */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  gap: var(--space-24);
  align-items: start;
  margin-bottom: var(--space-32);
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  isolation: isolate;
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* آیتم‌های فرد (1، 3، 5...) - سمت چپ */
.timeline-item:nth-child(odd) .timeline-item__content {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  padding-right: var(--space-24);
}

.timeline-item:nth-child(odd) .timeline-item__marker {
  grid-column: 2;
  grid-row: 1;
}

.timeline-item:nth-child(odd) .timeline-item__empty {
  grid-column: 3;
  grid-row: 1;
}

/* آیتم‌های زوج (2، 4، 6...) - سمت راست */
.timeline-item:nth-child(even) .timeline-item__empty {
  grid-column: 1;
  grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-item__marker {
  grid-column: 2;
  grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-item__content {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
  padding-left: var(--space-24);
}

/* شماره دایره - وسط */
.timeline-item__marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.timeline-item__number {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-hover) 100%
  );
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-btn-primary-text);
  box-shadow: 0 0 0 8px rgba(var(--color-teal-500-rgb), 0.2),
    0 0 30px rgba(var(--color-teal-500-rgb), 0.3);
  z-index: 5;
}

/* محتوای کارت */
.timeline-item__content {
  position: relative;
  background: var(--color-secondary);
  backdrop-filter: blur(10px);
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  z-index: 3;
}

/* تایتل کارت */
.timeline-item__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-12);
  color: var(--color-text);
}

.section--dark .timeline-item__title {
  color: var(--color-surface);
}

/* توضیحات کارت */
.timeline-item__desc {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
  line-height: var(--line-height-normal);
}

.section--dark .timeline-item__desc {
  color: rgba(var(--color-gray-300-rgb), 0.8);
}

/* لیست داخل کارت */
.timeline-item__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-item__list li {
  position: relative;
  padding-left: var(--space-24);
  margin-bottom: var(--space-8);
  color: var(--color-text-secondary);
}

.section--dark .timeline-item__list li {
  color: rgba(var(--color-gray-400-rgb), 0.9);
}

.timeline-item__list li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

/* ===== RESPONSIVE - MOBILE ===== */

@media (max-width: 768px) {
  /* خط عمودی سمت چپ */
  .timeline-3d__wrapper::before {
    left: 40px;
    transform: none;
  }

  /* تایم‌لاین تک‌ستونی */
  .timeline-item {
    grid-template-columns: 60px 1fr;
    gap: var(--space-16);
    padding-left: 0;
  }

  /* همه آیتم‌ها یه شکلی */
  .timeline-item:nth-child(odd) .timeline-item__content,
  .timeline-item:nth-child(even) .timeline-item__content {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-item__marker,
  .timeline-item:nth-child(even) .timeline-item__marker {
    grid-column: 1;
    grid-row: 1;
  }

  /* مخفی کردن ستون خالی */
  .timeline-item__empty {
    display: none;
  }

  /* شماره کوچک‌تر */
  .timeline-item__number {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-xl);
  }

  /* محتوا کوچک‌تر */
  .timeline-item__content {
    padding: var(--space-20);
  }

  .timeline-item__title {
    font-size: var(--font-size-lg);
  }

  .timeline-item__desc {
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 480px) {
  /* خط عمودی باریک‌تر */
  .timeline-3d__wrapper::before {
    left: 30px;
  }

  /* شماره خیلی کوچک */
  .timeline-item__number {
    width: 50px;
    height: 50px;
    font-size: var(--font-size-lg);
  }

  /* محتوا خیلی کوچک */
  .timeline-item__content {
    padding: var(--space-16);
  }

  .timeline-item {
    grid-template-columns: 50px 1fr;
  }
}
