/* ============================================
   FermiPro Clean — BASE
   Tokens, reset, typography
   ============================================ */

:root {
  /* Brand palette */
  --ink: #0E1411;        /* near-black, green-shifted */
  --ink-90: #141a17;
  --ink-80: #1b2220;
  --paper: #F3EFE7;      /* warm bone */
  --paper-dim: #e6e1d6;
  --steel: #A8B0B2;      /* stainless mid */
  --steel-dim: #7e8688;
  --accent: #00B4A6;     /* clinical cyan-teal (sanitary/lab) */
  --accent-ink: #0E1411; /* text color on accent backgrounds */
  --warn: #C7412A;       /* warning only */

  /* Functional */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #6b6f6c;
  --rule: rgba(14, 20, 17, 0.12);
  --rule-strong: rgba(14, 20, 17, 0.22);

  /* Type */
  --font-display: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, Menlo, monospace;

  /* Scale */
  --fs-hero: clamp(2.1rem, 4.6vw, 4.75rem);
  --fs-h2: clamp(1.7rem, 4vw, 3.6rem);
  --fs-h3: clamp(1.35rem, 1.8vw, 1.65rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-mono: 0.75rem;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;
  --space-8: 9rem;

  /* Container */
  --max-w: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 620ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

ul, ol { list-style: none; }

/* Type — display */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-hero);
  line-height: 0.93;
  letter-spacing: -0.035em;
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p { max-width: 62ch; }

/* Type — mono */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-7);
  position: relative;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

/* Theme regions */
.region-ink {
  background: var(--ink);
  color: var(--paper);
  --fg: var(--paper);
  --rule: rgba(243, 239, 231, 0.14);
  --rule-strong: rgba(243, 239, 231, 0.28);
  --muted: #a3a6a2;
}

.region-paper {
  background: var(--paper);
  color: var(--ink);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--ink);
}

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

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
