/* ============================================================
   PROCUREMIND — Main Stylesheet
   Art Direction: Authoritative / Corporate / Precision Tech
   Palette: Deep Navy + Teal accent + warm off-white surfaces
   Fonts: DM Serif Display (headings) + Cabinet Grotesk (UI/body)
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-default: 1140px;
  --content-narrow: 720px;

  /* Fonts */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Cabinet Grotesk', 'DM Sans', system-ui, sans-serif;
}

/* ---- Light Mode Palette ---- */
:root, [data-theme="light"] {
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-surface-2: #f9fafb;
  --color-surface-offset: #edf0f4;
  --color-divider: #dde1e9;
  --color-border: #cdd3df;

  --color-text: #0d1b2e;
  --color-text-muted: #5a6578;
  --color-text-faint: #a0aab8;
  --color-text-inverse: #f5f6f8;

  /* Navy primary */
  --color-primary: #0b2545;
  --color-primary-hover: #0d2e56;
  --color-primary-active: #071a35;

  /* Teal accent */
  --color-accent: #0c8a7e;
  --color-accent-hover: #0a7066;
  --color-accent-light: #e0f4f2;
  --color-accent-mid: #4db8af;

  --shadow-sm: 0 1px 3px rgba(11, 37, 69, 0.08);
  --shadow-md: 0 4px 16px rgba(11, 37, 69, 0.10);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, 0.14);
  --shadow-xl: 0 24px 64px rgba(11, 37, 69, 0.18);
}

/* ---- Dark Mode Palette ---- */
[data-theme="dark"] {
  --color-bg: #090e17;
  --color-surface: #0d1520;
  --color-surface-2: #111b29;
  --color-surface-offset: #0f1a28;
  --color-divider: #1a2740;
  --color-border: #1e3050;

  --color-text: #d8dfe8;
  --color-text-muted: #7a8fa8;
  --color-text-faint: #4a5d72;
  --color-text-inverse: #090e17;

  --color-primary: #2a5fa5;
  --color-primary-hover: #3570bb;
  --color-primary-active: #1e4e8a;

  --color-accent: #1aada0;
  --color-accent-hover: #22c4b5;
  --color-accent-light: #0d2e2c;
  --color-accent-mid: #25b5a8;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #090e17;
    --color-surface: #0d1520;
    --color-surface-2: #111b29;
    --color-surface-offset: #0f1a28;
    --color-divider: #1a2740;
    --color-border: #1e3050;
    --color-text: #d8dfe8;
    --color-text-muted: #7a8fa8;
    --color-text-faint: #4a5d72;
    --color-text-inverse: #090e17;
    --color-primary: #2a5fa5;
    --color-primary-hover: #3570bb;
    --color-primary-active: #1e4e8a;
    --color-accent: #1aada0;
    --color-accent-hover: #22c4b5;
    --color-accent-light: #0d2e2c;
    --color-accent-mid: #25b5a8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --shadow-xl: 0 24px 64px rgba(0,0,0,.6);
  }
}

