/*
 * ==============================================================================
 * Kynz / Vanz Luxury Dark Design System - Tokens & Utility Stylesheet
 * File: /root/web_redesign_workspace/modules/design_tokens.css
 *
 * Architecture & Design Standards:
 * 1. Anti-Slop Strict Architecture:
 *    - Strictly anti-slop: zero diffuse neon blooms or generic AI glows (Lila Rule enforced).
 *    - Deep Zinc and Slate luxury dark foundation (#09090b canvas, #18181b cards).
 *    - Precision borders: Zinc 800 at 60% opacity (rgba(39, 39, 42, 0.6)).
 *    - Singular primary accent: Electric Emerald (#10b981) with high contrast.
 *    - Functional accent: Electric Cyan (#06b6d4) for informative highlights.
 * 2. Typography:
 *    - Imported Geist Sans and Geist Mono from Google Fonts and jsdelivr CDN.
 *    - Tight tracking on headlines (-0.035em to -0.02em), crisp readable body copy.
 * 3. Micro-Physics & Tactile Response:
 *    - Physical button press active state: scale(0.98) with subtle translateY(0.5px).
 *    - Spring easing curves: cubic-bezier(0.16, 1, 0.3, 1) and snappy variants.
 * 4. Card Refraction Glassmorphism:
 *    - Clean 1px inner border refraction highlight (inset 0 1px 0 rgba(255, 255, 255, 0.08)).
 *    - Zero outer neon slop: deep background-tinted drop shadows only, zero color bleed halos.
 * 5. Modern UX & Accessibility:
 *    - Custom sleek scrollbars for WebKit and Firefox.
 *    - Full reduced-motion and reduced-transparency compliance.
 *    - Zero em-dashes and zero en-dashes throughout the entire stylesheet.
 * ==============================================================================
 */

/* Import Geist Sans and Geist Mono */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap');
@import url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/style.css');
@import url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-mono/style.css');

/* ==============================================================================
   1. DESIGN TOKENS (ROOT & LUXURY DARK DEFAULT)
   ============================================================================== */
