/* Legacy global styles copied from CRA src/index.css (without Tailwind directives) to keep layout identical. */

/* Modern Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Accessibility: clear focus treatment */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Ensure buttons/links show focus ring even without default outline */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* Standardized Card System */
.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.06);
}

.card:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

.card-large {
  padding: 32px;
  border-radius: 20px;
}

.card-small {
  padding: 16px;
  border-radius: 12px;
}

/* Visual Hierarchy */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 32px;
  line-height: 1.6;
}

.subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  line-height: 1.3;
}

.content-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

/* Visual Separators */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
  margin: 48px 0;
}

.content-separator {
  height: 1px;
  background: rgba(0, 0, 0, 0.05);
  margin: 24px 0;
}

/* Consistent Spacing */
.section-spacing {
  margin-bottom: 48px;
}

.content-spacing {
  margin-bottom: 32px;
}

.element-spacing {
  margin-bottom: 16px;
}

/* Enhanced Interactive Feedback */
.btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Interactive Cards */
.interactive-card {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.interactive-card:active {
  transform: translateY(-2px) scale(1.01);
}

/* Form Elements */
input,
select,
textarea {
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 86, 163, 0.15);
}

/* Link Hover Effects */
a {
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Theme switch in header (match shadcn-style pill track) */
.ve-theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  padding: 2px;
  background: rgba(148, 163, 184, 0.7);
  border: none;
}

.ve-theme-switch[aria-checked="true"] {
  justify-content: flex-end;
  background: #2563eb;
}

.ve-theme-switch span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
}

.ve-theme-switch-label {
  color: #4b5563;
}

.dark .ve-theme-switch-label,
.home-hero-overlay .ve-theme-switch-label {
  color: #e5ecf7;
}

/* Color Palette Variables */
:root {
  /* Surface Colors */
  --surface-a10: #ffffff;
  --surface-a20: #f0f0f0;
  --surface-a30: #e1e1e1;
  --surface-a40: #d3d3d3;
  --surface-a50: #c5c5c5;
  --surface-a60: #b6b6b6;

  /* Tonal Surface Colors */
  --tonal-a10: #f5eeff;
  --tonal-a20: #a7a1f0;
  --tonal-a30: #dad5e1;
  --tonal-a40: #cdc6d3;
  --tonal-a50: #bfbcc5;
  --tonal-a60: #b2afb6;

  /* Success Colors */
  --success-a10: #1b7f5c;
  --success-a20: #28ba8a;
  --success-a30: #58dbad;

  /* Warning Colors */
  --warning-a10: #b8871f;
  --warning-a20: #dfaa44;
  --warning-a30: #ebca85;

  /* Danger Colors */
  --danger-a10: #b13535;
  --danger-a20: #d06262;
  --danger-a30: #e29d9d;

  /* Info Colors */
  --info-a10: #1e56a3;
  --info-a20: #347ada;
  --info-a30: #74a4e6;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;

  /* Consistent Spacing System */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;

  /* Typography Scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 4px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.08), 0 4px 8px 0 rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 12px 24px 0 rgba(0, 0, 0, 0.12), 0 6px 12px 0 rgba(0, 0, 0, 0.08);

  /* Dark Mode Shadows */
  --dark-shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --dark-shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --dark-shadow-lg: 0 12px 24px 0 rgba(0, 0, 0, 0.5), 0 6px 12px 0 rgba(0, 0, 0, 0.4);
  --dark-shadow-xl: 0 20px 40px 0 rgba(0, 0, 0, 0.6), 0 10px 20px 0 rgba(0, 0, 0, 0.5);

  /* Dark Theme Colors */
  /* Purple accent scale (primary) */
  --dark-tint-primary-a10: #7c3aed; /* main accent */
  --dark-tint-primary-a20: #8b5cf6;
  --dark-tint-primary-a30: #a855f7;
  --dark-tint-primary-a40: #c4b5fd;
  --dark-tint-primary-a50: #ddd6fe;
  --dark-tint-primary-a60: #ede9fe;

  /* Dark Surface Colors: neutral near-black grays */
  --dark-surface-a10: #050505;
  --dark-surface-a20: #0b0b0b;
  --dark-surface-a30: #141414;
  --dark-surface-a40: #1f1f1f;
  --dark-surface-a50: #262626;
  --dark-surface-a60: #303030;

  /* Dark Tonal Surface Colors */
  --dark-tonal-a10: #18122b;
  --dark-tonal-a20: #1e1635;
  --dark-tonal-a30: #251c3f;
  --dark-tonal-a40: #2e244a;
  --dark-tonal-a50: #393056;
  --dark-tonal-a60: #4a3d6b;

  /* Dark Semantic Colors */
  --dark-success-a10: #228456;
  --dark-success-a20: #479550;
  --dark-success-a30: #8ad5cc;

  --dark-warning-a10: #a37a2a;
  --dark-warning-a20: #d7ac51;
  --dark-warning-a30: #ecd7b2;

  --dark-danger-a10: #bc2121;
  --dark-danger-a20: #d54a4a;
  --dark-danger-a30: #eb8e8e;

  --dark-info-a10: #1d4d82;
  --dark-info-a20: #4d77a1;
  --dark-info-a30: #932ca3;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #ffffff;
  color: #1f2937;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: color 0.3s ease;
}

/* Dark Mode */
.dark body {
  background: #0c0c0c; /* matte black background across all pages */
  background-size: auto;
  animation: none;
  color: #f8fafc;
}

/* Container Styles (match CRA index.css) */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
}

/* Uniform Boxed Layout System */
.content-box {
  background: var(--surface-a10);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-a30);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-2xl);
  transition: all 0.3s ease-in-out;
  width: 100%;
  box-sizing: border-box;
}

.content-box:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Uniform Container System */
.boxed-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Responsive Boxed Layout */
@media (max-width: 768px) {
  .boxed-container {
    padding: var(--spacing-sm);
    gap: var(--spacing-md);
  }

  .content-box {
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
  }
}

@media (max-width: 480px) {
  .boxed-container {
    padding: var(--spacing-xs);
    gap: var(--spacing-sm);
  }

  .content-box {
    padding: var(--spacing-lg);
  }
}

/* Consistent Button Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0 var(--spacing-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
              box-shadow 0.18s ease, transform 0.1s ease;
  box-sizing: border-box;
  height: 44px;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #ffffff;
  border-color: #4F46E5;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #4F46E5;
  border-color: rgba(129, 140, 248, 0.7);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: inherit;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}
