/* ============================================================
   CKM × yewho-motion — integration override layer
   Load AFTER style.css and motion.css.
   Keeps the approved navy/gold design pixel-identical while
   retuning the motion engine's brand accent (red → gold) and
   neutralising the few tokens motion.css would otherwise clobber.
   ============================================================ */

/* 0 · Guard against phantom page width from marquees / aurora blobs */
html{ overflow-x:clip; }

/* 1 · Restore CKM brand tokens that motion.css :root overrides */
:root{
  --ink:#1A2433;              /* motion.css sets #111823 — restore CKM ink */
  --maxw:1200px;              /* same value, re-assert for safety */
}

/* 2 · Reading-progress bar → CKM gold (yewho #pg replaces CKM's own bar) */
#pg{
  height:3px;
  background:linear-gradient(90deg, var(--gold-500), var(--gold-300));
}

/* 3 · Card spotlight + border-beam → gold instead of red */
.card::after{
  background:radial-gradient(340px circle at var(--mx,50%) var(--my,50%),
             rgba(201,162,39,.10), transparent 65%);
}
.card::before{
  background:conic-gradient(from var(--bb), transparent 0 82%,
             rgba(201,162,39,.85) 93%, transparent 100%);
}
/* dark cards get a slightly warmer spotlight so it reads on navy */
.card-dark::after, .industry-tile::after{
  background:radial-gradient(340px circle at var(--mx,50%) var(--my,50%),
             rgba(227,199,102,.14), transparent 65%);
}

/* 4a · Positioned containers so aurora can be clipped inside dark sections */
.bg-navy, .cta-band, .page-hero{ position:relative; overflow:hidden; }
.bg-navy > .container, .page-hero > .container{ position:relative; z-index:2; }
.cta-band > *{ position:relative; z-index:2; }
.cta-band > .aur{ z-index:0; }

/* 4 · Aurora blobs → CKM navy + gold, and only drift at full motion tier */
.aur i:first-child{ background:radial-gradient(circle, #16345f 0%, transparent 62%); }
.aur i:last-child { background:radial-gradient(circle, rgba(201,162,39,.16) 0%, transparent 62%); }
[data-motion="full"] .aur i{ /* animation already defined in motion.css; keep it full-tier only */ }
[data-motion="lite"] .aur i,
[data-motion="off"]  .aur i{ animation:none !important; }

/* 5 · Liquid-fill flood colour per button (motion.css leaves --fill transparent) */
.btn-gold{ --fill:rgba(255,255,255,.28); }
.btn-navy{ --fill:rgba(255,255,255,.14); }
.btn-outline,.btn-outline-light{ --fill:rgba(201,162,39,.18); }

/* 6 · Keep CTAs their approved intrinsic width on small mobile
      (motion.css forces .btn{width:100%} < 560px) */
@media (max-width:560px){
  .btn{ width:auto; }
}

/* 7 · Infinite marquee (trust bar) — CKM credential chips.
   Normal motion: single-line seamless scroll (content duplicated ×2 → -50%).
   Reduced motion: static, centred, wrapped — every credential stays visible. */
.mq-track{ align-items:center; width:max-content; flex-wrap:nowrap; animation:mqScroll 40s linear infinite; }
.mq:hover .mq-track{ animation-play-state:paused; }
.mq-track span{
  display:inline-flex; align-items:center; gap:.55rem;
  font-family:var(--font-body); font-weight:600; font-size:.8rem;
  letter-spacing:.1em; text-transform:uppercase; color:var(--grey-600);
  background:var(--navy-050); border:1px solid var(--navy-100); border-radius:999px;
  padding:.5rem 1.1rem; margin-right:.85rem; white-space:nowrap;
}
.mq-track span::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--gold-500); flex:none; }
@keyframes mqScroll{ to{ transform:translateX(-50%); } }
@media (prefers-reduced-motion: reduce){
  .mq-row{ -webkit-mask-image:none; mask-image:none; }
  .mq-track{ animation:none; width:auto; flex-wrap:wrap; justify-content:center; row-gap:.6rem; }
}
@media (max-width:560px){
  .mq-row{ -webkit-mask-image:none; mask-image:none; }
  .mq-track{ animation:none; width:auto; flex-wrap:wrap; justify-content:center; row-gap:.6rem; }
}

