/* ==========================================================================
   NorthLabs — base.css
   Design tokens, reset, and base typography
   ========================================================================== */

:root {
  /* Color — deep tech navy with blue/violet accent gradient */
  --color-bg: #0a0e17;
  --color-bg-alt: #0d1220;
  --color-surface: #10162480;
  --color-surface-solid: #10a16f0f;
  --color-surface-2: #131a2a;
  --color-border: #232b3d;
  --color-border-soft: #1b2334;

  --color-text: #e9ecf4;
  --color-text-muted: #9aa3b8;
  /* Kept light enough to clear WCAG AA (4.5:1) on both the page and card
     surfaces, since this token is used for small supporting text. */
  --color-text-faint: #858ea4;

  --color-accent-blue: #4f7cff;
  --color-accent-violet: #8b5cf6;
  --color-accent-cyan: #22d3ee;

  --color-error: #f87171;

  --gradient-primary: linear-gradient(120deg, var(--color-accent-blue), var(--color-accent-violet));
  --gradient-primary-soft: linear-gradient(120deg, rgba(79, 124, 255, 0.14), rgba(139, 92, 246, 0.14));
  --gradient-text: linear-gradient(120deg, #ffffff 0%, #c9d4ff 50%, #9fb4ff 100%);

  /* Typography */
  --font-heading: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;
  --fs-5xl: 4.25rem;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3.5rem;
  --space-9: 5rem;
  --space-10: 7rem;

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 380ms;
  --dur-slow: 720ms;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.15), 0 8px 40px -8px rgba(79, 124, 255, 0.25);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  /* Clips decorative bleed (glows, orbits) without creating a scroll
     container, so stray overflow can never widen the layout viewport. */
  overflow-x: clip;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* ---- Focus states (accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 200;
  background: var(--color-accent-blue);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---- Selection ---- */
::selection {
  background: rgba(79, 124, 255, 0.35);
  color: #fff;
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #2c3650;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---- Section spacing ---- */
.section {
  position: relative;
  padding-block: var(--space-10);
}

.section--tight {
  padding-block: var(--space-8);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-cyan);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: currentColor;
  display: inline-block;
}

.section-head h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

/* A block within a section that needs its own heading, used by the merged
   "How We Work" section. Sits one level below .section-head. */
.subsection {
  margin-top: var(--space-9);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-soft);
}

.subsection-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}

.subsection-head h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.subsection-head p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---- Typography utilities ---- */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
