/* ==========================================================================
   Levi Analytix — Design System
   Single source of truth: tokens, reset, typography, components, utilities.
   Every page links this file and inherits the same visual system.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --blue:        #2563EB;   /* primary — buttons, links, highlights */
  --blue-dark:   #1D4ED8;   /* primary hover */
  --blue-soft:   #EFF4FE;   /* light blue fill (secondary btn hover) */
  --purple:      #6D28D9;   /* secondary — gradients, hover, emphasis */
  --purple-dark: #5B21B6;
  --grad:        linear-gradient(135deg, #2563EB 0%, #6D28D9 100%);

  /* Surfaces */
  --dark:    #0F172A;       /* hero / footer / emphasis sections */
  --light:   #F8FAFC;       /* alternating light section */
  --white:   #FFFFFF;
  --line:    #E5E7EB;       /* hairline border */

  /* Text */
  --text:      #111827;     /* primary text + headings */
  --muted:     #6B7280;     /* secondary text */
  --on-dark:   #E2E8F0;     /* body text on dark bg */
  --on-dark-muted: #94A3B8;

  /* Type */
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container:   1200px;
  --radius:      12px;      /* buttons, controls */
  --radius-card: 16px;      /* cards, panels */
  --section-y:   clamp(5rem, 9vw, 7.5rem);  /* 80–120px vertical rhythm */

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.05);
  --shadow-md: 0 6px 20px rgba(15,23,42,0.08);
  --shadow-lg: 0 18px 48px rgba(15,23,42,0.14);
  --shadow-blue: 0 8px 24px rgba(37,99,235,0.30);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); font-weight: 800; }  /* hero up to 68px */
h2 { font-size: clamp(2rem, 4vw, 3rem);      font-weight: 700; }  /* section up to 48px */
h3 { font-size: 1.5rem;   font-weight: 700; }                     /* card titles ~24px */
h4 { font-size: 1.15rem;  font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }

/* Gradient text — reserve for hero + major callouts */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: var(--section-y); }
.section--light { background: var(--light); }
.section--dark  { background: var(--dark); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { font-size: 1.1rem; margin-top: 0.75rem; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 0.9rem;
}
.section--dark .eyebrow { color: #A5B4FC; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.0625rem; line-height: 1;
  height: 54px; padding: 0 1.6rem; border-radius: var(--radius);
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-blue); transform: translateY(-2px); }

.btn--gradient { background: var(--grad); color: #fff; }
.btn--gradient:hover { box-shadow: var(--shadow-blue); transform: translateY(-2px); }

.btn--secondary { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn--secondary:hover { background: var(--blue-soft); }

/* On dark sections */
.btn--ghost-light { background: rgba(255,255,255,0.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.16); }

/* ---------- Links ---------- */
.link { color: var(--blue); font-weight: 500; }
.link:hover { color: var(--purple); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; }
.link-arrow:hover { gap: 10px; color: var(--purple); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 2rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { margin-bottom: 0.6rem; }
.card p  { font-size: 1rem; }

/* Icon tile */
.ic-tile {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem; background: var(--blue-soft); color: var(--blue);
}
.ic-tile--grad { background: var(--grad); color: #fff; }
.ic-tile svg, .ic-tile i { width: 26px; height: 26px; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Scroll reveal (JS adds .in) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.75rem; } .gap-2 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .container { padding-inline: 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
