/* style.css — 268 Mobile Tire Rescue Design System */

/* ============================================
   FONTS
   ============================================ */
/* Loaded via HTML <link> tags:
   Display: Barlow Condensed (bold, condensed, automotive energy)
   Body: DM Sans (clean, readable, modern) */

/* ============================================
   TYPE SCALE (fluid with clamp)
   ============================================ */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* FONT FAMILIES */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* ============================================
     4px SPACING SYSTEM
     ============================================ */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* RADIUS */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* TRANSITION */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* CONTENT WIDTHS */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ============================================
   COLOR SYSTEM — DARK DEFAULT (Brand-first)
   ============================================ */

/* DARK MODE (default) */
:root, [data-theme="dark"] {
  /* Surfaces */
  --color-bg:              #0a0a0a;
  --color-surface:         #111111;
  --color-surface-2:       #1a1a1a;
  --color-surface-offset:  #151515;
  --color-surface-offset-2:#1e1e1e;
  --color-surface-dynamic: #242424;
  --color-divider:         #2a2a2a;
  --color-border:          #333333;

  /* Text */
  --color-text:            #f0f0f0;
  --color-text-muted:      #a0a0a0;
  --color-text-faint:      #666666;
  --color-text-inverse:    #0a0a0a;

  /* Primary Accent (Bold Red from logo) */
  --color-primary:         #D32F2F;
  --color-primary-hover:   #E53935;
  --color-primary-active:  #B71C1C;
  --color-primary-highlight: rgba(211, 47, 47, 0.15);

  /* Secondary */
  --color-secondary:       #111111;

  /* Success (Green) */
  --color-success:         #4CAF50;
  --color-success-hover:   #388E3C;
  --color-success-highlight: rgba(76, 175, 80, 0.15);

  /* Warning */
  --color-warning:         #FF9800;
  --color-warning-highlight: rgba(255, 152, 0, 0.15);

  /* Shadows (dark mode) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  /* WhatsApp green */
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1da851;
}

/* LIGHT MODE */
[data-theme="light"] {
  --color-bg:              #f7f6f2;
  --color-surface:         #ffffff;
  --color-surface-2:       #f9f8f5;
  --color-surface-offset:  #f0eeea;
  --color-surface-offset-2:#e8e6e1;
  --color-surface-dynamic: #dddbd6;
  --color-divider:         #d4d1ca;
  --color-border:          #c8c5be;

  --color-text:            #1a1a1a;
  --color-text-muted:      #5a5a5a;
  --color-text-faint:      #999999;
  --color-text-inverse:    #f0f0f0;

  --color-primary:         #C62828;
  --color-primary-hover:   #D32F2F;
  --color-primary-active:  #B71C1C;
  --color-primary-highlight: rgba(198, 40, 40, 0.1);

  --color-success:         #2E7D32;
  --color-success-highlight: rgba(46, 125, 50, 0.1);

  --color-warning:         #E65100;
  --color-warning-highlight: rgba(230, 81, 0, 0.1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1da851;
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:              #f7f6f2;
    --color-surface:         #ffffff;
    --color-surface-2:       #f9f8f5;
    --color-surface-offset:  #f0eeea;
    --color-surface-offset-2:#e8e6e1;
    --color-surface-dynamic: #dddbd6;
    --color-divider:         #d4d1ca;
    --color-border:          #c8c5be;
    --color-text:            #1a1a1a;
    --color-text-muted:      #5a5a5a;
    --color-text-faint:      #999999;
    --color-text-inverse:    #f0f0f0;
    --color-primary:         #C62828;
    --color-primary-hover:   #D32F2F;
    --color-primary-active:  #B71C1C;
    --color-primary-highlight: rgba(198, 40, 40, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  }
}