:root,
html.dark,
html[data-theme="dark"] {
  /* Color Palette: Deep Zinc Luxury Base */
  --color-zinc-950: #09090b;
  --color-zinc-900: #18181b;
  --color-zinc-850: #1f1f23;
  --color-zinc-800: #27272a;
  --color-zinc-700: #3f3f46;
  --color-zinc-600: #52525b;
  --color-zinc-500: #71717a;
  --color-zinc-400: #a1a1aa;
  --color-zinc-300: #d4d4d8;
  --color-zinc-200: #e4e4e7;
  --color-zinc-100: #f4f4f5;
  --color-zinc-50:  #fafafa;

  /* Color Palette: Deep Slate Refinements */
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-850: #162032;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;

  /* Primary Accent: Electric Emerald (#10b981) */
  --color-emerald-50:  #ecfdf5;
  --color-emerald-100: #d1fae5;
  --color-emerald-200: #a7f3d0;
  --color-emerald-300: #6ee7b7;
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-emerald-700: #047857;
  --color-emerald-800: #065f46;
  --color-emerald-900: #064e3b;
  --color-emerald-950: #022c22;

  /* Functional Secondary Accent: Electric Cyan (#06b6d4) */
  --color-cyan-50:  #ecfeff;
  --color-cyan-100: #cffafe;
  --color-cyan-200: #a5f3fc;
  --color-cyan-300: #67e8f9;
  --color-cyan-400: #22d3ee;
  --color-cyan-500: #06b6d4;
  --color-cyan-600: #0891b2;
  --color-cyan-700: #0e7490;
  --color-cyan-800: #155e75;
  --color-cyan-900: #164e63;
  --color-cyan-950: #083344;

  /* Status and Feedback Colors */
  --color-danger-400:  #f87171;
  --color-danger-500:  #ef4444;
  --color-danger-600:  #dc2626;
  --color-warning-400: #fbbf24;
  --color-warning-500: #f59e0b;
  --color-warning-600: #d97706;
  --color-success-400: #34d399;
  --color-success-500: #10b981;
  --color-success-600: #059669;

  /* Semantic Theme Accents (Electric Emerald singular hero) */
  --accent: var(--color-emerald-500);
  --accent-hover: var(--color-emerald-600);
  --accent-active: var(--color-emerald-700);
  --accent-foreground: #022c22; /* High contrast dark pine green on emerald */
  --accent-text: var(--color-emerald-400);
  --accent-subtle: rgba(16, 185, 129, 0.08);
  --accent-muted: rgba(16, 185, 129, 0.14);
  --accent-border: rgba(16, 185, 129, 0.32);
  --accent-border-strong: rgba(16, 185, 129, 0.6);

  /* Semantic Surfaces (Linear and Vercel Luxury Dark Zinc) */
  --bg-canvas: var(--color-zinc-950);
  --bg-surface: #121215;
  --bg-card: var(--color-zinc-900);
  --bg-card-glass: rgba(24, 24, 27, 0.75);
  --bg-elevated: var(--color-zinc-850);
  --bg-overlay: rgba(9, 9, 11, 0.82);
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.08);

  /* Semantic Borders: Zinc 800/60 and Micro Refractions */
  --border-default: rgba(39, 39, 42, 0.6);
  --border-zinc-800-60: rgba(39, 39, 42, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: var(--color-zinc-800);
  --border-active: var(--color-zinc-700);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-focus: var(--color-emerald-500);

  /* Semantic Text Hierarchy */
  --text-primary: var(--color-zinc-100);
  --text-secondary: var(--color-zinc-400);
  --text-muted: var(--color-zinc-500);
  --text-faint: var(--color-zinc-600);
  --text-inverse: var(--color-zinc-950);
  --text-contrast: #ffffff;
  --text-accent: var(--color-emerald-400);
  --text-cyan: var(--color-cyan-400);

  /* Typography Fonts */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Type Scale */
  --text-2xs: 0.6875rem; /* 11px */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */

  /* Letter Spacing (Tracking) */
  --tracking-tighter: -0.035em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  --tracking-mono: 0.05em;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Micro-Physics & Spring Easing */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring-snappy: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --ease-spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring-soft: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Animation Durations */
  --duration-instant: 75ms;
  --duration-fast: 150ms;
  --duration-normal: 220ms;
  --duration-moderate: 320ms;
  --duration-slow: 500ms;

  /* Tactile Physics Offsets */
  --tactile-hover-y: -0.5px;
  --tactile-press-y: 0.5px;
  --tactile-press-scale: 0.98;

  /* Card Refraction Glassmorphism & High-End Shadows */
  /* Zero outer neon slop: deep background-tinted drop shadows only */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.55);

  /* Refraction Inset Highlights (Simulating frosted edge refraction) */
  --shadow-refraction: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-refraction-hover: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-refraction-active: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(0, 0, 0, 0.2);

  /* Composite Card Elevations */
  --shadow-card: var(--shadow-refraction), 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: var(--shadow-refraction-hover), 0 12px 32px -4px rgba(0, 0, 0, 0.65);
  --shadow-dialog: var(--shadow-refraction), 0 24px 64px -8px rgba(0, 0, 0, 0.75);

  /* Border Radii */
  --radius-none: 0px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Spacing Scale */
  --space-0: 0px;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Layout Container Maximum Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;

  /* Z-Index Hierarchy */
  --z-base: 0;
  --z-card: 1;
  --z-elevated: 10;
  --z-sticky: 20;
  --z-drawer: 30;
  --z-overlay: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-toast: 70;
}

/* ==============================================================================
   2. LIGHT MODE THEME OVERRIDES (Clean parity with dark_mode_engine.js)
   ============================================================================== */
