/* ==========================================================================
   EM3 Energy - careers-single.css
   Single job listing (/jobs/<slug>/). Extends brand.css + nav.css (loaded after).
   Enqueued only on is_singular('job') (functions.php). Breakpoints 980 / 640 / 420.
   No em dashes anywhere.

   MARKUP CONTRACT (emitted by em3_job_render_single in theme/inc/job-single.php)
   ------------------------------------------------------------------------------
   <article class="em3-job">
     <header class="em3-job-hero em3-bg-deep">
       <div class="em3-wrap em3-job-hero__inner">
         <nav class="em3-job-crumb"> a + span + span.em3-job-crumb__cur </nav>
         <span class="em3-eyebrow series"> live dot + "Open role . Now hiring" </span>
         <h1 class="em3-job-hero__title">Title</h1>
         <ul class="em3-job-hero__meta"> li.em3-job-hero__metacell ( .k + .v ) </ul>
         <div class="em3-job-hero__actions"> .em3-btn-primary.is-lg + .em3-btn-ghost </div>
     </header>
     <section class="em3-section em3-bg-snow on-light em3-job-body">
       <div class="em3-wrap em3-job-body__grid">
         <div class="em3-job-prose"> the_content() spec </div>
         <aside class="em3-job-aside"> .em3-job-card ( title + dl.em3-job-summary + cta + share ) </aside>
     </section>
     <section class="em3-section em3-bg-snow on-light em3-job-apply" id="apply">
       <div class="em3-wrap em3-job-apply__inner"> head + .em3-job-applybox ( Gravity Form ) </div>
     </section>
     <section class="em3-section em3-bg-deep em3-job-more"> head + ul.em3-job-more__list + .em3-job-more__cta </section>
   </article>
   ========================================================================== */

/* In-page anchor jumps (#apply) cleared for the fixed glass nav. */
.em3-job-apply[id],
.em3-job .em3-section[id] { scroll-margin-top: 96px; }

/* --------------------------------------------------------------------------
   1. Hero (DARK)
   -------------------------------------------------------------------------- */
.em3-job-hero {
  position: relative;
  padding-top: 124px; /* clear the fixed glass nav + breathing room */
  padding-bottom: 60px;
  overflow: hidden;
  isolation: isolate;
  color: var(--em3-ink);
}
.em3-job-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 0%, rgba(46,93,255,0.20), transparent 55%);
}
.em3-job-hero__inner { position: relative; z-index: 1; }

.em3-job-crumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--em3-ink-dim); margin-bottom: 22px; }
.em3-job-crumb a { color: var(--em3-ink-muted); text-decoration: none; transition: color .18s; }
.em3-job-crumb a:hover, .em3-job-crumb a:focus { color: #fff; }
.em3-job-crumb__cur { color: var(--em3-ink-dim); }

.em3-job-hero .em3-eyebrow { margin-bottom: 18px; }
.em3-job-hero__title { max-width: 20ch; margin: 0; color: var(--em3-ink); text-wrap: balance; }

.em3-job-hero__meta { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 40px; }
.em3-job-hero__metacell { display: flex; flex-direction: column; gap: 5px; }
.em3-job-hero__metacell .k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--em3-ink-dim); }
.em3-job-hero__metacell .v { font-size: 16px; font-weight: 600; color: #fff; }

.em3-job-hero__actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   2. Body (WHITE) - 2 columns: spec + sticky summary
   -------------------------------------------------------------------------- */
.em3-job-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: start; }

/* Spec prose (rendered from post_content: h2 / h3 / p / ul) */
.em3-job-prose { min-width: 0; }
.em3-job-prose > h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; margin: 44px 0 14px; color: var(--em3-ink-navy); }
.em3-job-prose > h2:first-child { margin-top: 0; }
.em3-job-prose h3 { font-size: 19px; line-height: 1.3; margin: 26px 0 10px; color: var(--em3-ink-navy); }
.em3-job-prose p { color: var(--em3-charcoal); font-size: 16px; line-height: 1.65; margin: 0 0 14px; }
.em3-job-prose ul { list-style: none; margin: 0 0 18px; padding: 0; }
.em3-job-prose li { position: relative; padding: 9px 0 9px 26px; color: var(--em3-charcoal); font-size: 15.5px; line-height: 1.6; border-bottom: 1px solid var(--em3-line-onwhite); }
.em3-job-prose li:last-child { border-bottom: none; }
.em3-job-prose li::before { content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 2px; background: var(--em3-accent); }
.em3-job-prose strong { color: var(--em3-ink-navy); font-weight: 700; }

/* Sticky summary card */
.em3-job-aside { position: sticky; top: 96px; }
.em3-job-card {
  background: #fff;
  border: 1px solid var(--em3-line-onwhite);
  border-radius: var(--em3-radius-card);
  padding: 26px 24px;
  box-shadow: 0 24px 50px -28px rgba(10,24,88,0.25);
}
.em3-job-card__title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(10,24,88,0.72); margin: 0 0 16px; }
.em3-job-summary { margin: 0 0 22px; }
.em3-job-sumrow { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--em3-line-onwhite); }
.em3-job-sumrow:last-child { border-bottom: none; }
.em3-job-sumrow dt { margin: 0; flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgba(10,24,88,0.72); }
.em3-job-sumrow dd { margin: 0; text-align: right; font-size: 14px; font-weight: 600; color: var(--em3-ink-navy); }
.em3-job-card__cta { width: 100%; justify-content: center; margin-bottom: 20px; }

