/* ============================================================
   FRONTLINE HIRING INDEX — research landing page
   A standalone report landing, restyled onto the Cleo design
   system: shared tokens (--blue/--ink/--muted/--line), the
   --display/--body/--mono fonts, and the fluid --sec-pad rhythm.
   Everything is scoped under `.fhi` so the report-specific look
   never leaks into the shared chrome.
   ============================================================ */

.fhi {
  /* Report-only tints not in the global token set. */
  --fhi-blue-tint: #ECEFFE;
  --fhi-blue-tint-2: #D6DCFC;
  --fhi-soft-blue: #8EA0FF; /* accent on the dark (--ink) panels */
}

/* ---- Shared section labels -------------------------------- */
/* Reuse the global .eyebrow (mono, uppercase, blue). Dark panels
   swap to the soft-blue accent, matching the homepage .problem block. */
.fhi .fhi-title {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800; max-width: 640px; margin-top: 12px;
}
.fhi .fhi-sub {
  color: var(--muted); font-size: 1.06rem; max-width: 560px;
  margin-top: 14px; line-height: 1.55;
}

/* ============================================================
   HERO
   ============================================================ */
.fhi-hero { padding: var(--hero-pad-t) 0 var(--sec-pad); overflow: hidden; }
.fhi-hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 56px); align-items: center;
}
.fhi-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--blue-press);
  background: var(--fhi-blue-tint); border: 1px solid var(--fhi-blue-tint-2);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
.fhi-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.fhi-hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem); font-weight: 800; line-height: 1.02;
}
.fhi-hero h1 .accent { color: var(--blue); }
.fhi-lede {
  font-size: 1.15rem; line-height: 1.55; color: var(--muted);
  max-width: 40ch; margin-top: 20px;
}
.fhi-hero__actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.fhi-hero__actions .btn svg { width: 18px; height: 18px; }
.fhi-hero__meta { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.fhi-hero__meta strong { color: var(--ink); font-weight: 600; }

/* Inline share row — sits next to the "Get the full PDF report" CTA so the
   "no email required" reach turns into distribution. Shares the landing page. */
.fhi-share { display: inline-flex; align-items: center; gap: 8px; }
.fhi-share__label {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-right: 2px;
}
.fhi-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--fhi-blue-tint-2); background: var(--fhi-blue-tint);
  color: var(--blue-press); cursor: pointer; position: relative;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.fhi-share__btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-1px); }
.fhi-share__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fhi-share__btn svg { width: 18px; height: 18px; }
.fhi-share__copied {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: var(--ink);
  padding: 4px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; visibility: hidden; transition: opacity .16s ease; pointer-events: none;
}
.fhi-share__copy.is-copied .fhi-share__copied { opacity: 1; visibility: visible; }

@media (max-width: 880px) {
  .fhi-share { flex-wrap: wrap; }
}

