/* =====================================================
   GENTRUST AI — DESIGN SYSTEM FOUNDATION
   Tokens · Reset · Typography · Layout · Animation
   ===================================================== */

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

/* ─── DESIGN TOKENS ─────────────────────────────── */
:root {
  /* Brand Colors */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --blue-900: #1E3A8A;
  --blue-950: #172554;
  --cyan-400: #22D3EE;
  --cyan-500: #06B6D4;
  --cyan-600: #0891B2;

  /* Neutral Scale */
  --sl-950: #020617;
  --sl-900: #0F172A;
  --sl-800: #1E293B;
  --sl-700: #334155;
  --sl-600: #475569;
  --sl-500: #64748B;
  --sl-400: #94A3B8;
  --sl-300: #CBD5E1;
  --sl-200: #E2E8F0;
  --sl-100: #F1F5F9;
  --sl-50:  #F8FAFC;

  /* Semantic */
  --c-primary:      var(--blue-600);
  --c-primary-dark: var(--blue-700);
  --c-primary-lt:   var(--blue-100);
  --c-accent:       var(--cyan-500);
  --c-text:         var(--sl-800);
  --c-muted:        var(--sl-500);
  --c-faint:        var(--sl-400);
  --c-bg:           #FFFFFF;
  --c-bg-alt:       var(--sl-50);
  --c-border:       var(--sl-200);
  --c-success:      #10B981;
  --c-warning:      #F59E0B;
  --c-error:        #EF4444;

  /* Spacing (8px scale) */
  --sp-1: 8px;   --sp-2: 16px;  --sp-3: 24px;  --sp-4: 32px;
  --sp-5: 48px;  --sp-6: 64px;  --sp-7: 80px;  --sp-8: 96px;
  --sp-9: 120px; --sp-10: 160px;

  /* Layout */
  --max-w: 1200px;
  --gutter: max(24px, calc((100% - var(--max-w)) / 2));
  --nav-h: 72px;

  /* Radius */
  --r-sm: 4px;  --r: 8px;     --r-lg: 12px;
  --r-xl: 16px; --r-2xl: 24px; --r-full: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(15,23,42,0.05);
  --sh-sm: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --sh:    0 4px 6px rgba(15,23,42,0.07), 0 2px 4px rgba(15,23,42,0.04);
  --sh-md: 0 10px 24px rgba(15,23,42,0.09), 0 4px 8px rgba(15,23,42,0.05);
  --sh-lg: 0 20px 40px rgba(15,23,42,0.11), 0 8px 16px rgba(15,23,42,0.06);
  --sh-xl: 0 32px 64px rgba(15,23,42,0.13);
  --sh-primary: 0 8px 24px rgba(37,99,235,0.3);

  /* Transitions */
  --t:      200ms ease;
  --t-slow: 400ms ease;

  /* Z-index */
  --z-nav:   100;
  --z-modal: 200;
  --z-toast: 300;
}

/* ─── RESET ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font, 'Inter', system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* ─── TYPOGRAPHY ───────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--sl-900);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem,    5vw,   3.5rem);  }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem);  }
h3 { font-size: clamp(1.2rem,  2.5vw, 1.625rem);}
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; font-weight: 600; }
p  { color: var(--c-muted); line-height: 1.75; }
strong { font-weight: 600; color: var(--sl-700); }

/* ─── LAYOUT ────────────────────────────────────── */
.section {
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section--sm  { padding-top: var(--sp-6);  padding-bottom: var(--sp-6); }
.section--lg  { padding-top: var(--sp-9);  padding-bottom: var(--sp-9); }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--sl-900); }
.section--dark h1,.section--dark h2,.section--dark h3,
.section--dark h4,.section--dark h5 { color: #fff; }
.section--dark p { color: var(--sl-400); }

/* Section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.eyebrow--light { color: var(--cyan-400); }
.sec-title { margin-bottom: var(--sp-2); }
.sec-sub   { font-size: 1.0625rem; max-width: 560px; color: var(--c-muted); }
.sec-hdr   { margin-bottom: var(--sp-6); }
.sec-hdr--c {
  text-align: center;
}
.sec-hdr--c .sec-sub { margin-left: auto; margin-right: auto; }

/* Grid helpers */
.g-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--sp-5); }
.g-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); }
.g-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-4); }

/* ─── SCROLL ANIMATIONS ─────────────────────────── */
[data-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-anim].in-view { opacity: 1; transform: none; }
[data-anim][data-d="1"] { transition-delay: 80ms;  }
[data-anim][data-d="2"] { transition-delay: 160ms; }
[data-anim][data-d="3"] { transition-delay: 240ms; }
[data-anim][data-d="4"] { transition-delay: 320ms; }
[data-anim][data-d="5"] { transition-delay: 400ms; }
[data-anim][data-d="6"] { transition-delay: 480ms; }

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sp-8: 80px; --sp-9: 96px; }
  .g-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  :root { --sp-7: 56px; --sp-8: 64px; --sp-9: 80px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2,1fr); gap: var(--sp-3); }
}
@media (max-width: 480px) {
  :root { --sp-5: 40px; --sp-6: 48px; --sp-7: 56px; --sp-8: 56px; }
  .g-4 { grid-template-columns: 1fr; }
}
