/* Integration map preview card, and the pop-up it opens.
   Shared by the profile page and the business suite overview. */
.mapcard, .mapcard * { box-sizing: border-box; }
.mapcard { font-family: Inter, system-ui, sans-serif; line-height: 1.5; }
.mapcard-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 6px; background: #FFB020; color: #13202E; font-weight: 600; font-size: 16px; transition: background-color .2s ease; }
.mapcard { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr); align-items: center; gap: 24px clamp(24px, 4vw, 56px); padding: clamp(22px, 3vw, 34px); border-radius: 18px; color: #F4F6F3; text-decoration: none; background:
    radial-gradient(120% 140% at 100% 0%, rgba(110,168,254,.18), transparent 55%),
    radial-gradient(90% 120% at 0% 100%, rgba(255,176,32,.12), transparent 60%),
    #112235;
  border: 1px solid rgba(110,168,254,.35); box-shadow: 0 18px 50px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, border-color .35s ease; }
.mapcard::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(120deg, #FFB020, #6EA8FE, #4FD1C5, #B39DFF, #FFB020); background-size: 300% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; animation: mc-border 8s linear infinite; pointer-events: none; }
.mapcard:hover { transform: translateY(-4px); box-shadow: 0 26px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,176,32,.35); color: #F4F6F3; }
.mapcard:hover::before { opacity: 1; }
.mapcard:focus-visible { outline: 3px solid #FFB020; outline-offset: 4px; }
.mapcard-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mapcard-kicker { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #FFB020; }
.mapcard-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #FFB020; box-shadow: 0 0 0 0 rgba(255,176,32,.7); animation: mc-ping 1.8s ease-out infinite; }
.mapcard-title { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; line-height: 1.1; }
.mapcard-lead { color: #C4D0DB; font-size: 16px; max-width: 460px; }
.mapcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mapcard-chips span { padding: 4px 10px; border-radius: 999px; border: 1px solid #33475B; background: rgba(255,255,255,.03); font-size: 12.5px; color: #C4D0DB; }
.mapcard-go { margin-top: 6px; }
.mapcard-btn b { display: inline-block; margin-left: 8px; transition: transform .3s ease; }
.mapcard:hover .mapcard-btn { background: #FFC24D; }
.mapcard:hover .mapcard-btn b { transform: translateX(4px); }
.mapcard-art { width: 100%; height: auto; max-height: 260px; overflow: visible; }
.mc-links path { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 6 6; opacity: .85; animation: mc-flow 1.6s linear infinite; }
.mc-links path.mc-other { stroke-dasharray: 2 6; opacity: .5; animation-duration: 2.4s; }
.mc-ring { transform-box: view-box; transform-origin: 160px 105px; animation: mc-spin 24s linear infinite; }
.mc-ring circle { fill: #6EA8FE; opacity: .75; }
.mc-core { fill: #1A3350; stroke: #6EA8FE; stroke-width: 2; }
.mc-pulse { fill: none; stroke: #6EA8FE; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: mc-pulse 2.4s ease-out infinite; }
.mc-core-t { font-family: "Space Grotesk", Inter, sans-serif; font-size: 14px; font-weight: 600; fill: #F4F6F3; }
.mc-node rect { fill: #14263A; stroke: var(--c); stroke-width: 2; }
.mc-node text { font-family: Inter, sans-serif; font-size: 12px; font-weight: 600; fill: #F4F6F3; }
.mc-node { transform-box: fill-box; transform-origin: center; animation: mc-bob 4s ease-in-out infinite; }
.mc-node:nth-of-type(2) { animation-delay: -1s; } .mc-node:nth-of-type(3) { animation-delay: -2s; } .mc-node:nth-of-type(4) { animation-delay: -3s; }
/* Pops in when it scrolls into view */
.mapcard.reveal { opacity: 0; transform: translateY(28px) scale(.97); }
.mapcard.reveal.shown { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s cubic-bezier(.16,1,.3,1); }
@keyframes mc-flow { to { stroke-dashoffset: -24; } }
@keyframes mc-spin { to { transform: rotate(360deg); } }
@keyframes mc-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes mc-bob { 50% { transform: translateY(-3px); } }
@keyframes mc-ping { 0% { box-shadow: 0 0 0 0 rgba(255,176,32,.7); } 80%, 100% { box-shadow: 0 0 0 8px rgba(255,176,32,0); } }
@keyframes mc-border { to { background-position: 300% 0; } }
@media (max-width: 760px) {
  .mapcard { grid-template-columns: 1fr; }
  .mapcard-art { order: -1; max-height: 190px; }
}

/* The pop-up window */
.mappop { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: clamp(0px, 2.5vw, 28px); border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.mappop:not([open]) { display: none; }
.mappop::backdrop { background: rgba(6,12,20,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: mp-fade .3s ease; }
.mappop-box { width: min(1400px, 100%); height: min(900px, 100%); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #0B1724; border: 1px solid #33475B; box-shadow: 0 30px 90px rgba(0,0,0,.6); animation: mp-in .45s cubic-bezier(.16,1,.3,1); }
.mappop-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; background: #0D1B2A; border-bottom: 1px solid #33475B; color: #F4F6F3; }
.mappop-bar b { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-size: 16px; font-weight: 600; }
.mappop-bar small { color: #8FA0B0; font-size: 12.5px; }
.mappop-full { margin-left: auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; color: #FFB020; font-size: 13px; font-weight: 600; text-decoration: none; }
.mappop-full:hover { background: rgba(255,255,255,.05); color: #FFD27A; }
.mappop { font-family: Inter, system-ui, sans-serif; }
.mappop-close { min-width: 36px; min-height: 36px; border-radius: 8px; border: 1px solid #33475B; background: #14263A; color: #F4F6F3; font: inherit; font-size: 16px; cursor: pointer; }
.mappop-close:hover { border-color: #C4D0DB; }
.mappop iframe { flex: 1; width: 100%; border: 0; background: #0B1724; }
.mappop-loading { position: absolute; color: #8FA0B0; font-size: 14px; }
@keyframes mp-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes mp-fade { from { opacity: 0; } }
@media (max-width: 760px) {
  .mappop { padding: 0; }
  .mappop-box { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .mappop-bar small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mapcard::before, .mc-links path, .mc-ring, .mc-pulse, .mc-node, .mapcard-kicker i { animation: none; }
  .mapcard.reveal { opacity: 1; transform: none; }
  .mappop-box, .mappop::backdrop { animation: none; }
}

/* Profile goal: just the animated map and its button, centred under the skills */
.goalmap { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: clamp(32px, 5vw, 56px); }
.goalmap-art { display: block; width: min(380px, 92%); padding: 14px 18px; border-radius: 18px; background: radial-gradient(80% 90% at 50% 45%, rgba(110,168,254,.14), transparent 70%); transition: transform .35s cubic-bezier(.16,1,.3,1), background-color .35s ease; }
.goalmap-art .mapcard-art { display: block; max-height: none; }
.goalmap-art:hover { transform: scale(1.04); background-color: rgba(110,168,254,.06); }
.goalmap-art:focus-visible, .goalmap-btn:focus-visible { outline: 3px solid #FFB020; outline-offset: 4px; }
.goalmap-btn { text-decoration: none; }
.goalmap-btn b { display: inline-block; margin-left: 8px; transition: transform .3s ease; }
.goalmap-btn:hover, .goalmap-art:hover + .goalmap-btn { background: #FFC24D; color: #13202E; }
.goalmap-btn:hover b, .goalmap-art:hover + .goalmap-btn b { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .goalmap-art:hover { transform: none; } }

/* On the profile the map replaces the goal circle at the end of the strand */
.goalmap-art.dn-goal-map { margin: 0 auto; width: min(360px, 92%); padding: 0 12px 6px; }
.dn-live .dn-goal .dn-goal-map { opacity: 0; transform: translateY(20px) scale(.94); transition: opacity .6s ease .3s, transform .7s cubic-bezier(.16,1,.3,1) .3s, background-color .35s ease; }
.dn-live .dn-goal.on .dn-goal-map { opacity: 1; transform: none; }
.dn-live .dn-goal.on .dn-goal-map:hover, .dn-goal-map:hover { transform: scale(1.04); }
/* The strand's line carries on into the map, down to R ERP */
.mc-stem { fill: none; stroke: #FFB020; stroke-width: 2.7; }
@media (max-width: 760px) {
  .goalmap-art.dn-goal-map { margin-left: 0; width: min(300px, 100%); padding-left: 0; }
  .mc-stem { display: none; }
}
