/* ============================================
   Blue Sapphire — Design System Stylesheet
   Strategic IT Consulting | 2026
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif; font-size: 1rem; line-height: 1.65; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Tokens --- */
:root {
  --primary: #0A1633;
  --secondary: #1D4ED8;
  --tertiary: #0EA5E9;
  --accent: #60A5FA;
  --neutral: #F8FAFC;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --success: #059669;
  --danger: #DC2626;
  --dark-surface: #0A1633;
  --dark-elevated: #111E42;
  --dark-border: #1E2D5A;
  --dark-muted: #8B9AC4;
  --dark-text: #E2E8F0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --max-width: 1200px;
  --section-pad: 80px;
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
p { max-width: 70ch; }
p.lead { font-size: 1.125rem; line-height: 1.7; color: var(--muted); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tertiary);
  margin-bottom: 12px;
  display: inline-block;
}

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad) 0; }
section.tight { padding: 48px 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-secondary { background: transparent; color: var(--secondary); border-color: var(--secondary); }
.btn-secondary:hover { background: var(--secondary); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.nav.scrolled { box-shadow: 0 1px 3px rgba(10,22,51,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--primary); letter-spacing: -0.02em; }
.nav-logo .gem { width: 28px; height: 28px; flex-shrink: 0; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 0.9375rem; font-weight: 500; color: var(--ink); transition: color 0.15s; position: relative; }
.nav-links a:hover { color: var(--secondary); }
.nav-links a.active { color: var(--secondary); }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.3s; }

/* --- Hero --- */
.hero { padding: 120px 0 100px; background: var(--surface); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .lead { font-size: 1.25rem; margin-bottom: 36px; color: var(--muted); max-width: 56ch; }
.hero-cta-group { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-graphic {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark-elevated) 100%);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.hero-graphic::before {
  content: ''; position: absolute; top: -50%; right: -30%; width: 80%; height: 200%;
  background: radial-gradient(circle, rgba(14,165,233,0.15) 0%, transparent 60%);
}
.hero-graphic .gem-large { width: 50%; height: auto; position: relative; z-index: 1; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--border); }
.hero-stat .num { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: var(--secondary); line-height: 1; }
.hero-stat .label { font-size: 0.875rem; color: var(--muted); margin-top: 8px; }

/* --- Section Headers --- */
.section-header { margin-bottom: 56px; max-width: 720px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.125rem; color: var(--muted); }

/* --- Service Grid --- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: all 0.2s ease; display: flex; flex-direction: column; gap: 12px;
}
.service-card:hover { background: var(--neutral); border-color: var(--secondary); }
.service-card .card-eyebrow { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tertiary); }
.service-card h3 { font-size: 1.375rem; }
.service-card p { font-size: 0.9375rem; color: var(--muted); }
.service-card .card-link { margin-top: auto; font-weight: 600; font-size: 0.875rem; color: var(--secondary); display: inline-flex; align-items: center; gap: 6px; }
.service-card .card-link::after { content: '→'; transition: transform 0.15s; }
.service-card:hover .card-link::after { transform: translateX(4px); }

/* --- Checklist Block --- */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 32px; margin: 32px 0; }
.checklist li { font-size: 0.9375rem; color: var(--ink); padding-left: 28px; position: relative; line-height: 1.5; }
.checklist li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--secondary);
  font-weight: 700; font-size: 0.875rem; width: 20px; height: 20px; border: 1.5px solid var(--secondary);
  border-radius: 4px; display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* --- Service Section (sub-page) --- */
.service-section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.service-section:last-child { border-bottom: none; }
.service-section .service-header { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; margin-bottom: 32px; }
.service-section .service-header h3 { font-size: 1.5rem; }
.service-section .service-header p { color: var(--muted); font-size: 1rem; }
.service-section .service-intro { color: var(--muted); margin-bottom: 24px; font-size: 1rem; }

/* --- Dark Section --- */
.dark-section { background: var(--dark-surface); color: var(--dark-text); padding: var(--section-pad) 0; }
.dark-section h2, .dark-section h3 { color: #fff; }
.dark-section .eyebrow { color: var(--tertiary); }
.dark-section p { color: var(--dark-muted); }
.dark-section .btn-primary { background: var(--secondary); }
.dark-section .btn-primary:hover { background: var(--tertiary); }
.dark-card { background: var(--dark-elevated); border: 1px solid var(--dark-border); border-radius: var(--radius-lg); padding: 32px; }
.dark-card h4 { color: #fff; margin-bottom: 8px; }
.dark-card p { color: var(--dark-muted); font-size: 0.9375rem; }

/* --- CTA Section --- */
.cta-band { background: var(--dark-surface); color: #fff; padding: 80px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 16px; }
.cta-band p { color: var(--dark-muted); font-size: 1.125rem; margin: 0 auto 32px; }
.cta-band .btn { margin: 0 8px; }

/* --- Page Hero (sub-pages) --- */
.page-hero { padding: 100px 0 64px; background: var(--neutral); border-bottom: 1px solid var(--border); }
.page-hero .eyebrow { color: var(--tertiary); }
.page-hero h1 { margin-bottom: 20px; max-width: 20ch; }
.page-hero .lead { font-size: 1.25rem; color: var(--muted); max-width: 60ch; margin-bottom: 0; }

/* --- Footer --- */
.footer { background: var(--dark-surface); color: var(--dark-text); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .nav-logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { color: var(--dark-muted); font-size: 0.9375rem; max-width: 32ch; }
.footer-col h5 { color: #fff; font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--dark-muted); font-size: 0.9375rem; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--dark-border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.875rem; color: var(--dark-muted); }

/* --- Mobile Menu --- */
.mobile-menu { display: none; position: fixed; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 24px; z-index: 99; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; font-size: 1.0625rem; color: var(--ink); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn { margin-top: 16px; width: 100%; justify-content: center; }

/* --- Responsive --- */
@media (max-width: 968px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .hero-stats { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .service-section .service-header { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 640px) {
  :root { --section-pad: 48px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .checklist { grid-template-columns: 1fr; }
  .hero-cta-group { flex-direction: column; }
  .hero-cta-group .btn { width: 100%; justify-content: center; }
  .cta-band .btn { display: block; margin: 8px 0; }
}

/* --- Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.text-muted { color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 48px 0; border: none; }