/* =========================================================
   WORKLIFE CONSULTING — SITE STYLESHEET
   Premium dark consulting platform
   Fonts are enqueued via functions.php (worklife-fonts handle).
   ========================================================= */

:root {
  /* Palette */
  --midnight: #071421;
  --slate: #102235;
  --graphite: #1B2733;
  --steel: #2A4E73;
  --accent: #3E8BFF;
  --accent-soft: #5BA0FF;
  --white: #F7F9FC;
  --grey: #B7C2CF;
  --grey-dim: #6E7B8A;
  --line: rgba(183, 194, 207, 0.10);
  --line-strong: rgba(183, 194, 207, 0.20);

  /* Type */
  --head: 'Manrope', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container: 1400px;
  --gutter: 32px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--midnight);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

::selection { background: var(--accent); color: var(--midnight); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
h1, h2, h3, h4, h5, h6 { font-family: var(--head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.eyebrow.no-bar::before { display: none; }
.eyebrow.muted { color: var(--grey); }
.eyebrow.muted::before { background: var(--grey-dim); }

.h-display {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h-1 { font-size: clamp(40px, 4.5vw, 64px); font-weight: 600; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(32px, 3.2vw, 44px); font-weight: 600; letter-spacing: -0.02em; }
.h-3 { font-size: clamp(22px, 1.8vw, 28px); font-weight: 600; }
.h-4 { font-size: 18px; font-weight: 600; }

.lede { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; color: var(--grey); max-width: 60ch; }
.body-text { color: var(--grey); }

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

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

/* =========================================================
   HEADER
   ========================================================= */
.utility-bar {
  background: #050E18;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--grey-dim);
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}
.utility-bar .offices { display: flex; gap: 18px; align-items: center; }
.utility-bar .offices span { display: inline-flex; align-items: center; gap: 6px; }
.utility-bar .offices .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.utility-bar .right { display: flex; gap: 18px; align-items: center; }
.utility-bar a:hover { color: var(--white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 20, 33, 0.0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
  background: rgba(7, 20, 33, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  /* The processed PNG has photo circles on the left + white wordmark on the right.
     No additional filter needed — designed for dark backgrounds. */
}
.brand-logo-footer { height: 52px; }
@media (max-width: 540px) {
  .brand-logo { height: 36px; }
}

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
  padding: 10px 14px;
  position: relative;
  transition: color 0.2s;
}
.nav a:hover { color: var(--white); }
.nav a.active { color: var(--white); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  transition: all 0.2s;
  white-space: nowrap;
}
.header-cta:hover { border-color: var(--accent); background: rgba(62, 139, 255, 0.08); }
.header-cta .arrow { color: var(--accent); }

.menu-toggle { display: none; }

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
  }
  .menu-toggle span {
    width: 16px;
    height: 1px;
    background: var(--white);
    position: relative;
  }
  .menu-toggle span::before, .menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: var(--white);
  }
  .menu-toggle span::before { top: -5px; }
  .menu-toggle span::after { top: 5px; }
  .header-cta .label { display: none; }
  .header-cta { padding: 11px 14px; }
  .utility-bar { display: none; }
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--midnight);
  z-index: 200;
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav .close {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.mobile-nav nav { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }
.mobile-nav nav a {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 600;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav nav a::after {
  content: '→';
  color: var(--accent);
  font-size: 18px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--midnight);
  font-weight: 600;
}
.btn-primary:hover { background: var(--white); transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.04); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding: 4px 0;
  position: relative;
}
.btn-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.btn-link:hover::after { width: 100%; }
.btn-link:hover .arrow { transform: translateX(3px); }
.btn-link .arrow { transition: transform 0.2s; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--midnight);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.05);
  opacity: 0.45;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,20,33,0.4) 0%, rgba(7,20,33,0.85) 70%, var(--midnight) 100%),
    linear-gradient(90deg, rgba(7,20,33,0.92) 0%, rgba(7,20,33,0.5) 60%, rgba(7,20,33,0.2) 100%);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(62,139,255,0.18) 0%, transparent 50%);
  z-index: 1;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(183,194,207,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,194,207,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 2;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 120px 0 80px;
}
.hero h1 {
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin: 28px 0 32px;
}
.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.hero .lede { font-size: clamp(17px, 1.3vw, 20px); max-width: 56ch; margin-bottom: 48px; }
.hero .btn-row { margin-bottom: 80px; }
.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  max-width: 1100px;
}
.hero-strip-item .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.hero-strip-item .label {
  font-size: 14px;
  color: var(--white);
  margin-top: 8px;
  font-weight: 500;
  line-height: 1.3;
}
@media (max-width: 768px) {
  .hero-strip { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* =========================================================
   PAGE HERO (sub-pages)
   ========================================================= */
.page-hero {
  padding: 200px 0 100px;
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 80% 20%, rgba(62,139,255,0.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--slate) 0%, var(--midnight) 100%);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(183,194,207,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,194,207,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero .crumbs {
  font-size: 12px;
  color: var(--grey-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.page-hero .crumbs span { color: var(--white); }
.page-hero h1 {
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  max-width: 18ch;
  margin: 12px 0 28px;
}
.page-hero .h-1 .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.page-hero .lede { max-width: 60ch; }
.page-hero .meta-row {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.page-hero .meta-row > div { font-size: 13px; }
.page-hero .meta-row .k { color: var(--grey-dim); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; margin-bottom: 4px; }
.page-hero .meta-row .v { color: var(--white); font-weight: 500; }

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: var(--graphite);
  border: 1px solid var(--line);
  padding: 32px;
  position: relative;
  transition: all 0.3s;
}
.card:hover { border-color: var(--steel); transform: translateY(-2px); }

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  display: block;
}

/* Division card */
.div-card {
  background: var(--slate);
  border: 1px solid var(--line);
  padding: 36px 32px;
  position: relative;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
}
.div-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(62,139,255,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.div-card:hover { border-color: var(--steel); }
.div-card:hover::before { opacity: 1; }
.div-card .icon {
  width: 44px; height: 44px;
  margin-bottom: 24px;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.div-card h3 { font-size: 22px; font-weight: 600; margin-bottom: 12px; line-height: 1.2; }
.div-card p { color: var(--grey); font-size: 14px; line-height: 1.5; }
.div-card .bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: auto;
  padding-top: 32px;
}
.div-card .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey-dim);
}
.div-card .arrow {
  font-size: 14px;
  color: var(--accent);
  transition: transform 0.2s;
}
.div-card:hover .arrow { transform: translateX(4px); }

/* =========================================================
   ICONS (minimal line)
   ========================================================= */
.icon-svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.25; fill: none; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #050E18;
  border-top: 1px solid var(--line);
  padding: 100px 0 32px;
  margin-top: 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 80px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .lede { margin-top: 24px; font-size: 14px; max-width: 36ch; }
.footer-brand .compliance {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-brand .compliance span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin-bottom: 24px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--grey); transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--grey-dim);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .legal { display: flex; gap: 24px; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

/* =========================================================
   UTILITIES + ANIMATIONS
   ========================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.in { opacity: 1; transform: translateY(0); }

.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  border: 1px solid var(--line-strong);
}
.tag.accent { color: var(--accent); border-color: rgba(62,139,255,0.3); background: rgba(62,139,255,0.06); }

.stat-block {
  border-left: 1px solid var(--line);
  padding: 8px 0 8px 24px;
}
.stat-block .num {
  font-family: var(--head);
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-block .num .small { font-size: 0.5em; color: var(--accent); margin-left: 4px; }
.stat-block .label {
  font-size: 12px;
  color: var(--grey);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 12px;
}

/* Section heading block */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 80px; align-items: end; }
.section-head h2 { max-width: 18ch; }
.section-head p { color: var(--grey); font-size: 16px; max-width: 50ch; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; } }

/* Number column */
.numbered { display: flex; gap: 24px; align-items: flex-start; }
.numbered .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding-top: 6px;
  min-width: 32px;
}
.numbered h3 { font-size: 18px; margin-bottom: 8px; }
.numbered p { color: var(--grey); font-size: 14px; }