/* 8 · Service-card checklist → persistent gold check badge (replaces the dash).
   A gold rounded-square badge with a navy tick, always visible (no-JS / reduced-motion
   safe). The badge gently scales in with the card's reveal; no perpetual flashing. */
.service-card ul.checks li::before{ content:none; }                 /* drop the dash */
.service-card ul.checks li{ padding-left:2.4rem; }
.service-card ul.checks li::after{
  content:""; position:absolute; left:0; top:.55rem; width:19px; height:19px; border-radius:6px;
  background:var(--gold-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23081A33' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
  box-shadow:0 3px 10px rgba(201,162,39,.30);
  opacity:1; transform:none; animation:none;   /* override motion.css flashing tick-wave */
}
.card-dark .service-card ul.checks li::after,
.service-card.card-dark ul.checks li::after{ box-shadow:0 3px 12px rgba(201,162,39,.45); }

/* ============================================================
   14 · Header nav fit — stop the cramped mid-width nav
   (fixes "Why CKM" wrapping to two lines + the CTA clipping)
   ============================================================ */
.nav-links a{ white-space:nowrap; }                       /* keep every label on one line */
.nav-links{ gap:clamp(.7rem,1.5vw,1.35rem); }             /* tighter link spacing */
.nav-cta.btn{ padding:.62rem 1.15rem; font-size:.84rem; } /* compact header CTA */

/* ============================================================
   16 · Upgraded footer — closing CTA + newsletter + social
   ============================================================ */
.site-footer{ position:relative; overflow:hidden; padding-top:0; }
.site-footer::before{ content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, transparent, var(--gold-600) 22%, var(--gold-300) 50%, var(--gold-600) 78%, transparent); z-index:2; }
.site-footer .container{ position:relative; z-index:1; }
.site-footer .md-ghost{ font-size:clamp(96px,18vw,260px); top:auto; bottom:-.28em; color:rgba(231,199,102,.05); }

/* top: closing CTA + newsletter */
.footer-top{ display:grid; grid-template-columns:1.5fr 1fr; gap:clamp(2rem,5vw,5rem);
  padding:clamp(3rem,6vw,5rem) 0; border-bottom:1px solid rgba(255,255,255,.1); align-items:center; }
.footer-cta h3{ color:var(--white); font-size:clamp(1.5rem,2.7vw,2.1rem); line-height:1.15; margin:.6rem 0 .8rem; max-width:18ch; }
.footer-cta > p:not(.eyebrow){ color:rgba(255,255,255,.72); max-width:48ch; }
.footer-actions{ display:flex; gap:1rem; flex-wrap:wrap; margin-top:1.7rem; }
.footer-news h4{ color:var(--white); font-size:1.1rem; letter-spacing:0; text-transform:none; margin-bottom:.5rem; font-family:var(--font-display); }
.footer-news > p{ color:rgba(255,255,255,.62); font-size:.9rem; margin-bottom:1.1rem; max-width:40ch; }
.news-fields{ display:flex; gap:.6rem; }
.news-fields input{ flex:1; min-width:0; padding:.85rem 1.15rem; border-radius:999px; font:inherit;
  border:1.5px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06); color:var(--white); transition:border-color .3s, box-shadow .3s; }
.news-fields input::placeholder{ color:rgba(255,255,255,.45); }
.news-fields input:focus{ outline:none; border-color:var(--gold-500); box-shadow:0 0 0 3px rgba(201,162,39,.2); }
.news-fields .btn{ white-space:nowrap; }
.footer-news .form-note{ font-size:.74rem; color:rgba(255,255,255,.4); margin-top:.75rem; }
.footer-news .form-success{ display:none; margin-top:1rem; padding:.9rem 1.1rem; border-radius:var(--radius-sm);
  background:rgba(201,162,39,.14); color:var(--gold-100); font-size:.9rem; font-weight:500; }