/* Dark stat card */
.fhi-card {
  background: var(--ink); color: #fff; border-radius: 26px;
  padding: 30px 28px; position: relative; overflow: hidden;
}
.fhi-card::before {
  content: ""; position: absolute; inset: -40% -10% auto auto;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(26, 60, 242, .55), transparent 65%);
}
.fhi-card__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: #C9C9D1; font-weight: 700; position: relative;
}
.fhi-card__num {
  font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 8vw, 4.75rem);
  color: #fff; line-height: 1; margin: 10px 0 8px; position: relative;
}
.fhi-card__num sup { font-size: .38em; color: var(--fhi-soft-blue); font-weight: 800; top: -1.1em; margin-left: 2px; }
.fhi-card__sub { font-size: .9rem; color: #D8D8DE; line-height: 1.5; max-width: 320px; position: relative; }
.fhi-card__divider { height: 1px; background: rgba(255, 255, 255, .14); margin: 22px 0; }
.fhi-card__row { display: flex; justify-content: space-between; font-size: .84rem; color: #C9C9D1; padding: 7px 0; }
.fhi-card__row b { color: #fff; font-weight: 700; }
.fhi-card__row .up { color: var(--fhi-soft-blue); font-weight: 700; }

@media (max-width: 880px) {
  .fhi-hero__grid { grid-template-columns: 1fr; }
  .fhi-lede { max-width: none; }
}

/* ============================================================
   AT A GLANCE
   ============================================================ */
.fhi-glance { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--sec-pad) 0; }
.fhi-glance__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; flex-wrap: wrap; gap: 10px; }
.fhi-glance__head h2 { font-size: clamp(1.5rem, 3vw, 1.8rem); font-weight: 800; }
.fhi-glance__head span { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); }
.fhi-glance__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
}
.fhi-glance__item { background: #fff; padding: 22px 20px; }
.fhi-glance__num { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.fhi-glance__num.blue { color: var(--blue); }
.fhi-glance__label { font-size: .82rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.fhi-glance__delta { font-family: var(--mono); font-size: .68rem; font-weight: 700; margin-top: 10px; display: inline-block; padding: 3px 9px; border-radius: 999px; }
.fhi-glance__delta.bad { background: var(--fhi-blue-tint); color: var(--blue-press); }
/* Darker on-tint green (matches base.css .form-status--ok) so the small bold
   pill text clears WCAG AA on --verified-tint; raw --green is too light here. */
.fhi-glance__delta.good { background: var(--verified-tint); color: #0a6e4a; }
/* Collapse to 2-up from 900px down so tablet-portrait widths (768/810/820)
   don't render a cramped 4-up grid. */
@media (max-width: 900px) { .fhi-glance__grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   FIVE FINDINGS
   ============================================================ */
.fhi-findings { padding: var(--sec-pad) 0; }
.fhi-findings__list { margin-top: 40px; display: flex; flex-direction: column; }
.fhi-finding { display: grid; grid-template-columns: 110px 1fr; gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); }
.fhi-finding:last-child { border-bottom: 1px solid var(--line); }
.fhi-finding__num { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--fhi-blue-tint-2); line-height: 1; }
.fhi-finding h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.fhi-finding p { color: var(--muted); font-size: .97rem; line-height: 1.6; max-width: 660px; }
@media (max-width: 640px) { .fhi-finding { grid-template-columns: 1fr; gap: 6px; } }

/* ============================================================
   HIDDEN DAYS — signature dark section
   ============================================================ */
.fhi-hd { background: var(--ink); color: #fff; padding: var(--sec-pad) 0; }
.fhi-hd .eyebrow { color: var(--fhi-soft-blue); }
.fhi-hd .fhi-title { color: #fff; }
.fhi-hd .fhi-sub { color: #C9C9D1; }
.fhi-hd__bars { margin-top: 46px; }
.fhi-hd__row { margin-bottom: 26px; }
.fhi-hd__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; gap: 12px; }
.fhi-hd__label { font-weight: 700; font-size: .97rem; }
.fhi-hd__cause { color: #9C9CA6; font-size: .82rem; margin-top: 2px; }
.fhi-hd__days { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--fhi-soft-blue); white-space: nowrap; }
.fhi-hd__track { height: 14px; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; }
.fhi-hd__fill {
  height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--fhi-soft-blue));
  transition: width 1.1s cubic-bezier(.16, 1, .3, 1);
}
.fhi-hd__total {
  margin-top: 34px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px;
}
.fhi-hd__total-num { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.25rem); line-height: 1; }
.fhi-hd__total-num span { color: var(--fhi-soft-blue); }
.fhi-hd__total-label { color: #C9C9D1; font-size: .9rem; max-width: 360px; line-height: 1.5; }

/* ============================================================
   COST + COMPLIANCE PANELS
   ============================================================ */
.fhi-split { padding: var(--sec-pad) 0; }
.fhi-split__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 40px; }
.fhi-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.fhi-panel h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 4px; }
.fhi-panel__sub { font-size: .84rem; color: var(--muted); margin-bottom: 20px; }
.fhi-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: .9rem; gap: 12px; }
.fhi-row:first-of-type { border-top: none; }
.fhi-row .name { font-weight: 600; }
.fhi-row .val { font-family: var(--display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.fhi-row .val.blue { color: var(--blue-press); }
.fhi-tag-risk { font-family: var(--mono); font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; margin-left: 8px; }
.fhi-tag-risk.high { background: var(--fhi-blue-tint); color: var(--blue-press); }
.fhi-tag-risk.med { background: #FFF6E5; color: #9A6700; }
@media (max-width: 760px) { .fhi-split__grid { grid-template-columns: 1fr; } }

/* ============================================================
   DOWNLOAD CTA
   ============================================================ */
.fhi-cta { padding: var(--sec-pad) 0; }
.fhi-cta__card {
  background: linear-gradient(135deg, var(--blue), #3E5BFF);
  border-radius: 28px; padding: clamp(34px, 5vw, 56px) clamp(28px, 4vw, 48px); color: #fff;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 30px; align-items: center;
  position: relative; overflow: hidden;
}
.fhi-cta__card::after {
  content: ""; position: absolute; right: -60px; bottom: -90px;
  width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.fhi-cta__card h2 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.1; }
.fhi-cta__card p { font-size: .97rem; margin-top: 14px; color: rgba(255, 255, 255, .92); max-width: 440px; line-height: 1.55; }
.fhi-cta__form { position: relative; }
.fhi-cta__form .btn { width: 100%; }
.fhi-cta__form .btn svg { width: 18px; height: 18px; }
.fhi-cta__fine { font-size: .78rem; color: #fff; margin-top: 12px; text-align: center; }
@media (max-width: 780px) { .fhi-cta__card { grid-template-columns: 1fr; } }

/* ============================================================
   DOWNLOAD GATE (modal)
   Native <dialog> so focus trapping, Esc, and the top layer come
   for free. Fields reuse the same shape as the .field inputs on
   the form pages; the submit button stays disabled until the name
   and email are valid (see pages/frontline-hiring-index.js).
   ============================================================ */
.fhi-gate {
  border: none; border-radius: 22px; padding: clamp(26px, 4vw, 34px);
  width: min(440px, calc(100vw - 32px)); color: var(--ink); background: #fff;
  box-shadow: 0 24px 60px rgba(13, 13, 18, .22);
  /* The global `* { margin: 0 }` reset wipes the UA's `margin: auto`, which is
     what centres a modal dialog — put it back, and cap the height on short
     viewports so the form can scroll instead of running off-screen. */
  margin: auto; max-height: calc(100dvh - 32px); overflow-y: auto;
}
.fhi-gate::backdrop { background: rgba(11, 20, 55, .55); backdrop-filter: blur(2px); }
.fhi-gate[open] { animation: fhi-gate-in .18s ease-out; }
@keyframes fhi-gate-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .fhi-gate[open] { animation: none; } }

.fhi-gate__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.fhi-gate__close:hover { color: var(--ink); border-color: var(--ink); }
.fhi-gate__close svg { width: 15px; height: 15px; }

.fhi-gate h2 { font-size: 1.55rem; font-weight: 800; margin-top: 10px; }
.fhi-gate__sub { color: var(--muted); font-size: .93rem; margin-top: 10px; line-height: 1.5; }
.fhi-gate__form { margin-top: 20px; }
.fhi-gate .field { margin-bottom: 14px; }
.fhi-gate .field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.fhi-gate .field input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: .7rem .9rem; font-family: inherit; font-size: .92rem; background: #fff;
}
.fhi-gate .field input:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.fhi-gate__submit { width: 100%; margin-top: 4px; }
.fhi-gate__submit[disabled] { opacity: .45; cursor: not-allowed; }
.fhi-gate__fine { font-size: .76rem; color: var(--muted); margin-top: 12px; text-align: center; }
.fhi-gate__fine a { color: var(--blue); text-decoration: underline; }
.fhi-gate .form-status { font-size: .86rem; }
.fhi-gate .form-status .lk { color: inherit; text-decoration: underline; font-weight: 600; }
