/* ==========================================================================
   base.css - Design tokens, reset, typography scale, responsive utilities
   Source of truth: WEBSITE-SPEC.md Section 3
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@700;800&family=Sora:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Custom Properties (Design Tokens) --- */
:root {
  /* Background colors */
  --bg-primary: #101929;
  --bg-header: #0F172A;
  --bg-footer: #0F172A;
  --bg-hero: #001428;
  --bg-approach: #101828;
  --bg-card: #1E293B;
  --border-card: #334155;

  /* White scale (text on dark backgrounds) */
  --white-1: #FAF8F5;
  --white-2: #CBD5E1;
  --white-3: #94A3B8;
  --white-4: #64748B;

  /* Blue scale */
  --blue-1: #66D4E7;
  --blue-2: #06B6D4;
  --blue-3: #1F9BE5;
  --blue-4: #3B82F6;
  --blue-dark: #005E91;

  /* Accent colors (industry verticals) */
  --accent-science: #8B5CF6;
  --accent-education: #10B981;
  --accent-industry: #F97316;

  /* Warm accent (human-touch moments only) */
  --warm-accent: #F0A848;
  --warm-white: #FAF8F5;

  /* Gradients */
  --gradient-primary-btn: linear-gradient(to right, #3B82F6, #06B6D4);
  --gradient-text-headline: linear-gradient(to right, #FFFFFF, #3B82F6 50%, #06B6D4);
  --gradient-cta-bg: linear-gradient(45deg, #1E293B, #0F172A);
  --gradient-science: linear-gradient(to right, #3B82F6, #8B5CF6);
  --gradient-industry: linear-gradient(to right, #06B6D4, #F97316);
  --gradient-education: linear-gradient(to right, #FFFFFF, #10B981);

  /* Background effects */
  --grid-line-color: rgba(3, 105, 161, 0.2);
  --glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  --glow-cyan: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
  --glow-warm: radial-gradient(circle, rgba(240, 168, 72, 0.06) 0%, transparent 60%);

  /* Typography */
  --font-heading: 'DM Sans', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  /* Font sizes */
  --text-logo: 22px;
  --text-nav: 13px;
  --text-hero-headline: 56px;
  --text-hero-sub: 18px;
  --text-section-title: 40px;
  --text-card-title: 18px;
  --text-body: 16px;
  --text-body-sm: 15px;
  --text-btn: 14px;
  --text-btn-sm: 13px;
  --text-badge: 12px;
  --text-badge-sm: 11px;
  --text-footer: 13px;

  /* Spacing */
  --space-section: 50px;
  --space-section-sm: 30px;
  --space-title-content: 20px;
  --space-paragraph: 25px;
  --space-card-inner: 25px;
  --space-card-gap: 20px;
  --space-btn-gap: 40px;
  --page-margin: 100px;
  --page-margin-mobile: 24px;

  /* Layout */
  --header-height: 80px;
  --max-width: 1240px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-pill: 100px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--white-1);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* --- Typography Scale --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  letter-spacing: -1px;
}

h1 {
  font-size: var(--text-hero-headline);
  font-weight: 800;
  letter-spacing: -2.5px;
}

h2 {
  font-size: var(--text-section-title);
  font-weight: 800;
  letter-spacing: -1.5px;
}

h3 {
  font-size: var(--text-card-title);
  font-weight: 700;
}

h4 {
  font-size: var(--text-body);
  font-weight: 700;
}

p {
  margin-bottom: var(--space-paragraph);
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

code, pre {
  font-family: var(--font-code);
  font-size: 15px;
  font-weight: 400;
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  overflow-x: auto;
  color: var(--blue-1);
}

code {
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 15px;
}

strong {
  font-weight: 700;
}

/* --- Utility Classes --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

.text-gradient {
  background: var(--gradient-text-headline);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-secondary {
  color: var(--white-2);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   THEME: Clean (light)
   White background, slate text, same blue/cyan accents
   ========================================================================== */

[data-theme="clean"] {
  --bg-primary: #FFFFFF;
  --bg-header: #F8FAFC;
  --bg-footer: #F1F5F9;
  --bg-hero: #F8FAFC;
  --bg-approach: #F1F5F9;
  --bg-card: #F8FAFC;
  --border-card: #E2E8F0;

  --white-1: #0F172A;
  --white-2: #334155;
  --white-3: #64748B;
  --white-4: #94A3B8;

  --warm-white: #0F172A;

  --gradient-text-headline: linear-gradient(to right, #0F172A, #3B82F6 50%, #06B6D4);
  --gradient-cta-bg: linear-gradient(45deg, #F1F5F9, #E2E8F0);
  --gradient-education: linear-gradient(to right, #0F172A, #10B981);

  --grid-line-color: rgba(59, 130, 246, 0.08);
  --glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 60%);
  --glow-cyan: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  --glow-warm: radial-gradient(circle, rgba(240, 168, 72, 0.04) 0%, transparent 60%);
}

/* ==========================================================================
   THEME: Warm (cream/stone)
   Warm neutral background, charcoal text, amber accent elevated
   ========================================================================== */

[data-theme="warm"] {
  --bg-primary: #FAF5EF;
  --bg-header: #F5EDE3;
  --bg-footer: #EDE4D8;
  --bg-hero: #F5EDE3;
  --bg-approach: #F0E8DD;
  --bg-card: #FFFFFF;
  --border-card: #DDD5CA;

  --white-1: #1C1917;
  --white-2: #44403C;
  --white-3: #78716C;
  --white-4: #A8A29E;

  --warm-white: #1C1917;
  --warm-accent: #D97706;

  --gradient-text-headline: linear-gradient(to right, #1C1917, #3B82F6 50%, #06B6D4);
  --gradient-cta-bg: linear-gradient(45deg, #F0E8DD, #EDE4D8);
  --gradient-education: linear-gradient(to right, #1C1917, #10B981);

  --grid-line-color: rgba(59, 130, 246, 0.06);
  --glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
  --glow-cyan: radial-gradient(circle, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  --glow-warm: radial-gradient(circle, rgba(217, 119, 6, 0.06) 0%, transparent 60%);
}

/* --- Responsive Breakpoints ---
   Mobile-first approach:
   - Default: 320px+
   - Tablet: 768px+
   - Desktop: 1024px+
   - Wide: 1440px+
   ========================================== */

@media (max-width: 1439px) {
  :root {
    --page-margin: 56px;
  }
}

@media (max-width: 1023px) {
  :root {
    --page-margin: 40px;
    --text-hero-headline: 44px;
    --text-section-title: 32px;
  }
}

@media (max-width: 767px) {
  :root {
    --page-margin: var(--page-margin-mobile);
    --text-hero-headline: 36px;
    --text-section-title: 28px;
    --text-hero-sub: 16px;
    --space-section: 30px;
  }
}