/* CTA banner */
.cta-banner {
  background:
    radial-gradient(ellipse at 70% 50%, rgba(62,139,255,0.18) 0%, transparent 60%),
    linear-gradient(135deg, var(--slate) 0%, var(--midnight) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(183,194,207,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,194,207,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}
.cta-banner .container { position: relative; display: grid; grid-template-columns: 2fr 1fr; gap: 64px; align-items: center; }
.cta-banner h2 { font-size: clamp(36px, 4vw, 56px); max-width: 22ch; }
.cta-banner .btn-row { justify-content: flex-end; }
@media (max-width: 900px) {
  .cta-banner .container { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner .btn-row { justify-content: flex-start; }
}

/* =========================================================
   MOBILE OPTIMISATION — responsive polish pass
   Consolidated here so every template is covered from one place.
   `body`-prefixed selectors intentionally raise specificity to
   override the per-template inline <style> base rules, which load
   after this file.
   ========================================================= */
@media (max-width: 768px) {
  /* Sub-page hero — 200px top padding leaves a huge gap on phones */
  .page-hero { padding: 130px 0 64px; }
  .page-hero .crumbs { margin-bottom: 20px; }
  .page-hero .meta-row { gap: 24px 36px; margin-top: 40px; padding-top: 24px; }
  /* Home hero */
  .hero { min-height: auto; }
  .hero-content { padding: 112px 0 64px; }
  .hero h1 { margin: 20px 0 22px; }
  .hero .lede { margin-bottom: 36px; }
  .hero .btn-row { margin-bottom: 48px; }
  .section-head { margin-bottom: 40px; }
}

@media (max-width: 600px) {
  /* Tighter page gutter reclaims ~24px of usable width on phones */
  :root { --gutter: 20px; }

  /* Lower the headline clamp floor so long words never overflow ~320px screens */
  .hero h1,
  .page-hero h1 { font-size: clamp(32px, 8.4vw, 52px); }

  /* Section / banner / footer rhythm */
  .cta-banner { padding: 64px 0; }
  .site-footer { padding: 64px 0 28px; }
  .footer-top { padding-bottom: 48px; }

  /* Oversized desktop card padding → comfortable on phones */
  body .form-card,
  body .featured .body,
  body .case-content,
  body .matrix-detail { padding: 26px 22px; }
  body .download-card { padding: 28px 24px; }
  body .how-step { padding: 32px 24px; min-height: auto; }
  body .timeline-item { min-height: auto; }
  body .pillar,
  body .division-block { padding: 56px 0; }

  /* Grids that still showed two columns on small phones */
  body .pillar .deliverable-list,
  body .division-meta { grid-template-columns: 1fr; }

  /* Global page — region tabs overflowed (no wrap) on phones */
  body .region-tabs { flex-wrap: wrap; }
  body .region-tab {
    flex: 1 1 auto;
    justify-content: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
}