/* main grid + brand + social */
.footer-grid{ padding-top:clamp(2.5rem,5vw,3.5rem); }
.footer-licence{ font-size:.8rem !important; color:rgba(255,255,255,.5); margin-top:.8rem; }
.footer-social{ display:flex; gap:.6rem; margin-top:1.5rem; }
.footer-social .soc{ width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12); color:rgba(255,255,255,.82);
  transition:transform .3s var(--ease), background .3s, color .3s, border-color .3s; }
.footer-social .soc:hover{ transform:translateY(-3px); background:var(--gold-500); color:var(--navy-900); border-color:var(--gold-500); box-shadow:var(--shadow-gold); }
.footer-social .soc svg{ width:18px; height:18px; }
.footer-contact li{ display:flex; gap:.6rem; align-items:flex-start; padding:.32rem 0; }
.footer-contact .fc-ic{ color:var(--gold-500); flex:none; margin-top:.2rem; }
.footer-contact .fc-ic svg{ width:16px; height:16px; display:block; }
.footer-copy-badge{ display:inline-flex; align-items:center; gap:.5rem; }

@media (max-width:860px){ .footer-top{ grid-template-columns:1fr; gap:2.4rem; } }

/* ============================================================
   15 · Flip on content cards (homepage industries + case summaries)
   ============================================================ */
.card.md-flip{ background:none !important; border:0 !important; box-shadow:none !important; padding:0 !important; overflow:visible; }
.card.md-flip::before, .card.md-flip::after{ display:none !important; }   /* no spotlight/beam on the transparent shell */
.card.md-flip .md-flip-front, .card.md-flip .md-flip-back{
  border-radius:var(--radius-md); padding:var(--s-4); display:flex; flex-direction:column;
}
.card.md-flip .flip-hint{ margin-top:auto; padding-top:1rem; font-size:.68rem; letter-spacing:.14em;
  text-transform:uppercase; display:inline-flex; align-items:center; gap:.4rem; }
.card.md-flip .flip-hint svg{ width:14px; height:14px; }

/* white case-summary cards */
.card.md-flip:not(.card-dark) .md-flip-front,
.card.md-flip:not(.card-dark) .md-flip-back{
  background:#fff; box-shadow:var(--shadow-soft); border:1px solid rgba(8,26,51,.05); min-height:264px;
}
.card.md-flip:not(.card-dark) .md-flip-back{ justify-content:center; }
.card.md-flip:not(.card-dark) .flip-hint{ color:var(--gold-600); }

/* dark homepage industry mini-cards */
.card.card-dark.md-flip .md-flip-front,
.card.card-dark.md-flip .md-flip-back{
  background:linear-gradient(160deg,var(--navy-800),var(--navy-700));
  border:1px solid rgba(255,255,255,.08); min-height:198px;
}
.card.card-dark.md-flip .md-flip-back{ background:linear-gradient(160deg,var(--navy-700),var(--gold-600)); justify-content:center; }
.card.card-dark.md-flip .md-flip-back p{ color:rgba(255,255,255,.92); font-size:.95rem; }
.card.card-dark.md-flip .flip-hint{ color:var(--gold-300); }

/* The full inline nav only fits on wide screens — collapse to the mobile
   menu below 1100px so it never crams or clips. */