html[data-theme="light"]:not(.dark),
html.light:not(.dark) {
  --bg-canvas: #ffffff;
  --bg-surface: #fafafa;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.85);
  --bg-elevated: #f4f4f5;
  --bg-overlay: rgba(255, 255, 255, 0.85);
  --bg-subtle: rgba(0, 0, 0, 0.03);
  --bg-hover: rgba(0, 0, 0, 0.05);
  --bg-active: rgba(0, 0, 0, 0.08);

  --border-default: #e4e4e7;
  --border-zinc-800-60: #e4e4e7;
  --border-subtle: #f4f4f5;
  --border-strong: #d4d4d8;
  --border-active: #a1a1aa;
  --border-glass: rgba(0, 0, 0, 0.08);

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-faint: #a1a1aa;
  --text-inverse: #f4f4f5;
  --text-contrast: #09090b;

  --accent-foreground: #ffffff;
  --accent-text: var(--color-emerald-600);
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --accent-muted: rgba(16, 185, 129, 0.16);
  --accent-border: rgba(16, 185, 129, 0.4);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.09);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.12);

  --shadow-refraction: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-refraction-hover: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  --shadow-refraction-active: inset 0 1px 0 rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-dialog: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==============================================================================
   3. MODERN BASELINE RESET & ACCESSIBILITY
   ============================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-default);
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  tab-size: 4;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Luxury text selection */
::selection {
  background-color: var(--accent-subtle);
  color: var(--accent-text);
}

/* High-contrast focus state */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Media Elements Defaults */
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ==============================================================================
   4. CUSTOM SLEEK SCROLLBAR (Anti-slop minimal track)
   ============================================================================== */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-zinc-700) transparent;
}

/* WebKit: Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-zinc-800);
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-canvas);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-zinc-700);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Custom scroll utility for containers */
.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--color-zinc-700) transparent;
}

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

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--color-zinc-800);
  border-radius: var(--radius-full);
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-zinc-700);
}

/* ==============================================================================
   5. TACTILE BUTTONS & MICRO-PHYSICS
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-none);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  transition: transform var(--duration-fast) var(--ease-spring),
              background-color var(--duration-normal) var(--ease-spring),
              border-color var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-spring),
              color var(--duration-normal) var(--ease-spring);
  position: relative;
  isolation: isolate;
  outline: none;
}

/* Tactile micro-physics: lift on hover, physical press down on active */
.btn:hover:not(:disabled):not(.is-disabled) {
  transform: translateY(var(--tactile-hover-y));
}

.btn:active:not(:disabled):not(.is-disabled) {
  transform: translateY(var(--tactile-press-y)) scale(var(--tactile-press-scale));
  transition-duration: var(--duration-instant);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button: Electric Emerald (WCAG AA compliant contrast) */
.btn-primary {
  background-color: var(--accent);
  color: var(--accent-foreground);
  font-weight: var(--font-weight-semibold);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
              0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--accent-hover);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
              0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-primary:active:not(:disabled):not(.is-disabled) {
  background-color: var(--accent-active);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* Secondary Button: Zinc Luxury Glass */
.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-refraction), var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--color-zinc-800);
  border-color: var(--border-active);
  color: var(--text-contrast);
  box-shadow: var(--shadow-refraction-hover), var(--shadow-md);
}

.btn-secondary:active:not(:disabled):not(.is-disabled) {
  background-color: var(--color-zinc-850);
  box-shadow: var(--shadow-refraction-active);
}

/* Ghost Button: Restrained hover surface */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-ghost:active:not(:disabled):not(.is-disabled) {
  background-color: var(--bg-active);
  color: var(--text-contrast);
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-outline:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--bg-hover);
  border-color: var(--border-active);
  color: var(--text-contrast);
}

