/* =====================================================================
   Computer Xperts — Careers page styles (css/careers.css)
   Loaded on careers.html after css/site.css (colours, header, footer, page hero,
   3D tiles, Company side menu and free quote card live there).

   Contents
    0. Hero scene: dashed lines linking each person to the CV, "We're hiring" button
    1. Contact e-mail in the page hero
    2. Layout: open positions + side menu
    3. Position cards
    4. Contact bar
    5. Responsive: 640px
   ===================================================================== */


/* 0. Hero scene ---------------------------------------------------------
   Lines: the same flowing dashed red line as the Technology page illustration. They sit behind the
   pictures; js/careers.js sets each path so it stays attached as the pieces float. */
.scene__links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.link__flow { fill: none; stroke: #ff5050; stroke-width: 2; stroke-dasharray: 4 7; stroke-linecap: round; opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .motion-ok .link__flow { animation: link-flow 1.4s linear infinite; }
}
@keyframes link-flow { to { stroke-dashoffset: -22; } }

/* "We're hiring" button with a briefcase. It holds still (no float) so hovering it is steady. */
.scene__piece--badge { width: auto; pointer-events: auto; }
.scene__piece--badge .scene__float { animation: none !important; }
.hiring-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 20px 6px 6px; border-radius: 999px;
  background: rgba(20, 20, 20, .8); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 34px -16px rgba(0, 0, 0, .9);
  color: var(--white); font-size: 17px; font-weight: 900; letter-spacing: .01em; white-space: nowrap; text-decoration: none;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, border-color .3s ease, box-shadow .35s ease;
}
.hiring-btn__bag {
  position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3b3b3b, #121212);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hiring-btn__bag::after {   /* soft pulse ring, invites a click */
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff4d4d; opacity: 0;
}
.motion-ok .hiring-btn__bag::after { animation: bag-pulse 2.4s ease-out infinite; }
.hiring-btn__bag svg { width: 40px; height: 42px; overflow: visible; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.hiring-btn .bag { transform-box: fill-box; transform-origin: 50% 100%; }
.hiring-btn .bag__top { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.hiring-btn .bag__spark { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: opacity .25s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.hiring-btn .bag__shadow { transform-box: fill-box; transform-origin: center; transition: transform .35s ease; }
.hiring-btn__go { width: 20px; height: 20px; stroke-width: 2.4; transition: transform .3s ease; }

.hiring-btn:hover,
.hiring-btn:focus-visible {
  transform: translateY(-4px); background: var(--red); border-color: #ff6b6b;
  box-shadow: 0 22px 36px -14px rgba(207, 11, 11, .8);
}
.hiring-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.hiring-btn:hover .bag,
.hiring-btn:focus-visible .bag { animation: bag-hop .7s cubic-bezier(.3, 1.4, .5, 1); }
.hiring-btn:hover .bag__top,
.hiring-btn:focus-visible .bag__top { transform: translateY(-3px) rotate(-5deg); }   /* lid pops open */
.hiring-btn:hover .bag__spark,
.hiring-btn:focus-visible .bag__spark { opacity: 1; transform: scale(1); transition-delay: .12s; }
.hiring-btn:hover .bag__shadow { transform: scaleX(.8); }
.hiring-btn:hover .hiring-btn__go,
.hiring-btn:focus-visible .hiring-btn__go { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .hiring-btn:hover .bag, .hiring-btn:focus-visible .bag { animation: none; }
}
@keyframes bag-hop { 0% { transform: none; } 30% { transform: translateY(-5px) rotate(-8deg); } 60% { transform: translateY(0) rotate(5deg); } 100% { transform: none; } }
@keyframes bag-pulse { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.6); opacity: 0; } }


/* 1. Contact e-mail in the page hero ------------------------------------ */
.hero-contact { margin-top: 22px; }
.hero-contact__label { color: #a8a8a8; font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.hero-contact__mail {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 10px; padding: 0 20px 0 16px;
  border-radius: var(--radius); background: var(--red); color: var(--white);
  font-size: 16px; font-weight: 700; text-decoration: none; transition: background-color .2s ease;
}
.hero-contact__mail .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.hero-contact__mail:hover { background: var(--red-deep); }


/* 2. Layout (the two columns come from .with-side in css/site.css) ------- */
.openings { padding: var(--section-y) 0; background: var(--paper); scroll-margin-top: calc(var(--header-h, 90px) + 12px); }   /* the hero button jumps here */
.openings .block-head { margin-bottom: 20px; }


/* 3. Position cards ----------------------------------------------------- */
.positions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.position {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 22px 22px;
  border-radius: 16px; background: var(--white); border: 1px solid var(--line);
}
.position__title { color: var(--ink); font-size: 20px; font-weight: 800; line-height: 1.25; }
.position__apply {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  color: var(--red-text); font-size: 15px; font-weight: 700; text-decoration: none;
}
.position__apply:hover .ic--go { transform: translateX(4px); }
@media (pointer: coarse) { .position__apply { padding: 8px 0; } }   /* easier to tap */


/* 4. Contact bar -------------------------------------------------------- */
.careers-cta {
  display: flex; align-items: center; gap: 18px; margin-top: 16px; padding: 22px 26px;
  border-radius: 16px; background: var(--ink); color: var(--white);
}
.careers-cta__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--red); }
.careers-cta__icon .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.careers-cta__label { color: #bdbdbd; font-size: 14px; font-weight: 700; }
.careers-cta a { color: var(--white); font-size: 20px; font-weight: 800; text-decoration: none; transition: color .2s ease; }
.careers-cta a:hover { color: var(--red-on-dark); }


/* 5. Responsive --------------------------------------------------------- */
@media (max-width: 640px) {
  .hiring-btn { gap: 8px; padding: 4px 14px 4px 4px; font-size: 14px; }
  .hiring-btn__bag { width: 44px; height: 44px; }
  .hiring-btn__bag svg { width: 30px; height: 32px; }
  .hiring-btn__go { width: 16px; height: 16px; }
  .positions { grid-template-columns: 1fr; gap: 12px; }
  .position { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 16px; row-gap: 8px; padding: 18px; }
  .position .tile3d { width: 56px; height: 56px; border-radius: 15px; }
  .position .tile3d .ic { width: 26px; height: 26px; }
  .position__title { flex: 1; }
  .position__apply { flex-basis: 100%; margin-top: 0; padding-left: 72px; }
  .careers-cta { padding: 18px; }
  .careers-cta a { font-size: 17px; word-break: break-all; }
}