.em3-job-share { border-top: 1px solid var(--em3-line-onwhite); padding-top: 18px; }
.em3-job-share__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(10,24,88,0.72); margin-bottom: 10px; }
.em3-job-share__links { display: flex; gap: 10px; align-items: center; }
.em3-job-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius);
  background: #fff; color: var(--em3-ink-navy); cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  position: relative;
}
.em3-job-share__btn svg { width: 18px; height: 18px; }
/* Cover :focus + :active too, not just :focus-visible - the site reset.css paints
   button:focus / a:active pink (#cc3366) after a mouse click; keep it brand blue. */
.em3-job-share__btn:hover,
.em3-job-share__btn:focus,
.em3-job-share__btn:focus-visible,
.em3-job-share__btn:active { background: var(--em3-accent); border-color: var(--em3-accent); color: #fff; }
/* Hover / focus tooltip. Custom (not native title=) to match the dark-premium
   system: instant, navy, with an arrow. Text comes from each button's data-tip.
   The copy button REUSES this for confirmation: job-single.js swaps data-tip to
   "Link copied!" and toggles .is-copied to pin it visible for ~1.6s. */
.em3-job-share__btn::after,
.em3-job-share__btn::before {
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  opacity: 0; pointer-events: none; z-index: 6;
  transform: translateX(-50%) translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
}
.em3-job-share__btn::after {
  content: attr(data-tip);
  padding: 5px 9px; border-radius: 3px;
  background: var(--em3-ink-navy); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .01em; line-height: 1.2;
  white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(10,24,88,0.5);
}
.em3-job-share__btn::before {
  content: ""; bottom: calc(100% + 3px);
  border: 5px solid transparent; border-top-color: var(--em3-ink-navy);
}
.em3-job-share__btn:hover::after, .em3-job-share__btn:hover::before,
.em3-job-share__btn:focus-visible::after, .em3-job-share__btn:focus-visible::before,
.em3-job-copy.is-copied::after, .em3-job-copy.is-copied::before {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .em3-job-share__btn::after, .em3-job-share__btn::before { transition: opacity .16s ease; transform: translateX(-50%); }
  .em3-job-share__btn:hover::after, .em3-job-share__btn:hover::before,
  .em3-job-share__btn:focus-visible::after, .em3-job-share__btn:focus-visible::before,
  .em3-job-copy.is-copied::after, .em3-job-copy.is-copied::before { transform: translateX(-50%); }
}

/* Visually hidden, exposed to assistive tech (copy-confirmation live region). */
.em3-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Apply (WHITE) - premium light card wrapping the Gravity Form
   -------------------------------------------------------------------------- */
/* Contain the Gravity Forms Plupload file-input shim (.moxie-shim), which mis-positions
   off the right edge on narrow screens and would add a horizontal scrollbar. overflow-x:clip
   does not create a scroll container, so it never affects the sticky aside in another section. */
.em3-job, .em3-job-apply { overflow-x: clip; }
.em3-job-apply__inner { max-width: 860px; margin: 0 auto; }
.em3-job-apply__head { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.em3-job-apply__head .em3-eyebrow { justify-content: center; margin-bottom: 14px; }
.em3-job-apply__head h2 { margin: 0; }
.em3-job-apply__sub { color: var(--em3-charcoal); font-size: 17px; line-height: 1.55; margin: 12px 0 0; }
.em3-job-applybox {
  background: #fff;
  border: 1px solid var(--em3-line-onwhite);
  border-radius: var(--em3-radius-card);
  padding: 36px 34px;
  box-shadow: 0 40px 80px -40px rgba(10,24,88,0.28);
}
.em3-job-applyfallback { color: var(--em3-charcoal); font-size: 16px; }

/* Light-context field fills (brand.css ships white-on-dark inputs; recolour for the light card). */
.em3-job-applybox .gform_wrapper input[type=text],
.em3-job-applybox .gform_wrapper input[type=email],
.em3-job-applybox .gform_wrapper input[type=tel],
.em3-job-applybox .gform_wrapper input[type=url],
.em3-job-applybox .gform_wrapper textarea,
.em3-job-applybox .gform_wrapper select {
  background: var(--em3-snow);
  border: 1.5px solid var(--em3-line-onwhite);
  color: var(--em3-ink-navy);
}
.em3-job-applybox .gform_wrapper input:focus,
.em3-job-applybox .gform_wrapper textarea:focus,
.em3-job-applybox .gform_wrapper select:focus { border-color: var(--em3-accent); box-shadow: 0 0 0 4px rgba(46,93,255,0.14); }
.em3-job-applybox .gform_wrapper .ginput_complex label { color: rgba(10,24,88,0.72); }
.em3-job-applybox .gform_wrapper .gfield_required { color: var(--em3-accent); }

/* CV upload + privacy span the form width. */
.em3-job-applybox .gform_wrapper .gfield--type-fileupload,
.em3-job-applybox .gform_wrapper .gfield--type-html { grid-column: 1 / -1; }

/* File upload (multi-file drag/drop) */
.em3-job-applybox .gform_drop_area {
  border: 1.5px dashed rgba(46,93,255,0.35);
  background: var(--em3-snow);
  border-radius: var(--em3-radius);
  padding: 22px;
  text-align: center;
  color: var(--em3-charcoal);
  font-size: 14px;
}
.em3-job-applybox .gform_drop_instructions { display: block; margin-bottom: 10px; color: rgba(10,24,88,0.72); }
.em3-job-applybox .gform_button_select_files,
.em3-job-applybox .gform_wrapper .button.gform_button_select_files {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--em3-line-onwhite); color: var(--em3-ink-navy);
  border-radius: var(--em3-radius); padding: 10px 18px; font-family: var(--em3-font-sans);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.em3-job-applybox .gform_button_select_files:hover { background: var(--em3-accent); border-color: var(--em3-accent); color: #fff; }
.em3-job-applybox input[type=file] { font-size: 14px; color: var(--em3-charcoal); }
.em3-job-applybox .gfield_description,
.em3-job-applybox .gform_fileupload_rules,
.em3-job-applybox .ginput_preview { font-size: 12.5px; color: rgba(10,24,88,0.72); margin-top: 6px; }
.em3-job-privacy { font-size: 13px; line-height: 1.5; color: rgba(10,24,88,0.72); margin: 0; }

/* GF complex Name field: strip the default fieldset chrome so it matches single inputs. */
.em3-job-applybox .gform_wrapper fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Branded success state (GF swaps the form for the confirmation message on submit). */
.em3-job-applybox .gform_confirmation_message { color: var(--em3-charcoal); font-size: 16px; line-height: 1.6; }
.em3-job-success { text-align: center; padding: 8px 0; }
.em3-job-success .em3-eyebrow { justify-content: center; margin-bottom: 12px; }
.em3-job-success h3 { font-size: 26px; color: var(--em3-ink-navy); margin: 0 0 12px; }
.em3-job-success p { color: var(--em3-charcoal); font-size: 16px; line-height: 1.6; margin: 0 auto; max-width: 46ch; }
.em3-job-success__icon { width: 56px; height: 56px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(46,93,255,0.10); color: var(--em3-accent); }
.em3-job-success__icon svg { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   4. Other open roles + CTA (DARK)
   -------------------------------------------------------------------------- */
.em3-job-more__head { max-width: 720px; margin: 0 0 36px; }
.em3-job-more__head .em3-eyebrow { margin-bottom: 14px; }
.em3-job-more__head h2 { margin: 0; }
.em3-job-more__list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 10px; }
.em3-job-more__link {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--em3-line-soft); border-radius: var(--em3-radius);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.em3-job-more__link:hover, .em3-job-more__link:focus-visible { background: rgba(255,255,255,0.05); border-color: rgba(106,138,255,0.4); transform: translateX(4px); }
.em3-job-more__title { font-size: 18px; font-weight: 600; color: #fff; }
.em3-job-more__meta { display: flex; align-items: center; gap: 14px; color: var(--em3-ink-dim); font-size: 13.5px; }
.em3-job-more__chip { border: 1px solid var(--em3-line-soft); border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--em3-ink-muted); white-space: nowrap; }

.em3-job-more__cta { border-top: 1px solid var(--em3-line-soft); padding-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.em3-job-more__cta p { color: var(--em3-ink-muted); font-size: 16px; margin: 0; max-width: 52ch; }
.em3-job-more__ctabtns { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   5. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .em3-job-body__grid { grid-template-columns: 1fr; gap: 40px; }
  .em3-job-aside { position: static; }
  .em3-job-card { max-width: 460px; margin-inline: auto; }
}
@media (max-width: 640px) {
  .em3-job-hero { padding-top: 104px; padding-bottom: 44px; }
  .em3-job-hero__meta { gap: 16px 28px; }
  .em3-job-applybox { padding: 24px 18px; }
  .em3-job-apply[id], .em3-job .em3-section[id] { scroll-margin-top: 72px; }
  .em3-job-applybox .gform_footer .gform_button { width: 100%; justify-content: center; }
  .em3-job-more__link { flex-direction: column; align-items: flex-start; gap: 10px; }
  .em3-job-more__cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .em3-job-hero__title { font-size: clamp(30px, 8.5vw, 40px); }
  .em3-job-hero__meta { gap: 18px 26px; }
  .em3-job-share__links { flex-wrap: wrap; }
}
/* Short viewports (landscape tablet / short desktop window): un-stick the summary
   card so its share row cannot fall below the fold and become unreachable. */
@media (max-height: 640px) {
  .em3-job-aside { position: static; }
}
