/* ==========================================================================
   IDI — Design Tokens
   Brand: Interior Demolition Inc.
   Concept: bold industrial contractor — red, black, off-white palette
   ========================================================================== */

:root {
  /* Type Scale (fluid) */
  --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.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 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);

  /* Spacing — 4px base */
  --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;

  /* Content widths */
  --content-narrow: 720px;
  --content-default: 1100px;
  --content-wide: 1320px;

  /* Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 9999px;

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

  /* Fonts */
  --font-display: 'Archivo Black', 'Impact', 'Helvetica Neue', sans-serif;
  --font-condensed: 'Barlow Condensed', 'Oswald', 'Impact', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
}

/* ---- LIGHT (default) — off-white background ---- */
:root,
[data-theme='light'] {
  /* Brand */
  --color-brand: #c8102e;          /* IDI red */
  --color-brand-hover: #a30c25;
  --color-brand-active: #82091d;
  --color-brand-soft: #fbe7ea;
  --color-brand-ink: #ffffff;       /* text on brand */

  /* Surfaces */
  --color-bg: #f4f1ec;              /* warm off-white */
  --color-surface: #ffffff;
  --color-surface-2: #ecebe6;
  --color-surface-offset: #e4e2dc;
  --color-surface-dark: #161616;    /* deep industrial black */
  --color-surface-dark-2: #1f1f1f;

  /* Borders */
  --color-border: #d4d0c8;
  --color-divider: #e0ddd5;

  /* Text */
  --color-text: #161616;
  --color-text-muted: #555048;
  --color-text-faint: #8a857c;
  --color-text-inverse: #f4f1ec;
  --color-text-on-dark: #f4f1ec;
  --color-text-on-dark-muted: #b6b1a8;

  /* Status */
  --color-success: #1d7a3a;
  --color-warning: #c47615;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.08);
  --shadow-md: 0 6px 18px rgba(20, 20, 20, 0.1);
  --shadow-lg: 0 18px 42px rgba(20, 20, 20, 0.18);

  /* Patterns */
  --stripe-warning:
    repeating-linear-gradient(
      135deg,
      #f5c100 0 14px,
      #161616 14px 28px
    );
}

/* ---- DARK — black industrial mode ---- */
[data-theme='dark'] {
  --color-brand: #ec1f3b;
  --color-brand-hover: #ff3a55;
  --color-brand-active: #ff5a70;
  --color-brand-soft: #2a0e12;
  --color-brand-ink: #ffffff;

  --color-bg: #0d0d0d;
  --color-surface: #161616;
  --color-surface-2: #1c1c1c;
  --color-surface-offset: #222222;
  --color-surface-dark: #050505;
  --color-surface-dark-2: #0a0a0a;

  --color-border: #2a2a2a;
  --color-divider: #1f1f1f;

  --color-text: #f0ece4;
  --color-text-muted: #a6a29a;
  --color-text-faint: #6a655c;
  --color-text-inverse: #0d0d0d;
  --color-text-on-dark: #f0ece4;
  --color-text-on-dark-muted: #a6a29a;

  --color-success: #4caf66;
  --color-warning: #f0a93a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-brand: #ec1f3b;
    --color-brand-hover: #ff3a55;
    --color-brand-active: #ff5a70;
    --color-brand-soft: #2a0e12;
    --color-bg: #0d0d0d;
    --color-surface: #161616;
    --color-surface-2: #1c1c1c;
    --color-surface-offset: #222222;
    --color-border: #2a2a2a;
    --color-divider: #1f1f1f;
    --color-text: #f0ece4;
    --color-text-muted: #a6a29a;
    --color-text-faint: #6a655c;
    --color-text-inverse: #0d0d0d;
  }
}
