/* ═══════════════════════════════════════════════════════════
   base.css — Design tokens · Reset · Typography · Globals
   ReadyStack · Website-first operations theme
═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Palette */
  --white: #EEEFF2;
  --off-white: #E6E8ED;
  --tinted: #DADDE4;

  --amber-50: #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-300: #FCD34D;
  --amber: #F59E0B;
  --amber-600: #D97706;
  --amber-800: #92400E;

  --charcoal-50: #F9FAFB;
  --charcoal-100: #F3F4F6;
  --charcoal-200: #E5E7EB;
  --charcoal-300: #D1D5DB;
  --charcoal-400: #9CA3AF;
  --charcoal-500: #6B7280;
  --charcoal-600: #4B5563;
  --charcoal-700: #374151;
  --charcoal-800: #2D2D30;
  --charcoal-900: #1C1C1E;
  --charcoal-950: #0F0F10;

  /* Semantic colours */
  --green: #10B981;
  --green-dim: rgba(16, 185, 129, .12);
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, .12);
  --blue: #3B82F6;
  --blue-dim: rgba(59, 130, 246, .12);
  --purple: #8B5CF6;
  --purple-dim: rgba(139, 92, 246, .12);
  --amber-dim: rgba(245, 158, 11, .12);

  /* Surfaces */
  --surface: var(--white);
  --surface-alt: var(--off-white);
  --surface-dark: var(--charcoal-900);
  --border: var(--charcoal-200);
  --border-dark: rgba(255, 255, 255, .08);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Fluid type scale */
  --text-xs: clamp(.7rem, .65rem + .25vw, .75rem);
  --text-sm: clamp(.8rem, .75rem + .25vw, .875rem);
  --text-base: clamp(.9rem, .85rem + .25vw, 1rem);
  --text-md: clamp(1rem, .9rem + .5vw, 1.125rem);
  --text-lg: clamp(1.1rem, .95rem + .75vw, 1.25rem);
  --text-xl: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.75rem + 3.5vw, 4rem);
  --text-hero: clamp(2.2rem, 1.5rem + 3vw, 3.8rem);

  /* Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .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: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 4px 14px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.14), 0 8px 24px rgba(0,0,0,.08);
  --shadow-amber: 0 8px 32px rgba(245,158,11,.25);

  /* Transitions */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --dur-xslow: 700ms;

  /* Layout */
  --nav-h: 72px;
  --container: 1280px;
  --container-sm: 900px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.65;
  color: var(--charcoal-900);
  background:
    radial-gradient(
      1200px 700px at 15% -10%,
      rgba(0, 140, 39, .12),
      transparent 60%
    ),
    radial-gradient(
      1000px 600px at 85% 0%,
      rgba(59, 130, 246, .08),
      transparent 65%
    ),
    radial-gradient(
      800px 500px at 50% 120%,
      rgba(0, 140, 39, .06),
      transparent 70%
    ),
    linear-gradient(
      to bottom,
      #EEEFF2 0%,
      #E6EAE8 50%,
      #DEEAE5 100%
    );
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
}

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

img {
  height: auto;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -.02em;
}

p {
  max-width: 68ch;
}

/* ─── Typography Utilities ───────────────────────────────── */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ─── Section Text Hierarchy ─────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-4);
}

.eyebrow-light {
  color: rgba(245, 158, 11, .8);
}

.section-h2 {
  font-size: var(--text-3xl);
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  color: var(--charcoal-900);
  max-width: 620px;
}

.section-h2-light {
  color: var(--white);
}

.section-subline {
  font-size: var(--text-md);
  color: var(--charcoal-500);
  max-width: 54ch;
  margin: 0 auto;
}

.body-copy {
  font-size: var(--text-md);
  color: var(--charcoal-600);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}

.body-copy-light {
  color: rgba(255, 255, 255, .7);
}

/* ─── Colour Utilities ───────────────────────────────────── */
.text-amber {
  color: var(--amber);
}

.text-white {
  color: var(--white);
}

.text-muted {
  color: var(--charcoal-500);
}

.text-green {
  color: var(--green);
}

.text-blue {
  color: var(--blue);
}

.text-amber-grad {
  background: linear-gradient(135deg, var(--amber), var(--amber-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Custom Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--charcoal-100);
}

::-webkit-scrollbar-thumb {
  background: var(--charcoal-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--amber);
}

/* ─── Selection ──────────────────────────────────────────── */
::selection {
  background: rgba(245, 158, 11, .2);
  color: var(--charcoal-900);
}

/* ─── Focus ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── Status Dot ─────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .6;
    transform: scale(.8);
  }
}

/* ─── Live Dot ───────────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4444;
  box-shadow: 0 0 0 0 rgba(255, 68, 68, .4);
  animation: live-pulse 1.5s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, .5);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
  }
}

/* ─── Spinning Utility ───────────────────────────────────── */
.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Accessibility: Skip Link ───────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: .5rem 1rem;
  background: var(--amber);
  color: var(--charcoal-900);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--dur-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* ─── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
/* ═══════════════════════════════════════════════════════════
   ReadyStack Digital content update utilities
   Keeps existing colours, typography and spacing tokens.
═══════════════════════════════════════════════════════════ */

.eyebrow-dark {
  color: rgba(245, 158, 11, .86);
}

.section-subline-light {
  color: rgba(255, 255, 255, .58);
}

.text-balance {
  text-wrap: balance;
}
