/* =============================================================
   ConstructionX AI — Colors & Type
   Dark-mode-native. Slate foundation. Neon green as the single
   accent. Space Grotesk for structure, Inter for voice.
   ============================================================= */

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

:root {
  /* ---------- Color tokens (brand) ---------- */
  --cx-slate-900: #0f172a;   /* deepest bg (footer / contrast sections) */
  --cx-slate-800: #1e293b;   /* primary page bg */
  --cx-slate-700: #334155;   /* card surface */
  --cx-slate-600: #475569;   /* border / divider */
  --cx-slate-400: #94a3b8;   /* muted body text */
  --cx-slate-100: #f1f5f9;   /* primary foreground (off-white) */

  --cx-green-500: #22c55e;   /* neon accent — THE brand color */
  --cx-green-600: #16a34a;   /* accent hover / pressed */
  --cx-green-100-a15: rgba(34, 197, 94, 0.15); /* badge fill */
  --cx-green-100-a10: rgba(34, 197, 94, 0.10); /* icon chip fill */
  --cx-green-glow:    rgba(34, 197, 94, 0.30); /* btn hover shadow */

  /* ---------- Semantic surfaces ---------- */
  --bg-page:      var(--cx-slate-800);
  --bg-deep:      var(--cx-slate-900);
  --bg-card:      var(--cx-slate-700);
  --bg-input:     var(--cx-slate-900);
  --border:       var(--cx-slate-600);
  --border-soft:  rgba(71, 85, 105, 0.4);
  --nav-tint:     rgba(30, 41, 59, 0.85);

  /* ---------- Semantic foreground ---------- */
  --fg-1:         var(--cx-slate-100); /* primary */
  --fg-2:         var(--cx-slate-400); /* muted / body */
  --fg-accent:    var(--cx-green-500);
  --fg-on-accent: var(--cx-slate-900); /* text on green fills */

  /* ---------- Type families ---------- */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* ---------- Type scale (fluid) ---------- */
  --fs-display: clamp(2.5rem, 5vw, 4rem);      /* H1 — hero */
  --fs-h2:      clamp(2rem, 4vw, 3rem);        /* section headers */
  --fs-h3:      clamp(1.3rem, 2.5vw, 1.6rem);  /* card titles / subhead */
  --fs-h4:      1.1rem;                         /* eyebrow / small head */
  --fs-lead:    1.2rem;                         /* hero subtitle */
  --fs-body:    1rem;                           /* default body */
  --fs-sm:      0.9rem;                         /* nav / meta */
  --fs-xs:      0.8rem;                         /* labels / legal */
  --fs-eyebrow: 0.75rem;                        /* badge */

  /* ---------- Spacing ---------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;     --space-8: 5rem;

  /* ---------- Radii ---------- */
  --radius-sm: 6px;
  --radius:    8px;    /* buttons / inputs */
  --radius-lg: 12px;   /* cards */
  --radius-pill: 50px; /* badges */

  /* ---------- Elevation ---------- */
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.3);
  --shadow-btn-glow:   0 4px 20px rgba(34, 197, 94, 0.3);
  --focus-ring:        0 0 0 3px rgba(34, 197, 94, 0.15);

  /* ---------- Motion ---------- */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1:  180ms;
  --dur-2:  300ms;     /* standard transition */
  --dur-3:  600ms;     /* fade-in entry */

  /* ---------- Layout ---------- */
  --max-width: 1200px;
  --nav-height: 80px;
}

/* =============================================================
   Base elements (semantic resets)
   ============================================================= */

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--fg-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-1);
}
h1 { font-size: var(--fs-display); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2);      letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p  { color: var(--fg-2); margin-bottom: var(--space-4); }

code, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--fg-accent);
  background: var(--cx-green-100-a10);
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
}

a { color: var(--fg-accent); text-decoration: none; transition: color var(--dur-2) var(--ease); }
a:hover { color: var(--cx-green-600); }

/* Utility helpers used across cards/specimens */
.cx-display { font-family: var(--font-display); }
.cx-body    { font-family: var(--font-body); }
.cx-accent  { color: var(--fg-accent); }
.cx-muted   { color: var(--fg-2); }

/* Footer social icons */
.footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  align-items: center;
}
.footer__social a {
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.footer__social a:hover {
  color: var(--fg-accent);
  border-color: var(--fg-accent);
  transform: translateY(-1px);
}
