/* Homepage job map (Views/Home/_JobMap.cshtml, wwwroot/js/job-map/job-map.js). */

/* Self-hosted from fonts.gstatic.com, latin subset only, so visitor IPs are not sent to Google. */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Google/BarlowCondensed-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/Google/BarlowCondensed-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Source Sans 3 is a variable font: one file covers 400, 600 and 700. */
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/Google/SourceSans3-normal-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* The photo shows until consent is given, and whenever Mapbox is unavailable. */
.job-map-hero { position: relative; height: calc(100vh - var(--job-map-top, 124px)); height: calc(100svh - var(--job-map-top, 124px)); min-height: 480px; background: #1d3647 url(../images/homepage_04.jpg) center/cover; overflow: hidden; }
.job-map-hero.on { background-image: none; }
/* two classes so this outranks mapbox-gl.css's .mapboxgl-map { position: relative }, which loads later */
.job-map-hero .job-map-canvas { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.job-map-hero.on .job-map-canvas { opacity: 1; }
.job-map-hero .mapboxgl-ctrl-bottom-left, .job-map-hero .mapboxgl-ctrl-bottom-right { z-index: 4; }
.job-map-toggle { position: absolute; z-index: 5; right: 16px; bottom: 56px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #0c4d8a; font-size: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); display: none; }
.job-map-hero.on .job-map-toggle { display: block; }
/* the homepage sections below already leave room for a fixed header; the hero does that now */
.job-map-hero + .home { margin-top: 0 !important; }

/* ---------- pins: a thin white line rises from the job, then the card slides out ---------- */
.job-map-pin { position: relative; width: 0; height: 0; pointer-events: none; font-family: "Source Sans 3", Roboto, sans-serif; line-height: 1.55; }
.job-map-pin .foot { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); opacity: 0; transform: scale(.4); transition: opacity .4s, transform .4s; }
.job-map-pin .foot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid #fff; opacity: 0; }
.job-map-pin .stem { position: absolute; left: -1px; bottom: 0; width: 2px; height: 0; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.5); transition: height .9s cubic-bezier(.2,.7,.2,1); }
.job-map-pin .tag { position: absolute; left: -1px; bottom: var(--h); width: max-content; max-width: 380px; box-shadow: 0 14px 34px rgba(0,0,0,.45); clip-path: inset(0 100% 0 0); transition: clip-path .65s cubic-bezier(.2,.7,.2,1); }
.job-map-pin .tag .body { padding: 11px 18px 12px 15px; }
.job-map-pin .tag b { display: block; font: 700 23px/1.08 "Barlow Condensed", "Source Sans 3", sans-serif; letter-spacing: .01em; }
.job-map-pin .tag .meta { display: flex; margin-top: 6px; font-size: 14px; align-items: baseline; min-width: 0; }
.job-map-pin .tag b, .job-map-pin .tag .meta, .job-map-pin .tag .amtbox > * { opacity: 0; transform: translateY(6px); transition: opacity .45s, transform .45s; }
.job-map-pin.up .foot { opacity: 1; transform: scale(1); }
.job-map-pin.up .foot::after { animation: job-map-ripple 1.6s ease-out .2s 2; }
@keyframes job-map-ripple { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(4.5); } }
.job-map-pin.up .stem { height: var(--h); }
.job-map-pin.open .tag { clip-path: inset(-20px -40px -40px 0); }
.job-map-pin.open .tag .amtbox > * { opacity: 1; transform: none; transition-delay: .25s; }
.job-map-pin.open .tag b { opacity: 1; transform: none; transition-delay: .3s; }
.job-map-pin.open .tag .meta { opacity: 1; transform: none; transition-delay: .42s; }
.job-map-pin.flip .tag { left: auto; right: -1px; text-align: right; clip-path: inset(0 0 0 100%); }
.job-map-pin.flip .tag .body { padding: 11px 15px 12px 18px; }
.job-map-pin.flip .tag .meta { justify-content: flex-end; }
.job-map-pin.flip.open .tag { clip-path: inset(-20px 0 -40px -40px); }
/* leaving: the card folds away, the line drops back into the ground */
.job-map-pin.gone .tag { clip-path: inset(0 100% 0 0); transition-duration: .4s; }
.job-map-pin.flip.gone .tag { clip-path: inset(0 0 0 100%); }
.job-map-pin.gone .stem { height: 0; transition: height .7s cubic-bezier(.6,0,.8,.4) .25s; }
.job-map-pin.gone .foot { opacity: 0; transform: scale(.4); transition-delay: .8s; }

/* ---------- job card: amount + year on green; name, then "client · city" on white ---------- */
.job-map-pin.job .tag { display: flex; align-items: stretch; border-radius: 8px; overflow: hidden; max-width: 440px; }
.job-map-pin.job.flip .tag { flex-direction: row-reverse; }
.job-map-pin.job .amtbox { display: flex; flex-direction: column; justify-content: center; background: #1f6a3a; color: #fff; padding: 10px 14px; font: 700 26px/1 "Barlow Condensed", sans-serif; }
.job-map-pin.job .amtbox small { font: 600 13px "Source Sans 3", sans-serif; color: rgba(255,255,255,.75); margin-top: 4px; }
.job-map-pin.job .body { background: #fff; color: #15202b; min-width: 0; }
.job-map-pin.job .meta { color: #5b6670; }
/* client shares the city line so the card stays two lines; long names cut off with an ellipsis */
.job-map-pin.job .client { font-weight: 600; color: #33414c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 250px; }
.job-map-pin.job .client:empty { display: none; }
.job-map-pin.job .client:not(:empty) + .city::before { content: "\00B7"; margin: 0 7px; color: #9aa4ad; }
.job-map-pin.job .city { white-space: nowrap; flex-shrink: 0; }

/* ---------- office pin: the full logo with a white outline, large, no card behind it ---------- */
.job-map-pin.office .tag { max-width: none; left: 0; transform: translateX(-50%); background: none; box-shadow: none; display: flex; flex-direction: column; align-items: center; clip-path: inset(100% -80px -80px -80px); transform-origin: 50% 100%; transition: clip-path .65s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.job-map-pin.office.open .tag { clip-path: inset(-80px -80px -80px -80px); }
.job-map-pin.office .tag img { width: calc(clamp(300px, 34vw, 520px) * 1052 / 1012); height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.job-map-pin.office .tag .addr { margin-top: 8px; color: #fff; font: 600 15px "Source Sans 3", sans-serif; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.5); }
/* once the tour leaves the office, its logo shrinks to a landmark so it doesn't compete with the job cards */
.job-map-pin.office.small { --h: 56px !important; }
.job-map-pin.office.small .tag { transform: translateX(-50%) scale(.42); }
.job-map-pin.office.small .tag .addr { opacity: 0; transition: opacity .4s; }

@media (max-width: 767px) {
    .job-map-pin.job .tag { max-width: calc(100vw - 48px); }
    .job-map-pin .tag b { font-size: 17px; }
    .job-map-pin.job .amtbox { font-size: 20px; padding: 8px 10px; }
    .job-map-pin.job .client { max-width: 150px; }
    .job-map-pin.office .tag img { width: 260px; }
}
