/* =====================================================================
   MP Tech Business — "next" layer: motion, navigation, conversion.
   Native platform features first (View Transitions, scroll-driven
   animations, speculation rules). Everything degrades gracefully and
   respects prefers-reduced-motion.
   ===================================================================== */

/* ---------- 1. Page-to-page transitions (Chrome/Edge/Safari 18+) ---------- */
@view-transition { navigation: auto; }
nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: vtOut .28s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: vtIn .42s cubic-bezier(.2,.8,.2,1) both; }
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(16px); } }

/* ---------- 2. Reading progress (pure CSS where supported) ---------- */
.mpn-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 400; pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--gold-l)); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .mpn-progress { animation: mpnGrow linear both; animation-timeline: scroll(root); }
  @keyframes mpnGrow { to { transform: scaleX(1); } }
}

/* ---------- 3. Scroll reveals (scroll-driven; JS fallback adds .mpn-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .mpn-rv { animation: mpnRise linear both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
  }
  @supports not (animation-timeline: view()) {
    .mpn-rv { opacity: 0; translate: 0 26px; transition: opacity .7s cubic-bezier(.2,.8,.2,1), translate .7s cubic-bezier(.2,.8,.2,1); }
    .mpn-rv.mpn-in { opacity: 1; translate: 0 0; }
  }
}
@keyframes mpnRise { from { opacity: 0; translate: 0 32px; scale: .985; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* ---------- 4. Headline that composes itself word by word ---------- */
.mpn-w { display: inline-block; white-space: pre; }
@media (prefers-reduced-motion: no-preference) {
  .mpn-split .mpn-w { opacity: 0; translate: 0 .45em; filter: blur(6px);
    animation: mpnWord .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
}
@keyframes mpnWord { to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* ---------- 5. Cursor spotlight on cards + magnetic buttons ---------- */
@media (hover: hover) and (pointer: fine) {
  .mpn-spot { position: relative; }
  .mpn-spot::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(224,180,74,.16), transparent 42%);
    transition: opacity .35s ease; }
  .mpn-spot:hover::before { opacity: 1; }
  .mpn-spot > * { position: relative; z-index: 1; }
  .mpn-mag { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .2s; will-change: transform; }
}