/* Electric Cyan Button Variant */
.btn-cyan {
  background-color: var(--color-cyan-500);
  color: var(--color-cyan-950);
  font-weight: var(--font-weight-semibold);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28),
              0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-cyan:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--color-cyan-600);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
              0 4px 12px rgba(6, 182, 212, 0.25);
}

.btn-cyan:active:not(:disabled):not(.is-disabled) {
  background-color: var(--color-cyan-700);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* Danger Button */
.btn-danger {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--color-danger-400);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled):not(.is-disabled) {
  background-color: var(--color-danger-500);
  color: #ffffff;
  border-color: var(--color-danger-600);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

/* Button Sizing */
.btn-xs {
  font-size: var(--text-2xs);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-xs);
}

.btn-sm {
  font-size: var(--text-xs);
  padding: 0.5rem 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: var(--text-base);
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: 0.625rem;
  border-radius: var(--radius-md);
  aspect-ratio: 1 / 1;
}

.btn-full {
  width: 100%;
}

/* Debounced state cooperation (anti_fraud_honeypot.js) */
.btn.is-debounced {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* Standalone tactile micro-physics utilities */
.tactile-press {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.tactile-press:hover {
  transform: translateY(var(--tactile-hover-y));
}

.tactile-press:active {
  transform: translateY(var(--tactile-press-y)) scale(var(--tactile-press-scale));
}

.hover-lift {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.hover-lift:hover {
  transform: translateY(-1px);
}

.-translate-y-0\.5:hover {
  transform: translateY(-0.125rem);
}

.active-scale-98:active {
  transform: scale(0.98);
}

.spring-transition {
  transition-timing-function: var(--ease-spring);
}

/* ==============================================================================
   6. CARD REFRACTION GLASSMORPHISM (1px inner border, 0 outer neon slop)
   ============================================================================== */
.card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-spring),
              border-color var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-spring);
}

/* Refraction Glassmorphic Panel (1px inner highlight, zero neon bloom) */
.card-glass {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.008) 100%
  ), var(--bg-card-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-refraction), var(--shadow-md);
}

/* Physical 1px refraction inner border pseudo-element */
.card-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.02) 60%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Refraction panel utility */
.glassmorphic-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-default);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.glass-surface {
  background-color: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-refraction);
}

/* Interactive Card with subtle physical lift */
.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-refraction-hover), var(--shadow-card-hover);
}

.card-interactive:active {
  transform: translateY(var(--tactile-press-y)) scale(0.995);
  transition-duration: var(--duration-instant);
}

/* ==============================================================================
   7. FORM CONTROLS & VALIDATION STATES
   ============================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.input,
.select,
.textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--color-zinc-900);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) var(--ease-spring),
              background-color var(--duration-fast) var(--ease-spring);
  outline: none;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-active);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35),
              0 0 0 1px var(--accent);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.helper-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-snug);
}

.error-text {
  font-size: var(--text-xs);
  color: var(--color-danger-400);
  line-height: var(--leading-snug);
}

/* WhatsApp Validation States (Synchronized with anti_fraud_honeypot.js) */
.input.input-wa-valid {
  border-color: var(--color-emerald-500);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.input.input-wa-invalid {
  border-color: var(--color-danger-500);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4);
}

/* ==============================================================================
   8. BADGES & STATUS INDICATORS
   ============================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  vertical-align: middle;
}

.badge-accent,
.badge-emerald {
  background-color: var(--accent-subtle);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}

.badge-cyan {
  background-color: rgba(6, 182, 212, 0.08);
  color: var(--color-cyan-400);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-neutral {
  background-color: var(--color-zinc-800);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-mono {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}

/* Status Indicator Dot (Subtle pulse without neon slop) */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-emerald-500);
  display: inline-block;
  position: relative;
}

.status-dot-pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background-color: var(--color-emerald-500);
  opacity: 0.4;
  animation: pulse-ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }
  70% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ==============================================================================
   9. CODE, MONOSPACE & KEYBOARD HINTS
   ============================================================================== */
