/* ============================================
   ZAKTOMATE — Design System
   Tokens, Typography, Spacing, Resets
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-dark:    #0A0A0A;
  --bg-mid:     #111111;
  --bg-card:    #161616;
  --bg-card2:   #1C1C1C;
  --bg-light:   #F4F1EB;

  /* Accent */
  --accent:       #2ECC8F;
  --accent-dim:   rgba(46,204,143,0.12);
  --accent-glow:  rgba(46,204,143,0.25);
  --accent-hover: #27B87E;

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: #9A9A9A;
  --text-dark:      #141414;
  --text-muted:     #5A5A5A;

  /* Borders */
  --border:       #222222;
  --border-light: #E5E0D8;

  /* Semantic */
  --warning:    #F59E0B;
  --error-red:  #EF4444;
  --wa-green:   #25D366;

  /* Typography Scale */
  --type-hero:     clamp(48px, 7vw, 88px);
  --type-h1:       clamp(40px, 5vw, 64px);
  --type-h2:       clamp(28px, 3.5vw, 48px);
  --type-h3:       clamp(19px, 2vw, 24px);
  --type-body-lg:  18px;
  --type-body:     16px;
  --type-body-sm:  14px;
  --type-caption:  13px;
  --type-stat:     clamp(40px, 5vw, 68px);
  --type-eyebrow:  11px;
  --type-button:   15px;
  --type-nav:      14px;

  /* Spacing (8px base grid) */
  --space-xs:   8px;
  --space-sm:   16px;
  --space-md:   24px;
  --space-lg:   48px;
  --space-xl:   80px;
  --space-2xl:  120px;
  --space-3xl:  160px;

  /* Section padding */
  --section-pad:    100px 0;
  --section-pad-lg: 130px 0;

  /* Container */
  --container-max: 1200px;
  --container-pad: 0 32px;

  /* Border radius */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-pill: 100px;

  /* Shadows */
  --shadow-card:  0 1px 3px rgba(0,0,0,.4), 0 8px 32px rgba(0,0,0,.5);
  --shadow-glow:  0 0 28px rgba(46, 204, 143, 0.30);
  --shadow-image: 0 24px 64px rgba(0,0,0,.5);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Syne', sans-serif;
  font-size: var(--type-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

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

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

/* --- Section Backgrounds --- */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.section-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

.section-dark > * {
  position: relative;
  z-index: 1;
}

.section-mid {
  background: var(--bg-mid);
  color: var(--text-primary);
  position: relative;
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
  position: relative;
}

.section-teal {
  background: linear-gradient(135deg, #0D4A2A 0%, #156B3D 40%, var(--accent) 100%);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.section-teal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02) 0,
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 20px
  );
  pointer-events: none;
  z-index: 0;
}

.section-teal > * {
  position: relative;
  z-index: 1;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
}

.display-hero {
  font-family: 'Instrument Serif', serif;
  font-size: var(--type-hero);
  font-weight: 400;
  line-height: 1.05;
}

.display-h1 {
  font-family: 'Instrument Serif', serif;
  font-size: var(--type-h1);
  font-weight: 400;
  line-height: 1.1;
}

.display-h2 {
  font-family: 'Instrument Serif', serif;
  font-size: var(--type-h2);
  font-weight: 400;
  line-height: 1.15;
}

.display-h3 {
  font-family: 'Syne', sans-serif;
  font-size: var(--type-h3);
  font-weight: 700;
  line-height: 1.25;
}

.text-serif {
  font-family: 'Instrument Serif', serif;
}

.text-serif-italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
}

.text-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* --- Eyebrow --- */
.eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.section-light .eyebrow {
  color: var(--accent);
}

.eyebrow--warning {
  color: var(--warning);
}

.eyebrow--center {
  text-align: center;
}

/* --- Body text on light sections --- */
.section-light p,
.section-light .body-text {
  color: #555555;
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
  color: var(--text-dark);
}

/* --- Stat numbers --- */
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: var(--type-stat);
  line-height: 1;
}

/* --- Text utilities --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-dark { color: var(--text-dark); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-warning { color: var(--warning); }

.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-medium { font-weight: 500; }

.text-body-lg {
  font-size: var(--type-body-lg);
  line-height: 1.65;
}

.text-body {
  font-size: var(--type-body);
  line-height: 1.75;
}

.text-body-sm {
  font-size: var(--type-body-sm);
  line-height: 1.7;
}

.text-caption {
  font-size: var(--type-caption);
  line-height: 1.5;
}

/* --- Spacing utilities --- */
.mt-xs  { margin-top: var(--space-xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }

.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

/* --- Grid utilities --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* --- Max width utilities --- */
.max-600 { max-width: 600px; }
.max-680 { max-width: 680px; }
.max-760 { max-width: 760px; }
.max-800 { max-width: 800px; }
.max-900 { max-width: 900px; }
.max-960 { max-width: 960px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --container-pad: 0 24px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