@media (max-width:1100px){
  .nav-toggle{ display:block; }
  .nav-links{
    position:fixed; inset:0; background:var(--navy-900);
    flex-direction:column; justify-content:center; gap:2rem;
    transform:translateX(100%); transition:transform .45s var(--ease); z-index:105;
  }
  .nav-links.open{ transform:translateX(0); }
  .nav-links a{ color:#fff !important; font-size:1.3rem; font-family:var(--font-display); }
  .nav-cta.btn{ margin-top:1rem; padding:.9rem 1.9rem; font-size:.95rem; }  /* full size inside the overlay */
}

/* 9 · Reduced-motion / no-JS safety: never leave content hidden */
.no-js .reveal,
html:not(.js) .reveal{ opacity:1 !important; transform:none !important; }

/* 10 · Uniform interior page-hero banner height (matches industries.html ≈625px),
       content vertically centred so shorter/longer headlines never change the height */
.page-hero{
  min-height:625px;
  display:flex;
  align-items:center;
  padding:7rem 0 3rem;
}
.page-hero > .container{ width:100%; }
@media (max-width:768px){
  .page-hero{ min-height:auto; padding:7.5rem 0 3.5rem; }
}

/* 11 · Flash-in headline on interior page heroes (same masked word-rise as the
       homepage hero). Words are split by motion.js; they rise once body gets .ld. */
.page-hero h1 .w i{ transition:transform .7s var(--ease) var(--d,0ms); }
.js .page-hero h1 .w i{ transform:translateY(112%); }
.ld .page-hero h1 .w i{ transform:none; }

/* Preserve the gold italic on split highlight words (motion.css forces .w i normal) */
.hero h1 em .w i, .page-hero h1 em .w i{ font-style:italic; }

/* 12 · Homepage hero unified to the same 625px banner height as the interior
       pages. The four credential stats move to a compact dark strip below,
       and the headline/spacing are tightened so the longer homepage copy fits
       the same band cleanly. */
.hero{ min-height:625px; padding:6rem 0 2rem; }
/* .hero is display:flex (to vertically centre), which makes .container a flex
   item that shrinks to its content and drifts off-centre. Force full width so
   the hero copy lines up with the header/menu container (same as .page-hero). */
.hero > .container{ width:100%; }
.hero h1{ font-size:clamp(1.85rem,3.5vw,2.95rem); line-height:1.14; }
.hero .lede{ margin:1rem 0 1.6rem; max-width:58ch; }
.hero-stat-band{
  background:var(--navy-900);
  border-top:1px solid rgba(255,255,255,.06);
  padding:2.4rem 0;
}
.hero-stat-band .hero-stats{ margin-top:0; display:grid; grid-template-columns:repeat(4,1fr); gap:0; align-items:center; }
/* centre each of the four figures and separate them with subtle dividers */
.hero-stat-band .stat{ text-align:center; padding:0.2rem 1.25rem; }
.hero-stat-band .stat + .stat{ border-left:1px solid rgba(255,255,255,.10); }
/* one standard size for all four figures (numbers and word-figures alike),
   so "18+ / Licensed / Est. 2008 / 4" read as a consistent set */
.hero-stat-band .stat .num,
.hero-stat-band .stat .num-text{
  font-size:clamp(1.6rem, 2.3vw, 2.1rem);
  line-height:1.2;
  padding-top:0;
}
@media (max-width:768px){
  .hero{ min-height:auto; padding:7.5rem 0 2.5rem; }
  .hero-stat-band{ padding:2rem 0; }
  .hero-stat-band .hero-stats{ grid-template-columns:repeat(2,1fr); gap:1.6rem 0; }
  /* on two columns, only the right card of each row keeps a divider */
  .hero-stat-band .stat + .stat{ border-left:none; }
  .hero-stat-band .stat:nth-child(even){ border-left:1px solid rgba(255,255,255,.10); }
}

/* 17 · Homepage hero photographic background (the diverse workforce team).
       The photo already carries the gold glow at top-right; a left-to-right
       navy wash keeps the white headline fully legible over the dark left
       third, and a soft bottom wash protects the lede + CTAs. The photo sits
       under the existing aurora + grid overlays; content stays on z-index 2.
       Position tuned lower (people sit lower in the band) and framed right. */
.hero{
  background:
    linear-gradient(90deg,
      rgba(8,26,51,.94) 0%,
      rgba(8,26,51,.80) 28%,
      rgba(8,26,51,.44) 56%,
      rgba(8,26,51,.10) 100%),
    linear-gradient(0deg, rgba(8,26,51,.55) 0%, rgba(8,26,51,0) 46%),
    url("../assets/hero-bg.jpg?v=3");
  background-size: cover, cover, cover;
  background-position: left center, center, 82% 22%;
  background-repeat: no-repeat;
}
/* the photo supplies the gold glow, so ease off the aurora's gold blob here
   to avoid a double highlight (keep the cursor-reactive motion, just softer) */
.hero .aur i:last-child{ opacity:.6; }

/* 18 · "The Business Challenge" section: subtle light workplace background.
        Scoped to THIS section only (by aria-label), not the other .bg-soft
        sections. A soft white veil keeps the navy heading and grey body text
        readable over the faded office photo. */
section[aria-label="Business challenges"]{
  background-image:
    linear-gradient(90deg, rgba(244,247,251,.55) 0%, rgba(244,247,251,.34) 52%, rgba(244,247,251,.14) 100%),
    url("../assets/challenge-bg.jpg");
  background-size: cover, cover;
  background-position: center, center right;
  background-repeat: no-repeat;
}

/* 19 · "Why CKM" mini-cards: dark treatment (scoped to THIS section only).
        Dark navy cards on the light section for a bold, executive contrast.
        The gold icon badges stay (they pop on dark); title + body go light. */
section[aria-label="Why CKM"] .card{
  background:linear-gradient(160deg, var(--navy-900), var(--navy-800));
  border:1px solid rgba(255,255,255,.08);
}
section[aria-label="Why CKM"] .card h4{ color:var(--white); }
section[aria-label="Why CKM"] .card p{ color:rgba(255,255,255,.72); }

/* ============================================================
   13 · Quick-win effect modules — CKM integration
   ============================================================ */

/* SmartChrome — direction-aware header (hides on scroll-down, returns on scroll-up) */
.site-header{ transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease), transform .45s var(--ease); }
.site-header.hd-hide{ transform:translateY(-100%); }
[data-motion="off"] .site-header{ transition:none; }
.site-header.hd-hide .nav-links.open{ transform:none; }   /* never hide an open mobile menu */

