/* ===========================================================
   Okonkwo Advisory — Operations Consulting
   Digilife Software · PROFESSIONAL package demo ($950)
   5 pages + booking flow. No external fonts or images.
   =========================================================== */

:root {
  --bg: var(--color-bg);
  --bg-alt: var(--color-bg-alt);
  --bg-deep: var(--color-inverse);
  --ink: var(--color-text);
  --muted: var(--color-text-muted);
  --accent: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-soft: var(--color-primary-soft);
  --copper: var(--color-tertiary);
  --border: var(--color-border);
  --radius: 8px;
  --maxw: 1120px;
  --font: var(--font-body);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
}
h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}
h3 {
  font-size: 1.15rem;
}
p {
  margin: 0 0 1.05em;
}
a {
  color: var(--accent);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
}
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.section--deep {
  background: #17191c;
  background: var(--color-inverse, #17191c);
  color: #e9e7e2;
  color: var(--color-text-inverse, #e9e7e2);
}
.section--deep h2 {
  color: #fff;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 12px;
}
.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 64ch;
}
.section--deep .lede {
  color: #a9b6c9;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

/* ---------- Ribbon ---------- */
.ribbon {
  background: var(--copper);
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  padding: 9px 16px;
}
.ribbon a {
  color: #fff;
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--light {
  background: #fff;
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 68px;
}
.hero--sub {
  padding: 60px 0 44px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 54px;
  align-items: center;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.figure-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.figure-title {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 700;
}
.bar-row {
  margin-bottom: 18px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.bar-label span:last-child {
  font-weight: 700;
  color: var(--accent);
}
.bar-track {
  height: 8px;
  background: #dfe6ee;
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

/* ---------- Logos strip ---------- */
.logos {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 24px 0;
}
.logos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 42px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 42px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.section--alt .card {
  background: #fff;
}
.card p {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}
.card-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* ---------- Stats ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.stat {
  text-align: center;
  padding: 22px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.86rem;
  color: #a9b6c9;
}

/* ---------- Case study ---------- */
.case {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 24px;
}
.case-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
}
.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.metric-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.metric-label {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- Booking ---------- */
.booking {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-top: 36px;
}
.slot-group {
  margin-bottom: 22px;
}
.slot-day {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.slot {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.slot:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.slot[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.booking-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ---------- Lists ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 0.98rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
}
.cta-band .btn {
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-foot {
  background: #17191c;
  background: var(--color-inverse, #17191c);
  color: #e9e7e2;
  color: var(--color-text-inverse, #e9e7e2);
  padding: 48px 0 28px;
  font-size: 0.93rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.site-foot h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-foot li {
  margin-bottom: 9px;
}
.site-foot a {
  color: #a9b6c9;
  text-decoration: none;
}
.site-foot a:hover {
  color: #fff;
}
.foot-legal {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.83rem;
  color: #7d8a9c;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid,
  .booking,
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .grid-3,
  .grid-2,
  .case-metrics {
    grid-template-columns: 1fr;
  }
  .stat-band {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
  .section {
    padding: 60px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* ============================================================
   Motion support — added with the motion system
   ============================================================ */

.hero,
.hero--sub,
.section--deep {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero > .wrap,
.hero--sub > .wrap {
  position: relative;
  z-index: 1;
}

/* Image slot keeps the gradient as a fallback until a photo is added */
.portrait.media img,
.media img {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.portrait .portrait-initials {
  position: relative;
  z-index: 0;
}

/* Cards sit above hero decoration */
.card,
.post,
.case,
.stat,
.quote,
.figure-panel {
  position: relative;
  z-index: 1;
}

/* Signature: perspective grid + data panel that builds on scroll */
.figure-panel {
  background: linear-gradient(160deg, #ffffff 0%, #eef2f7 100%);
  box-shadow: 0 26px 60px -34px rgba(16, 25, 42, 0.42);
}
.bar-track { position: relative; }
.bar-fill {
  background: linear-gradient(90deg, var(--accent) 0%, #3d7ab5 100%);
  position: relative;
}
.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: translateX(-100%);
}
.m-bar-in::after { animation: bar-sheen 1.5s ease 0.5s; }
@keyframes bar-sheen { to { transform: translateX(200%); } }

.brand-mark { transition: transform 0.5s cubic-bezier(0.22,1,0.36,1); }
.brand:hover .brand-mark { transform: rotate(-90deg); }

.slot { transition: transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease; }
.slot:hover { transform: translateY(-2px); }

.case-tag { transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); }
.card:hover .case-tag { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .m-bar-in::after { animation: none; }
}


/* ---------- Theme-aware surfaces (was hardcoded white) ---------- */
.card,
.stat,
.quote,
.post,
.case,
.field input,
.field select,
.field textarea,
.slot,
.section--alt .card {
  background: var(--color-surface);
  color: var(--color-text);
}
.figure-panel {
  background: var(--color-surface-2);
}
.btn--primary {
  color: var(--color-on-primary);
}
.btn--light {
  background: var(--color-surface);
}
.site-head {
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
}
.bar-track {
  background: var(--color-border);
}
.portrait,
.media {
  border-color: var(--color-border);
}


/* ---------- Decorative surfaces follow the active theme ---------- */
.portrait {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg-alt)) 0%,
      color-mix(in srgb, var(--color-primary) 30%, var(--color-bg-alt)) 55%,
      color-mix(in srgb, var(--color-primary) 46%, var(--color-bg-alt)) 100%);
}
.portrait-initials {
  color: color-mix(in srgb, var(--color-primary) 70%, var(--color-text));
}
.magnet-cover {
  background: linear-gradient(150deg,
    var(--brand-primary) 0%,
    color-mix(in srgb, var(--brand-primary) 62%, black) 100%);
  color: color-mix(in srgb, var(--color-tertiary) 32%, white);
}
.magnet-cover .kicker { color: var(--brand-tertiary); }
.magnet-cover .byline { color: color-mix(in srgb, var(--brand-tertiary) 55%, white); }

.card:hover .card-icon {
  background: color-mix(in srgb, var(--color-primary) 22%, var(--color-surface));
}
.card-icon svg { stroke: var(--color-primary); }

.ribbon a,
.site-foot a:hover { color: var(--color-tertiary); }
.brand span,
.brand em { color: var(--color-primary); }

/* Always-dark bands keep readable text in either mode */
.section--deep h2,
.section--deep h3,
.site-foot h4 { color: #fff; }

/* ---------- Portrait (added for the About page) ---------- */
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg-alt)) 0%,
      color-mix(in srgb, var(--color-primary) 32%, var(--color-bg-alt)) 55%,
      color-mix(in srgb, var(--color-primary) 48%, var(--color-bg-alt)) 100%);
}
.portrait-initials {
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--color-primary) 70%, var(--color-text));
  opacity: 0.5;
}

/* Stats live on the always-dark band — keep them transparent */
.section--deep .stat,
.stat-band .stat {
  background: transparent;
  border-color: color-mix(in srgb, var(--color-text-inverse) 22%, transparent);
}

/* Form controls need a 3:1 boundary under WCAG 1.4.11 */
.field input,
.field select,
.field textarea,
.form-inline input,
.slot {
  border-color: var(--color-border-strong);
}

/* ============================================================
   FIX — always-dark bands (ribbon / footer / deep sections)
   ------------------------------------------------------------
   These bands must stay dark in BOTH themes. Deriving them from
   --ink was the bug: --ink maps to --color-text, which flips to
   near-white in dark mode, leaving light text on a light band.
   --color-inverse is dark in both modes; --color-text-inverse is
   light in both. Verified by _shared/tools/check-contrast.py.
   ============================================================ */
.ribbon,
.site-foot,
.section--deep {
  background: #17191c;
  background: var(--color-inverse, #17191c);
  color: #e9e7e2;
  color: var(--color-text-inverse, #e9e7e2);
}
.ribbon strong,
.site-foot strong,
.section--deep h2,
.section--deep h3,
.site-foot h4 {
  color: #ffffff;
}
.section--deep .lede,
.site-foot p,
.site-foot li,
.site-foot a,
.stat-band .stat-label {
  color: color-mix(in srgb, var(--color-text-inverse) 82%, var(--color-inverse));
}
.foot-legal {
  color: color-mix(in srgb, var(--color-text-inverse) 62%, var(--color-inverse));
}
.stat-band .stat-num {
  color: #ffffff;
}
.section--deep .stat,
.stat-band .stat {
  background: transparent;
  border-color: color-mix(in srgb, var(--color-text-inverse) 24%, transparent);
}
.ribbon a,
.site-foot a:hover {
  color: var(--color-tertiary);
}
.skip {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
