/* ============================================================
   Expert Core Network — Design Tokens
   Bold technical · grid motifs · electric accents
   ============================================================ */

/* Self-hosted fonts (subset: Latin only, eliminates Google Fonts request). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexMono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexMono-500.woff2') format('woff2'); }

:root {
  /* Core neutrals — deep navy / charcoal */
  --ink-950: #050912;
  --ink-900: #0A1020;
  --ink-850: #0E1628;
  --ink-800: #131C32;
  --ink-700: #1B2540;
  --ink-600: #28324D;
  --ink-500: #3A4564;
  --ink-400: #5C6783;
  --ink-300: #8A93AE;
  --ink-200: #B6BCD0;
  --ink-100: #D9DCE6;
  --ink-50:  #F2F4F9;
  --ink-0:   #FFFFFF;

  /* Electric accent — primary */
  --elec-50:  #EAF2FF;
  --elec-100: #CCDEFF;
  --elec-200: #9DBFFE;
  --elec-300: #6FA0FE;
  --elec-400: #4582FA;
  --elec-500: #1E63F4;
  --elec-600: #0F4FD9;
  --elec-700: #0A3FAE;
  --elec-glow: 30, 99, 244;

  /* Cyan — secondary / data */
  --cyan-400: #22D3EE;
  --cyan-500: #06B6D4;
  --cyan-glow: 34, 211, 238;

  /* Health / status */
  --green-400: #34D399;
  --green-500: #10B981;
  --amber-400: #FBBF24;
  --red-400:   #F87171;

  /* Surfaces */
  --surface-0:  var(--ink-950);
  --surface-1:  var(--ink-900);
  --surface-2:  var(--ink-850);
  --surface-3:  var(--ink-800);
  --surface-line: rgba(255,255,255,0.08);
  --surface-line-strong: rgba(255,255,255,0.14);

  /* Light surfaces (for alternating sections) */
  --light-0: #FFFFFF;
  --light-1: #F7F8FB;
  --light-2: #EEF1F7;
  --light-line: rgba(10,16,32,0.08);
  --light-line-strong: rgba(10,16,32,0.14);

  /* Text on dark */
  --text-d-1: #F2F4F9;
  --text-d-2: #B6BCD0;
  --text-d-3: #8A93AE;

  /* Text on light */
  --text-l-1: #0A1020;
  --text-l-2: #3A4564;
  --text-l-3: #5C6783;

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* Radii */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;
  --r-5: 20px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 0 1px rgba(var(--elec-glow), 0.4), 0 8px 32px rgba(var(--elec-glow), 0.25);

  /* Layout */
  --container: 1280px;
  --container-narrow: 1080px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

/* Skip link for keyboard / screen-reader users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 16px;
  background: var(--ink-900);
  color: var(--text-d-1);
  border: 1px solid var(--surface-line-strong);
  border-radius: 6px;
  z-index: 1000;
  font-size: 14px;
  font-weight: 500;
}
.skip-link:focus { left: 8px; outline: 2px solid var(--elec-400); outline-offset: 2px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-950);
  color: var(--text-d-1);
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

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

::selection { background: rgba(var(--elec-glow), 0.4); color: white; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   Type scale
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--elec-400);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--elec-400);
  box-shadow: 0 0 0 3px rgba(var(--elec-glow), 0.2);
}
.eyebrow.on-light { color: var(--elec-600); }
.eyebrow.on-light::before { background: var(--elec-600); box-shadow: 0 0 0 3px rgba(15,79,217, 0.15); }

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
h4 { font-size: 16px; line-height: 1.3; }

p { margin: 0; text-wrap: pretty; }

.lede { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--text-d-2); }
.lede.on-light { color: var(--text-l-2); }

.mono { font-family: var(--font-mono); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-2);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  position: relative;
}
.btn-primary {
  background: var(--elec-500);
  color: white;
  border-color: var(--elec-500);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 8px 24px rgba(var(--elec-glow), 0.3);
}
.btn-primary:hover {
  background: var(--elec-400);
  border-color: var(--elec-400);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 12px 32px rgba(var(--elec-glow), 0.4);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-d-1);
  border-color: var(--surface-line-strong);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.04);
}
.btn-ghost.on-light {
  color: var(--text-l-1);
  border-color: var(--light-line-strong);
}
.btn-ghost.on-light:hover {
  background: var(--light-2);
  border-color: var(--text-l-2);
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--r-2); }

.btn .arr {
  width: 14px; height: 14px;
  transition: transform .2s ease;
}
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   Section atoms
   ============================================================ */
section { position: relative; }

.section-pad { padding: clamp(64px, 8vw, 120px) 0; }
.section-pad-sm { padding: clamp(48px, 5vw, 80px) 0; }

.section-dark { background: var(--ink-950); color: var(--text-d-1); }
.section-darker { background: #030610; color: var(--text-d-1); }
.section-light { background: var(--light-0); color: var(--text-l-1); }
.section-light-2 { background: var(--light-1); color: var(--text-l-1); }

/* Grid background - signature element */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
}
.grid-bg.on-light {
  background-image:
    linear-gradient(rgba(10,16,32,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,16,32,0.05) 1px, transparent 1px);
}

/* Card */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--surface-line);
  border-radius: var(--r-3);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.card:hover {
  border-color: var(--surface-line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.card.on-light {
  background: var(--light-0);
  border: 1px solid var(--light-line);
  box-shadow: 0 1px 2px rgba(10,16,32,0.04);
}
.card.on-light:hover {
  border-color: var(--light-line-strong);
  box-shadow: 0 4px 16px rgba(10,16,32,0.06);
}

/* Pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--surface-line);
  color: var(--text-d-2);
}
.chip.live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--green-400);
  box-shadow: 0 0 8px var(--green-400);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hairline divider */
.hr {
  height: 1px;
  background: var(--surface-line);
  border: none;
  margin: 0;
}
.hr.on-light { background: var(--light-line); }

/* Scrolling strip helpers */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(0.2, 0.8, 0.2, 1), transform .7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* Section header pattern */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  margin-bottom: 56px;
}
.section-head .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  max-width: none;
}