/* ---- Base Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; }
ul[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--color-accent) 25%, transparent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
  position: relative;
}

/* ---- HEADER ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition), background 0.3s ease;
}
.header--scrolled { box-shadow: var(--shadow-md); }
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 68px;
}
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--color-text);
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.85; }
.logo-svg { height: 32px; width: auto; overflow: visible; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin-left: auto;
}
.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--color-text); background: var(--color-surface-offset); }
.nav-cta {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-inverse);
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: var(--color-accent-hover); transform: translateY(-1px); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-offset); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {

  /* ── Header bar: fully solid navy on mobile ── */
  .header {
    background: #0b2545;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: rgba(255,255,255,0.12);
  }
  .logo { color: #ffffff; }
  .nav-toggle { display: flex; }
  .nav-toggle span { background: #ffffff; }
  .theme-toggle {
    order: 3;
    border-color: rgba(255,255,255,0.25);
    color: #ffffff;
  }

  /* ── Full-screen slide-in drawer ── */
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: #0b2545;
    display: flex;
    flex-direction: column;
    align-items: stretch;        /* children fill full width */
    padding: var(--space-6) var(--space-6) var(--space-8);
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    border-top: 2px solid var(--color-accent);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }

  /* ── list items: stretch to full width ── */
  .nav-links li {
    display: block;
    width: 100%;
  }

  /* ── Regular nav links ── */
  .nav-links .nav-link {
    display: block;
    width: 100%;
    font-size: 1.125rem;          /* 18px — large, touch-friendly */
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    padding: var(--space-4) var(--space-2);
    border-bottom: 1px solid rgba(255,255,255,0.09);
    border-radius: 0;
    background: transparent;
    transition: color 0.18s, padding-left 0.18s;
    letter-spacing: 0.01em;
  }
  .nav-links .nav-link:hover,
  .nav-links .nav-link:focus {
    color: var(--color-accent);
    padding-left: var(--space-3); /* subtle indent on hover */
    background: transparent;
  }

  /* ── CTA: full-width teal button, clearly separated ── */
  .nav-links li:last-child {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .nav-links .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: var(--space-4) var(--space-6);
    background: var(--color-accent);
    color: #ffffff;
    border-radius: var(--radius-full);
    border: none;
    box-shadow: 0 4px 16px rgba(12,138,126,0.35);
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  }
  .nav-links .nav-cta:hover,
  .nav-links .nav-cta:focus {
    background: #0a7a6f;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(12,138,126,0.45);
    color: #ffffff;
  }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-accent) 40%, transparent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-accent) 40%, transparent);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-light); }
.btn-full { width: 100%; }

/* ---- SECTION HEADER ---- */
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.1;
}
.section-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
}
.section-header {
  margin-bottom: clamp(var(--space-10), 4vw, var(--space-16));
}
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
[data-theme="dark"] .hero { background: #07101c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero { background: #07101c; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70vw;
  height: 70vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--color-accent) 20%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(var(--space-20), 10vw, var(--space-32));
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-mid);
  margin-bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-mid);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 1.0;
  color: #ffffff;
  margin-bottom: var(--space-6);
}
.hero-heading em {
  font-style: italic;
  color: var(--color-accent-mid);
}

.hero-sub {
  font-size: var(--text-lg);
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  max-width: 56ch;
  margin-bottom: var(--space-10);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-16);
}
.hero-actions .btn-ghost {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
}
.hero-actions .btn-ghost:hover { border-color: var(--color-accent-mid); color: var(--color-accent-mid); background: rgba(255,255,255,0.06); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: var(--space-1); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 0.5rem + 2.5vw, 2.75rem);
  font-weight: 400;
  color: #ffffff;
  line-height: 1;
}
.stat-plus { color: var(--color-accent-mid); font-size: 0.7em; }
.stat-label { font-size: var(--text-xs); color: rgba(255,255,255,0.5); font-weight: 500; letter-spacing: 0.04em; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); flex-shrink: 0; }

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: float 2.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ---- CLIENTS STRIP ---- */
.clients-strip {
  padding-block: var(--space-8);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}
.clients-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  text-align: center;
}
.clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.client-name {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.client-sep { color: var(--color-divider); font-size: 1.2em; }

/* ---- SERVICES ---- */
.services { background: var(--color-bg); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-accent);
}
/* featured card — matches all other tiles, no special treatment */
.service-card--featured {
  background: var(--color-surface);
  border-color: var(--color-divider);
  color: inherit;
}

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}
.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-5);
}
.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.service-features li {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  padding-left: var(--space-4);
  position: relative;
}
.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.service-card--featured .service-features li::before { background: var(--color-accent-mid); }

/* ---- EXPERTISE ---- */
.expertise {
  background: var(--color-surface-2);
  overflow: hidden;
}
.expertise-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, color-mix(in srgb, var(--color-accent) 6%, transparent), transparent);
  pointer-events: none;
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
}
@media (max-width: 1024px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .expertise-grid { grid-template-columns: 1fr; }
}

.expertise-item {
  padding: var(--space-8);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.expertise-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.expertise-item:hover::before { transform: scaleX(1); }
.expertise-item:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); }

