/* ============================================
   TIQOSS — Base CSS
   Art direction: Luxury automotive, dark/graphite
   surfaces, gold accent, editorial sans-serif
   ============================================ */

/* — Design Tokens — */
:root {
  /* Type scale */
  --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 */
  --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.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

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

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1280px;

  /* Fonts — technical / futuristic */
  --font-display: 'Rajdhani', 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Space Grotesk', 'Rajdhani', 'Helvetica Neue', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

/* Dark mode — always on for TIQOSS (luxury automotive dark brand) */
:root, [data-theme="dark"] {
  /* Graphite/carbon surfaces */
  --color-bg:             #0e0e0f;
  --color-surface:        #141416;
  --color-surface-2:      #1a1a1c;
  --color-surface-3:      #202022;
  --color-surface-offset: #252527;
  --color-divider:        #2a2a2c;
  --color-border:         #333336;

  /* Text */
  --color-text:           #f0ede8;
  --color-text-muted:     #8a8880;
  --color-text-faint:     #4d4c48;
  --color-text-inverse:   #0e0e0f;

  /* White / silver accent — clean technical */
  --color-primary:        #e0e0e0;
  --color-primary-hover:  #ffffff;
  --color-primary-active: #ffffff;
  --color-primary-dim:    rgba(224, 224, 224, 0.08);
  --color-primary-border: rgba(224, 224, 224, 0.18);

  /* Red accent — sport / danger */
  --color-accent-red:     #c0392b;
  --color-accent-red-dim: rgba(192, 57, 43, 0.12);

  /* Silver */
  --color-silver:         #a8a8a8;
  --color-silver-dim:     rgba(168, 168, 168, 0.12);

  /* Semantic */
  --color-success:        #4caf50;
  --color-warning:        #ff9800;
  --color-error:          #e53935;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.65);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.8);
  --shadow-gold: 0 0 32px rgba(224, 224, 224, 0.08);

  /* Brand red (logo) — used for key CTA only */
  --color-brand: #e31e25;
  --color-brand-dim: rgba(227, 30, 37, 0.12);
  --color-brand-border: rgba(227, 30, 37, 0.25);
}

/* Light mode support */
[data-theme="light"] {
  --color-bg:             #f5f3ef;
  --color-surface:        #faf9f7;
  --color-surface-2:      #ffffff;
  --color-surface-3:      #f0ede8;
  --color-surface-offset: #ebe8e3;
  --color-divider:        #dddad5;
  --color-border:         #d0cdc8;
  --color-text:           #1a1a1c;
  --color-text-muted:     #6b6965;
  --color-text-faint:     #b0ada8;
  --color-text-inverse:   #f5f3ef;
  --color-primary:        #333333;
  --color-primary-hover:  #1a1a1a;
  --color-primary-active: #000000;
  --color-primary-dim:    rgba(0, 0, 0, 0.06);
  --color-primary-border: rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --shadow-gold: 0 0 32px rgba(0, 0, 0, 0.08);
  --color-brand: #c0392b;
  --color-brand-dim: rgba(192, 57, 43, 0.1);
  --color-brand-border: rgba(192, 57, 43, 0.2);
}

/* — Base Reset — */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.1; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(227, 30, 37, 0.2); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role="button"] {
  transition: color var(--transition-interactive),
              background var(--transition-interactive),
              border-color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              opacity var(--transition-interactive),
              transform var(--transition-interactive);
}

.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;
}

@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;
  }
}