/* Tag prefixes used throughout */
.tag-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-d-3);
  text-transform: uppercase;
}
.tag-num.on-light { color: var(--text-l-3); }

/* Utility grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(36px, 9vw, 48px); }
}

/* ============================================================
   Shared inner-page hero (used by every non-home page)
   ============================================================ */
.page-hero { padding: 64px 0 48px; position: relative; overflow: hidden; }
.page-hero .hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1200px; height: 1200px;
  background: radial-gradient(circle, rgba(30,99,244,0.16) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero-inner { position: relative; }
.page-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-d-3); margin-bottom: 24px; flex-wrap: wrap;
}
.page-breadcrumb a { color: var(--text-d-3); }
.page-breadcrumb a:hover { color: white; }
.page-breadcrumb svg { color: var(--text-d-3); }
.page-hero h1 { font-size: clamp(36px, 4vw, 56px); margin-top: 12px; max-width: 880px; }
.page-hero-stats {
  display: flex; align-items: center; gap: 28px;
  margin-top: 36px; padding-top: 28px;
  border-top: 1px solid var(--surface-line);
  flex-wrap: wrap;
}
.page-hero-stats > div { display: flex; flex-direction: column; gap: 4px; }
.page-hero-stats .meta-num { font-size: 28px; font-weight: 600; color: white; letter-spacing: -0.03em; line-height: 1; }
.page-hero-stats .meta-num span { font-size: 14px; color: var(--text-d-3); margin-left: 2px; font-weight: 500; }
.page-hero-stats .meta-lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-d-3); }

/* ============================================================
   Related pages cross-link block (SEO internal linking)
   ============================================================ */
.related-block {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: flex-start;
}
@media (max-width: 900px) { .related-block { grid-template-columns: 1fr; gap: 24px; } }
.related-block h2 { font-size: 32px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--surface-line); border: 1px solid var(--surface-line); border-radius: var(--r-3); overflow: hidden; }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  background: var(--ink-900);
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .2s ease;
}
.related-card:hover { background: var(--ink-850); }
.related-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--elec-400); text-transform: uppercase; }
.related-card h3 { color: white; font-size: 18px; letter-spacing: -0.01em; font-weight: 500; }
.related-card p { color: var(--text-d-3); font-size: 13.5px; line-height: 1.5; }
.related-card .related-link { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--elec-300); font-size: 13px; }
.related-card:hover .related-link { color: var(--elec-200); }

/* ============================================================
   Detail page layout (services, industries, partners, solutions, locations)
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  align-items: flex-start;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; gap: 32px; } }
.detail-main { display: flex; flex-direction: column; }
.detail-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.detail-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text-l-2); line-height: 1.55; padding: 12px 14px; background: var(--light-1); border: 1px solid var(--light-line); border-radius: var(--r-2); }
.detail-list svg { color: var(--green-500); flex-shrink: 0; margin-top: 3px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.detail-tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; background: white; border: 1px solid var(--light-line); border-radius: 999px; font-size: 13px; color: var(--text-l-1); transition: border-color .2s ease, color .2s ease; }
.detail-tag:hover { border-color: var(--elec-500); color: var(--elec-700); }
.detail-tag svg { color: var(--text-l-3); }
.detail-tag:hover svg { color: var(--elec-600); }
.detail-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
@media (max-width: 900px) { .detail-aside { position: static; } }
.aside-card { background: white; border: 1px solid var(--light-line); border-radius: var(--r-3); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.aside-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--ink-900); color: white; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.aside-card h3 { color: var(--text-l-1); font-size: 17px; font-weight: 500; }
.aside-card dl { margin: 0; padding: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--light-line); }
.aside-card dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.aside-card dl dt { color: var(--text-l-3); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.aside-card dl dd { margin: 0; color: var(--text-l-1); font-weight: 500; text-align: right; }
.aside-links { list-style: none; padding: 8px 0 0; margin: 0; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--light-line); }
.aside-links li a { display: block; padding: 6px 0; font-size: 13.5px; color: var(--text-l-1); }
.aside-links li a:hover { color: var(--elec-700); }

/* Generic "related tile" used across detail pages */
.related-tile { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: white; border: 1px solid var(--light-line); border-radius: var(--r-3); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.related-tile:hover { border-color: var(--elec-500); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,16,32,0.06); }
.related-tile h3 { color: var(--text-l-1); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.related-tile p { color: var(--text-l-2); font-size: 13.5px; line-height: 1.5; }
.related-tile-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--ink-900); color: white; display: flex; align-items: center; justify-content: center; }
.related-tile-link { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--elec-700); font-size: 13px; font-weight: 500; }
.related-tile.dark { background: var(--ink-900); border-color: var(--surface-line); }
.related-tile.dark:hover { border-color: var(--elec-500); background: var(--ink-850); }
.related-tile.dark h3 { color: white; }
.related-tile.dark p { color: var(--text-d-2); }
.related-tile.dark .related-tile-link { color: var(--elec-300); }
.related-tile-tag { font-size: 10.5px; letter-spacing: 0.14em; color: var(--elec-400); }

/* ============================================================
   Inline body link (used in SEO body copy)
   ============================================================ */
.body-link { color: var(--elec-300); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.body-link:hover { color: var(--elec-200); }
.body-link.on-light { color: var(--elec-600); }
.body-link.on-light:hover { color: var(--elec-700); }