/* ---------- 6. Command palette (⌘K / Ctrl+K / "/") ---------- */
.mpn-search-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin-right: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(224,180,74,.28); border-radius: 18px; color: rgba(255,255,255,.75);
  font: 500 13px 'DM Sans', sans-serif; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.mpn-search-btn:hover { background: rgba(224,180,74,.12); border-color: var(--gold-l); color: #fff; }
.mpn-search-btn svg { width: 15px; height: 15px; }
.mpn-search-btn kbd { font: 600 11px 'DM Sans', sans-serif; color: var(--gold-l); border: 1px solid rgba(224,180,74,.35); border-radius: 5px; padding: 1px 5px; }
.mpn-navright { display: flex; align-items: center; }
@media (max-width: 1100px) { .mpn-search-btn kbd, .mpn-search-btn .mpn-lbl { display: none; } .mpn-search-btn { padding: 0 10px; } }
@media (max-width: 768px) { .mpn-search-btn { margin-right: 4px; } .mpn-navright { margin-left: auto; } }
.mpn-pal { position: fixed; inset: 0; z-index: 900; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  background: rgba(6,15,28,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mpn-pal.on { display: flex; animation: mpnFade .18s ease both; }
@keyframes mpnFade { from { opacity: 0; } }
.mpn-pal-box { width: min(640px, 100%); background: #0e1f34; border: 1px solid rgba(224,180,74,.3); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.7); animation: mpnPop .28s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes mpnPop { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.mpn-pal-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(224,180,74,.18); }
.mpn-pal-in svg { width: 18px; height: 18px; color: var(--gold-l); flex: none; }
.mpn-pal-in input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: 400 17px 'DM Sans', sans-serif; }
.mpn-pal-in input::placeholder { color: rgba(255,255,255,.4); }
.mpn-pal-in kbd { font: 600 11px 'DM Sans', sans-serif; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.18); border-radius: 5px; padding: 2px 6px; }
.mpn-pal-list { max-height: min(60vh, 460px); overflow: auto; padding: 8px; }
.mpn-pal-grp { font: 600 10.5px 'DM Sans', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding: 10px 12px 6px; }
.mpn-pal-it { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.85); text-decoration: none; cursor: pointer; }
.mpn-pal-it:visited { color: rgba(255,255,255,.85); }
.mpn-pal-it b { display: block; font: 600 14.5px 'DM Sans', sans-serif; color: #fff; }
.mpn-pal-it span { display: block; font-size: 12.5px; color: rgba(255,255,255,.5); line-height: 1.4; margin-top: 2px; }
.mpn-pal-it i { flex: none; width: 34px; height: 34px; border-radius: 9px; background: rgba(224,180,74,.12); display: grid; place-items: center; font-style: normal; color: var(--gold-l); font-size: 15px; }
.mpn-pal-it.sel, .mpn-pal-it:hover { background: linear-gradient(90deg, rgba(37,104,160,.35), rgba(37,104,160,.12)); }
.mpn-pal-it mark { background: none; color: var(--gold-l); }
.mpn-pal-empty { padding: 28px; text-align: center; color: rgba(255,255,255,.5); font-size: 14px; }
.mpn-pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid rgba(224,180,74,.14); font-size: 11.5px; color: rgba(255,255,255,.4); }

/* ---------- 7. Smart CTA dock ---------- */
.mpn-dock { position: fixed; left: 50%; bottom: 18px; z-index: 300; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px;
  background: rgba(11,24,41,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(224,180,74,.35);
  border-radius: 40px; box-shadow: 0 24px 60px -18px rgba(0,0,0,.6); color: #fff;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
.mpn-dock.on { transform: translate(-50%, 0); opacity: 1; }
.mpn-dock .mpn-dock-t { font: 500 13.5px 'DM Sans', sans-serif; color: rgba(255,255,255,.8); margin-right: 6px; white-space: nowrap; }
.mpn-dock a { font: 600 13.5px 'DM Sans', sans-serif; text-decoration: none; padding: 10px 16px; border-radius: 24px; white-space: nowrap; transition: background .2s, transform .2s; }
.mpn-dock a.g { background: linear-gradient(135deg, var(--gold-l), var(--gold)); color: var(--navy); }
.mpn-dock a.g:visited { color: var(--navy); }
.mpn-dock a.o { color: var(--gold-l); border: 1px solid rgba(224,180,74,.45); }
.mpn-dock a.o:visited { color: var(--gold-l); }
.mpn-dock a:hover { transform: translateY(-1px); }
.mpn-dock button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); cursor: pointer; font-size: 16px; line-height: 1; }
@media (min-width: 1180px) {
  .mpn-dock { left: auto; right: 24px; transform: translateY(140%); }
  .mpn-dock.on { transform: none; }
}
@media (max-width: 720px) {
  .mpn-dock { left: 12px; right: 12px; bottom: 12px; transform: translateY(140%); padding: 8px; justify-content: space-between; }
  .mpn-dock.on { transform: none; }
  .mpn-dock .mpn-dock-t { display: none; }
  .mpn-dock a { flex: 1; text-align: center; padding: 11px 10px; font-size: 13px; }
}
@media print { .mpn-dock, .mpn-progress, .mpn-ctx { display: none !important; } }

/* ---------- 8. Article context bar (current section) + next read ---------- */
.mpn-ctx { position: fixed; left: 0; right: 0; top: 66px; z-index: 150; height: 44px; display: flex; align-items: center; gap: 14px; padding: 0 56px;
  background: rgba(248,247,244,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(196,154,58,.25);
  transform: translateY(-110%); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.mpn-ctx.on { transform: none; opacity: 1; }
.mpn-ctx .n { font: 400 15px 'DM Serif Display', Georgia, serif; color: var(--gold-deep); white-space: nowrap; }
.mpn-ctx .t { flex: 1; min-width: 0; font: 600 13.5px 'DM Sans', sans-serif; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpn-ctx .t span { display: inline-block; animation: mpnCtx .4s cubic-bezier(.2,.8,.2,1); }
@keyframes mpnCtx { from { opacity: 0; transform: translateY(8px); } }
.mpn-ctx .r { font: 500 12.5px 'DM Sans', sans-serif; color: var(--muted); white-space: nowrap; }
.mpn-ctx .bar { position: absolute; left: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-l)); width: 0; transition: width .15s linear; }
@media (max-width: 768px) { .mpn-ctx { padding: 0 20px; top: 66px; } .mpn-ctx .r { display: none; } }
.art-content h2 { scroll-margin-top: 130px; }
.mpn-ctx ~ * .art-content h2 {}

.mpn-next { margin-top: 56px; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 240px 1fr; text-decoration: none;
  background: linear-gradient(160deg, #16304d, #0b1829); box-shadow: 0 30px 60px -30px rgba(11,24,41,.6), 0 0 0 1px rgba(224,180,74,.25);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.mpn-next:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -30px rgba(11,24,41,.7), 0 0 0 1px var(--gold-l); }
.mpn-next .art-illus { height: 100%; min-height: 160px; border-radius: 0; box-shadow: none; }
.mpn-next .mpn-next-b { padding: 26px 30px; display: flex; flex-direction: column; justify-content: center; }
.mpn-next .k { font: 600 11px 'DM Sans', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-l); margin-bottom: 10px; }
.mpn-next .h { font: 400 24px/1.25 'DM Serif Display', Georgia, serif; color: #fff; margin-bottom: 12px; }
.mpn-next .go { font: 600 12.5px 'DM Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-l); }
.art-content { min-width: 0; }
.mpn-next, .mpn-next .mpn-next-b { min-width: 0; }
.mpn-next .h { overflow-wrap: break-word; }
@media (max-width: 1100px) { .mpn-next { grid-template-columns: 1fr; } .mpn-next .art-illus { aspect-ratio: 16/9; height: auto; min-height: 0; } }

/* article hero: topic illustration on the right (morphs from the card on Sales Insights) */
.art-hero.mpn-has-art { position: relative; }
.art-hero.mpn-has-art > *:not(.mpn-hero-art) { position: relative; z-index: 2; max-width: min(760px, 58%); }
.mpn-hero-art { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); width: min(380px, 30vw); aspect-ratio: 16/10; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.6), 0 0 0 1px rgba(224,180,74,.3); z-index: 1; }
.mpn-hero-art svg { width: 100%; height: 100%; display: block; }
@media (max-width: 1100px) { .mpn-hero-art { display: none; } .art-hero.mpn-has-art > *:not(.mpn-hero-art) { max-width: none; } }

/* ---------- 9. Home: speaking band ---------- */
.mpn-speak { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 96px 56px; }
.mpn-speak::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 500px at 90% 10%, rgba(224,180,74,.14), transparent 60%), radial-gradient(rgba(224,180,74,.10) 1.2px, transparent 1.3px) 0 0/26px 26px; }
.mpn-speak-in { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 64px; align-items: center; }
.mpn-speak .eb { font: 600 11px 'DM Sans', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.mpn-speak h2 { font: 400 clamp(30px, 3.4vw, 46px)/1.15 'DM Serif Display', Georgia, serif; margin-bottom: 18px; }
.mpn-speak h2 em { color: var(--gold-l); font-style: italic; }
.mpn-speak p { font-size: 17px; line-height: 1.75; color: rgba(255,255,255,.66); max-width: 560px; margin-bottom: 30px; }
.mpn-speak .acts { display: flex; gap: 14px; flex-wrap: wrap; }
.mpn-speak .acts a { text-decoration: none; font: 600 14.5px 'DM Sans', sans-serif; padding: 14px 24px; border-radius: 6px; }
.mpn-speak .acts a.g { background: linear-gradient(135deg, var(--gold-l), var(--gold)); color: var(--navy); }
.mpn-speak .acts a.o { border: 1px solid rgba(224,180,74,.5); color: var(--gold-l); }
.mpn-speak .cards { display: grid; gap: 14px; }
.mpn-speak .c { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px rgba(224,180,74,.2); }
.mpn-speak .c svg { width: 52px; height: 52px; }
.mpn-speak .c b { display: block; font: 400 20px 'DM Serif Display', Georgia, serif; color: #fff; margin-bottom: 4px; }
.mpn-speak .c span { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.6); }
@media (max-width: 900px) { .mpn-speak { padding: 64px 24px; } .mpn-speak-in { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- 10. YouTube facade (loads the player only on click) ---------- */
.mpn-yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #000 center/cover no-repeat; }
.mpn-yt::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,24,41,.15), rgba(11,24,41,.55)); transition: opacity .3s; }
.mpn-yt:hover::after { opacity: .5; }
.mpn-yt .pl { position: absolute; left: 50%; top: 50%; z-index: 1; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-l), var(--gold)); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(224,180,74,.18), 0 20px 40px -10px rgba(0,0,0,.6);
  transition: transform .3s cubic-bezier(.2,.8,.2,1.4); }
.mpn-yt:hover .pl { transform: scale(1.08); }
.mpn-yt .pl::before { content: ''; margin-left: 6px; border-left: 22px solid var(--navy); border-top: 13px solid transparent; border-bottom: 13px solid transparent; }

/* ---------- 11. Accessibility contrast fixes ---------- */
.testimonial-role { color: #5a6070 !important; }
.yt-sub { color: rgba(255,255,255,.66) !important; }
footer .ft-brand p, footer .ft-col h5 { color: rgba(255,255,255,.6) !important; }
footer .ft-bot p, footer .ft-bot a { color: rgba(255,255,255,.55) !important; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .mpn-dock, .mpn-ctx { transition: none; }
}