.expertise-num {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.expertise-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.expertise-item p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- ABOUT ---- */
.about { background: var(--color-bg); }
.about-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(var(--space-10), 5vw, var(--space-20));
  align-items: start;
}
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
}

.about-portrait { position: sticky; top: 100px; }
.portrait-frame {
  width: 100%;
  aspect-ratio: 1;
  max-width: 280px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 70%, var(--color-accent)) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.portrait-frame::before {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 30%, transparent), transparent 60%);
}
.portrait-initials {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  color: rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
}

.about-credentials {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.credential {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
}
.credential-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.credential-logo.ibm { background: #1f3a8a; color: #fff; }
.credential-logo.pactum { background: color-mix(in srgb, var(--color-accent) 15%, var(--color-bg)); color: var(--color-accent); border: 1px solid var(--color-accent); }
.credential-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.about-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.7;
}
.about-content .section-title { margin-bottom: var(--space-6); }

.about-timeline {
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-6);
}
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-6) - 5px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
}
.timeline-year {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  padding-top: 2px;
  white-space: nowrap;
}
.timeline-item div { display: flex; flex-direction: column; gap: var(--space-1); }
.timeline-item strong { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.timeline-item span { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- RESULTS ---- */
.results { background: var(--color-primary); color: #fff; }
[data-theme="dark"] .results { background: #07101c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .results { background: #07101c; }
}
.results .section-label { color: var(--color-accent-mid); }
.results .section-title { color: #ffffff; }
.results .section-sub { color: rgba(255,255,255,0.65); max-width: 50ch; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
@media (max-width: 900px) {
  .results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .results-grid { grid-template-columns: 1fr; }
}

.result-card {
  padding: var(--space-8);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  transition: background var(--transition), border-color var(--transition);
}
.result-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.result-card--large { background: color-mix(in srgb, var(--color-accent) 20%, transparent); border-color: color-mix(in srgb, var(--color-accent) 40%, transparent); }
.result-metric {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: #ffffff;
  margin-bottom: var(--space-3);
  line-height: 1;
}
.result-card--large .result-metric { color: var(--color-accent-mid); }
.result-desc { font-size: var(--text-sm); color: rgba(255,255,255,0.65); line-height: 1.5; }

.cases-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .cases-row { grid-template-columns: 1fr; }
}

.case-card {
  padding: var(--space-8);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  transition: background var(--transition);
}
.case-card:hover { background: rgba(255,255,255,0.07); }
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.case-client { font-size: var(--text-sm); font-weight: 700; color: #fff; }
.case-scope { font-size: var(--text-xs); color: rgba(255,255,255,0.45); }
.case-saving {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent-mid);
  margin-bottom: var(--space-3);
}
.case-saving span { font-family: var(--font-body); font-size: var(--text-sm); color: rgba(255,255,255,0.4); }
.case-card p { font-size: var(--text-sm); color: rgba(255,255,255,0.6); line-height: 1.55; }

/* ---- HOW WE WORK ---- */
.how { background: var(--color-surface-2); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 1024px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .how-grid { grid-template-columns: 1fr; }
}

.how-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.how-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.how-step {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.how-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.how-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; }

/* ---- CONTACT ---- */
.contact { background: var(--color-bg); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: start;
}
@media (max-width: 860px) {
  .contact-inner { grid-template-columns: 1fr; }
}

.contact-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  line-height: 1.65;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
a.contact-item:hover { color: var(--color-accent); }
.contact-item svg { color: var(--color-accent); flex-shrink: 0; }
.contact-location { cursor: default; }

/* Contact Form */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.form-group label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-text-faint); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}
.form-note {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}
.form-success {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  margin-top: var(--space-4);
}
.form-success svg { color: var(--color-accent); flex-shrink: 0; }

/* ---- FOOTER ---- */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding-top: clamp(var(--space-12), 6vw, var(--space-24));
}
[data-theme="dark"] .footer { background: #07101c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .footer { background: #07101c; }
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-16);
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

.footer-brand .logo-svg { height: 28px; margin-bottom: var(--space-4); }
.footer-brand .logo { color: #ffffff; }
.footer-brand .logo tspan { fill: var(--color-accent); }
.footer-brand p { font-size: var(--text-sm); color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: var(--space-2); }
.footer-domain { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; color: var(--color-accent-mid) !important; }
.footer-nav { display: contents; }
.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-col a:hover { color: #ffffff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: var(--space-6);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.footer-bottom p { font-size: var(--text-xs); color: rgba(255,255,255,0.3); }

/* ---- SCROLL ANIMATIONS ---- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.08s; }
.fade-up-delay-2 { transition-delay: 0.14s; }
.fade-up-delay-3 { transition-delay: 0.2s; }
/* On mobile, cut all animation delays so items appear immediately */
@media (max-width: 640px) {
  .fade-up-delay-1,
  .fade-up-delay-2,
  .fade-up-delay-3 { transition-delay: 0s; }
}

/* ---- Active Nav State ---- */
.nav-link.active { color: var(--color-text); background: var(--color-surface-offset); }

/* ---- SECTOR PILLS (credibility strip) ---- */
.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}
.sector-pill svg { color: var(--color-accent); flex-shrink: 0; }
.sector-pill:hover { color: var(--color-accent); border-color: var(--color-accent); background: var(--color-accent-light); }
.clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---- CASE TAGS ---- */
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.case-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {

  /* ---- Global spacing ---- */
  .container { padding: 0 var(--space-5); }
  .section { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
  .section-header { margin-bottom: var(--space-8); }

  /* ---- Hero ---- */
  .hero { min-height: 85vh; }
  .hero-inner { padding-block: var(--space-16) var(--space-12); }
  .hero-heading { font-size: clamp(2.4rem, 10vw, 3.5rem); line-height: 1.05; margin-bottom: var(--space-5); }
  .hero-sub { font-size: var(--text-base); margin-bottom: var(--space-8); }
  .hero-actions { flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-10); }
  .hero-actions .btn { width: 100%; justify-content: center; }
  /* Stats: 2×2 grid instead of a single row */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5) var(--space-4);
  }
  .stat-divider { display: none; }
  .stat-num { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .hero-scroll-hint { display: none; }

  /* ---- Services ---- */
  .services-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .service-card { padding: var(--space-6); }
  .service-icon { width: 36px; height: 36px; margin-bottom: var(--space-4); }

  /* ---- Expertise ---- */
  .expertise-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .expertise-item { padding: var(--space-5); }

  /* ---- About ---- */
  .about-portrait { position: static; text-align: center; }
  .portrait-frame { margin: 0 auto var(--space-6); max-width: 200px; }

  /* ---- Timeline ---- */
  .timeline-item { grid-template-columns: 60px 1fr; gap: var(--space-3); }

  /* ---- Results / Track Record ---- */
  .results-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .result-card { padding: var(--space-5); }
  .result-metric { font-size: var(--text-xl); }
  .cases-row { grid-template-columns: 1fr; gap: var(--space-4); }
  .case-card { padding: var(--space-6); }

  /* ---- Engagement models ---- */
  .how-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .how-card { padding: var(--space-6); }

  /* ---- Contact ---- */
  .contact-form { padding: var(--space-6); }

  /* ---- Footer ---- */
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: span 1; }
  .footer-bottom .container { flex-direction: column; text-align: center; }

  /* ---- Sector pills ---- */
  .sector-pill { font-size: 0.7rem; padding: var(--space-1) var(--space-3); }
  .clients-row { gap: var(--space-2); }
}

/* ---- Medium breakpoint tweaks (641–900px) ---- */
@media (min-width: 641px) and (max-width: 900px) {
  .hero-stats { flex-wrap: wrap; gap: var(--space-5) var(--space-6); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form { padding: var(--space-8); }
}

/* ============================================================ */

/* ---- CASE SAVING — updated style for text-only saving line ---- */
.case-saving {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent-mid);
  margin-bottom: var(--space-3);
  line-height: 1.1;
}
