/* ===== DESIGN TOKENS — TEAM 365 CONCRETE/INDUSTRIAL ===== */
:root {
  /* TYPE SCALE */
  --text-xs: clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(3rem, 1.5rem + 5vw, 6rem);
  --text-hero: clamp(3.5rem, 1rem + 9vw, 10rem);

  /* 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;
  --space-40: 10rem;

  /* CONTENT WIDTHS */
  --content-narrow: 720px;
  --content-default: 1200px;
  --content-wide: 1440px;

  /* RADIUS — minimal, industrial */
  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 4px;

  /* TRANSITIONS */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 200ms var(--ease);
  --transition-med: 400ms var(--ease);

  /* FONTS */
  --font-display: 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* DARK (DEFAULT) — concrete/black */
:root,
[data-theme='dark'] {
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-surface: #171717;
  --color-surface-2: #1f1f1f;
  --color-border: #2a2a2a;
  --color-border-strong: #3d3d3d;
  --color-text: #f5f5f4;
  --color-text-muted: #a1a1a0;
  --color-text-faint: #626260;
  --color-accent: #f5f5f4;
  --color-inverse: #0a0a0a;
  --grain-opacity: 0.06;
  --scrim: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.75) 100%);
}

/* LIGHT — concrete grey */
[data-theme='light'] {
  --color-bg: #ededea;
  --color-bg-alt: #e2e0dc;
  --color-surface: #f4f2ef;
  --color-surface-2: #ffffff;
  --color-border: #cfccc6;
  --color-border-strong: #a8a5a0;
  --color-text: #0a0a0a;
  --color-text-muted: #4a4a48;
  --color-text-faint: #8a8884;
  --color-accent: #0a0a0a;
  --color-inverse: #ededea;
  --grain-opacity: 0.08;
  --scrim: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.55) 100%);
}

/* ===== BASE ===== */
*, *::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);
}

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

/* Concrete grain overlay for the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

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

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

p, li {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: var(--color-text);
  color: var(--color-bg);
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

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

a, button, [role='button'], input, textarea, select {
  transition: color var(--transition-fast), background var(--transition-fast),
              border-color var(--transition-fast), transform var(--transition-fast),
              opacity var(--transition-fast);
}

.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}

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