.code,
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-primary);
  background-color: var(--color-zinc-800);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.15em 0.35em;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1;
  color: var(--text-secondary);
  background-color: var(--color-zinc-900);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.4rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* ==============================================================================
   10. BACKGROUND PATTERNS & LUXURY TEXTURES
   ============================================================================== */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

.bg-dot-pattern {
  background-size: 24px 24px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-default) 20%,
    var(--border-default) 80%,
    transparent 100%
  );
  border: none;
}

.divider {
  height: 1px;
  width: 100%;
  background-color: var(--border-default);
  border: none;
}

/* ==============================================================================
   11. LAYOUT & CONTAINER UTILITIES
   ============================================================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: var(--container-2xl);
  }
}

/* Flexbox utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 767px) {
  .md-grid-cols-1 { grid-template-columns: 1fr !important; }
}

@media (min-width: 768px) {
  .md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Bento Grid */
.grid-bento {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .grid-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bento-col-2 {
    grid-column: span 2 / span 2;
  }
  .bento-col-3 {
    grid-column: span 3 / span 3;
  }
}

/* Gap scale */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }

/* ==============================================================================
   12. TYPOGRAPHY UTILITIES
   ============================================================================== */
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

.font-normal { font-weight: var(--font-weight-regular); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-2xs { font-size: var(--text-2xs); }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.tracking-tighter { letter-spacing: var(--tracking-tighter); }
.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }
.tracking-mono { letter-spacing: var(--tracking-mono); }

.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-accent { color: var(--accent-text); }
.text-cyan { color: var(--text-cyan); }
.text-danger { color: var(--color-danger-400); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Display Headlines */
.headline-display {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-tighter);
  line-height: 1.1;
  color: var(--text-primary);
}

.headline-section {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* ==============================================================================
   13. SURFACE & BORDER UTILITIES
   ============================================================================== */
.bg-canvas { background-color: var(--bg-canvas); }
.bg-surface { background-color: var(--bg-surface); }
.bg-card { background-color: var(--bg-card); }
.bg-zinc-950 { background-color: var(--color-zinc-950); }
.bg-zinc-900 { background-color: var(--color-zinc-900); }
.bg-zinc-850 { background-color: var(--color-zinc-850); }
.bg-zinc-800 { background-color: var(--color-zinc-800); }
.bg-zinc-700 { background-color: var(--color-zinc-700); }

.border { border-width: 1px; border-style: solid; }
.border-default { border-color: var(--border-default); }
.border-zinc-800-60 { border-color: rgba(39, 39, 42, 0.6); }
.border-subtle { border-color: var(--border-subtle); }
.border-strong { border-color: var(--border-strong); }
.border-active { border-color: var(--border-active); }
.border-accent { border-color: var(--accent-border); }

.rounded-none { border-radius: var(--radius-none); }
.rounded-xs { border-radius: var(--radius-xs); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ==============================================================================
   14. ACCESSIBILITY & PREFERENCE OVERRIDES
   ============================================================================== */
@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;
  }

  .btn:hover,
  .btn:active,
  .card-interactive:hover,
  .card-interactive:active,
  .tactile-press:hover,
  .tactile-press:active,
  .hover-lift:hover,
  .-translate-y-0\.5:hover,
  .active-scale-98:active {
    transform: none !important;
  }

  .status-dot-pulse::after {
    animation: none !important;
    display: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .card-glass,
  .glassmorphic-nav,
  .glass-surface,
  .btn-secondary {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: var(--bg-card) !important;
  }

  html.dark .glassmorphic-nav,
  html[data-theme="dark"] .glassmorphic-nav {
    background-color: var(--color-zinc-950) !important;
  }

  html[data-theme="light"]:not(.dark) .glassmorphic-nav,
  html.light:not(.dark) .glassmorphic-nav {
    background-color: #ffffff !important;
  }
}