/* 3D tilt on cards — let tilt own the transform (replaces the flat hover-lift),
   keep the gold spotlight rather than tilt's white glare */
.card.md-tilt, .card.md-tilt:hover{
  transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
}
.card.md-tilt::after{ mix-blend-mode:normal; }

/* Ripple tint on solid buttons */
.btn-gold.md-ripple .mr, .btn-navy.md-ripple .mr{ background:#fff; opacity:.22; }

/* md-copy → gold, unstyled button base */
.md-copy{ background:none; border:0; padding:0; cursor:pointer; font:inherit; color:inherit; }
.md-copy.done{ color:var(--gold-600); }
.md-copy .ic{ color:var(--gold-500); }

/* md-field accent → gold (only if used) */
.md-field input:focus{ border-color:var(--gold-500); box-shadow:0 0 0 3px rgba(201,162,39,.18); }
.md-field input:focus + label,
.md-field input:not(:placeholder-shown) + label{ color:var(--gold-600); }

/* Ghost watermark — CKM gold-tinted, sized for full-width dark bands */
.md-ghost.light{ color:rgba(231,199,102,.055); font-family:var(--font-display); }
.bg-navy .md-ghost, .page-hero .md-ghost{ font-size:clamp(80px,15vw,220px); }

/* Industries — click-to-flip tiles (front: sector, back: detail) */
.industry-tile.md-flip{ background:none; border:0; padding:0; overflow:visible; }
.industry-tile.md-flip::before{ display:none; }
.industry-tile.md-flip .md-flip-front,
.industry-tile.md-flip .md-flip-back{
  border-radius:var(--radius-md); padding:var(--s-4); min-height:230px;
  background:linear-gradient(160deg, var(--navy-800), var(--navy-700));
  border:1px solid rgba(255,255,255,.07);
}
.industry-tile.md-flip .md-flip-front{ display:flex; flex-direction:column; }
.industry-tile.md-flip .md-flip-back{
  background:linear-gradient(160deg, var(--navy-700), var(--gold-600));
  display:flex; flex-direction:column; justify-content:center;
}
.industry-tile.md-flip h3{ color:var(--white); margin:var(--s-2) 0 var(--s-1); }
.industry-tile.md-flip .md-flip-front p{ color:rgba(255,255,255,.7); font-size:.95rem; }
.industry-tile.md-flip .md-flip-back p{ color:rgba(255,255,255,.92); font-size:.98rem; }
.industry-tile.md-flip .flip-hint{ margin-top:auto; font-size:.68rem; letter-spacing:.14em; text-transform:uppercase; color:var(--gold-300); display:inline-flex; align-items:center; gap:.4rem; }
