/* ================================================================
   TRDG Commercial - Base CSS
   Reset + design tokens
   ================================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; }

html, body { height: 100%; }

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: none; padding: 0; cursor: pointer; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 { line-height: 1.15; font-weight: 600; }

a { color: inherit; text-decoration: none; }

ul, ol { padding: 0; list-style: none; }

/* --- Design Tokens: TRDG brand palette --- */

:root {
  /* Brand palette from TRDG brand guidelines */
  --dusk:       #1F1630;
  --dusk-2:     #2b2140;
  --dusk-3:     #3a2f52;
  --dawn:       #FAFAF2;
  --dawn-2:     #F4F3EA;
  --dawn-3:     #ECEBDF;
  --orchid:     #D6BAFA;
  --orchid-2:   #C7A6F5;
  --orchid-3:   #B590EE;
  --lavender:   #F5EDFF;
  --sunset:     #FC615C;
  --ocean:      #75DEE0;
  --sky:        #70BAFC;
  --sun:        #FAD685;
  --seafoam:    #CCF7E8;

  /* Semantic mappings */
  --color-bg:            var(--dawn);
  --color-surface:       #FFFFFF;
  --color-surface-alt:   var(--dawn-2);
  --color-surface-dark:  var(--dusk);
  --color-text:          var(--dusk);
  --color-text-muted:    #5C5170;
  --color-text-faint:    #8B819D;
  --color-text-inverse:  var(--dawn);
  --color-border:        #E4E0D5;
  --color-border-dark:   #3a2f52;
  --color-primary:       var(--orchid);
  --color-primary-hover: var(--orchid-2);
  --color-accent:        var(--dusk);

  /* Fluid type scale */
  --text-xs:    clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);
  --text-sm:    clamp(0.875rem, 0.82rem + 0.28vw, 1rem);
  --text-base:  clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  --text-lg:    clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl:    clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --text-2xl:   clamp(2rem, 1.6rem + 2vw, 3.5rem);
  --text-hero:  clamp(2.5rem, 1.8rem + 3.6vw, 5rem);

  /* Spacing scale (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;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* Shadows (tone-matched to dusk) */
  --shadow-xs: 0 1px 2px rgba(31, 22, 48, 0.05);
  --shadow-sm: 0 2px 8px rgba(31, 22, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(31, 22, 48, 0.08);
  --shadow-lg: 0 20px 60px rgba(31, 22, 48, 0.12);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Fonts */
  --font-body: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 780px;
  --container-wide: 1400px;
}

/* Selection */
::selection { background: var(--orchid); color: var(--dusk); }

/* Focus rings */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--dusk);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
