/* ==========================================================================
   Sections — the job details sidebar
   Depends on: tokens.css, base.css, layout.css

   Figma node 0:4. Design px are noted where a value is non-obvious so the
   mapping back to the file stays auditable.
   ========================================================================== */

.job-panel {
  display: flex;
  flex-direction: column;
  /* 114.452px between the brand lockup and the rest of the column */
  gap: clamp(1rem, 0.9rem + 0.52vw, 1.375rem);   /* was 114.452 */
  align-items: center;
}

@media (min-width: 1024px) {
  .job-panel {
    position: sticky;
    top: var(--page-pad-y);
  }
}

/* --------------------------------------------------------------------------
   Brand lockup
   -------------------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  /* 22.611px */
  gap: clamp(0.5rem, 0.46rem + 0.21vw, 0.75rem);   /* was 22.611 */
  width: 100%;
}

.brand__mark {
  /* 109.748px */
  width: clamp(2.5rem, 2.2rem + 1.04vw, 3.25rem);  /* was 109.748 */
  height: auto;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  /* 19.838px */
  gap: clamp(0.0625rem, 0.05rem + 0.1vw, 0.1875rem);
  justify-content: center;
}

.brand__name {
  font-size: var(--fs-brand);
  font-weight: var(--fw-medium);
  line-height: 1;
  color: var(--c-white);
  letter-spacing: 0.01em;
}

.brand__tagline {
  font-size: var(--fs-tagline);
  font-weight: var(--fw-book);
  line-height: 1;
  color: var(--c-grey-400);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Column body
   -------------------------------------------------------------------------- */
.job-panel__body {
  display: flex;
  flex-direction: column;
  gap: clamp(0.875rem, 0.79rem + 0.42vw, 1.125rem); /* was 53 */
  width: 100%;
}

/* Salary, meta list and perks share the column rhythm. */
.job-panel__cards {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 0.69rem + 0.31vw, 0.9375rem); /* was 53 */
}

/* --------------------------------------------------------------------------
   "We're Hiring" pill
   -------------------------------------------------------------------------- */
.hiring-pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.375rem, 0.35rem + 0.16vw, 0.5rem);  /* was 15.502 */
  align-self: flex-start;
  padding: clamp(0.25rem, 0.2rem + 0.2vw, 0.283rem)
           clamp(0.75rem, 0.6rem + 0.6vw, 1.25rem);
  background: rgba(4, 28, 67, 0.05);
  border: 1px solid var(--border-panel);
  border-radius: var(--r-pill);
  backdrop-filter: blur(3.229px);
  -webkit-backdrop-filter: blur(3.229px);
}

.hiring-pill__icon {
  /* 62.006px glyph inside a 70.403px pill */
  width: clamp(1.125rem, 1.03rem + 0.47vw, 1.5rem);   /* was 62 */
  height: clamp(1.125rem, 1.03rem + 0.47vw, 1.5rem);
  background: var(--grad-hiring);
}

.hiring-pill__label {
  font-size: var(--fs-hiring);
  font-weight: var(--fw-medium);
  line-height: 1;
  color: var(--c-white);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Role headline + intro
   -------------------------------------------------------------------------- */
.job-intro {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 0.23rem + 0.1vw, 0.375rem);  /* was 10.334 */
}

.job-intro__title {
  font-size: var(--fs-headline);
  font-weight: var(--fw-semi);
  line-height: 1.05;
  color: var(--c-white);
}

.job-intro__text {
  font-size: var(--fs-body);
  font-weight: var(--fw-book);
  /* 43px leading on 24px type */
  line-height: 1.79;
  color: var(--c-white);
}

/* --------------------------------------------------------------------------
   Shared panel treatment (salary + perks)
   -------------------------------------------------------------------------- */
.panel {
  border: 1px solid var(--border-panel);
  border-radius: var(--r-panel);
  padding: var(--panel-pad);
  backdrop-filter: blur(3.229px);
  -webkit-backdrop-filter: blur(3.229px);
}

/* --------------------------------------------------------------------------
   Salary panel
   -------------------------------------------------------------------------- */
.salary {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.46rem + 0.21vw, 0.75rem);  /* was 23.898 */
  background: var(--c-navy-900);
  box-shadow: var(--shadow-panel);
}

.salary__badge {
  display: grid;
  place-items: center;
  /* 99.468px */
  width: clamp(2.25rem, 2.05rem + 0.73vw, 2.75rem);   /* was 99.468 */
  height: clamp(2.25rem, 2.05rem + 0.73vw, 2.75rem);
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-icon);
}

.salary__glyph {
  /* 60px glyph inside the 99.468px badge */
  width: 60%;
  height: 60%;
  background: var(--c-white);
}

.salary__body {
  display: flex;
  flex-direction: column;
  gap: clamp(0.0625rem, 0.05rem + 0.1vw, 0.1875rem); /* was 9.043 */
  min-width: 0;
}

.salary__label,
.salary__note {
  font-size: var(--fs-meta-label);
  font-weight: var(--fw-book);
  line-height: 1.3;
  color: var(--c-white);
}

.salary__amount {
  font-size: var(--fs-salary);
  font-weight: var(--fw-semi);
  line-height: 1;
  letter-spacing: var(--ls-salary);
  color: var(--c-white);
}

.salary__cap {
  font-size: var(--fs-body);
  font-weight: var(--fw-book);
  line-height: 1.3;
  color: var(--c-cyan);
}

/* --------------------------------------------------------------------------
   Meta list (location / department / shift)
   -------------------------------------------------------------------------- */
.job-meta {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 0.46rem + 0.21vw, 0.75rem); /* was 25.836 */
}

.job-meta__row {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.46rem + 0.21vw, 0.6875rem); /* was 19.377 */
}

.job-meta__badge {
  display: grid;
  place-items: center;
  width: var(--meta-badge);
  height: var(--meta-badge);
  flex-shrink: 0;
  background: rgba(4, 28, 67, 0.56);
  border: 1px solid var(--border-panel);
  border-radius: 0.362rem;              /* 5.795 */
  box-shadow: 0 0 0.447rem var(--c-cyan-glow);
  backdrop-filter: blur(1.449px);
  -webkit-backdrop-filter: blur(1.449px);
}

.job-meta__glyph {
  /* 40.691px glyph in a 51.672px badge */
  width: 78%;
  height: 78%;
  background: var(--grad-meta);
}

.job-meta__label {
  display: block;
  font-size: var(--fs-meta-label);
  font-weight: var(--fw-book);
  line-height: 1.2;
  color: var(--c-grey-400);
}

.job-meta__value {
  display: block;
  font-size: var(--fs-meta-value);
  font-weight: var(--fw-book);
  line-height: 1.3;
  color: var(--c-white);
}

/* --------------------------------------------------------------------------
   Perks panel
   -------------------------------------------------------------------------- */
.perks {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 0.46rem + 0.21vw, 0.6875rem); /* was 20.669 */
  background: rgba(4, 28, 67, 0.14);
  box-shadow: var(--shadow-panel-lg);
}

.perks__title {
  font-size: var(--fs-perks-head);
  font-weight: var(--fw-book);
  line-height: 1.2;
  color: var(--c-white);
}

.perks__list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.3125rem, 0.29rem + 0.1vw, 0.4375rem); /* was 14.856 */
}

.perks__item {
  display: flex;
  align-items: center;
  gap: clamp(0.4375rem, 0.4rem + 0.21vw, 0.625rem); /* was 21.96 */
}

.perks__icon {
  /* 25.836px */
  width: clamp(0.875rem, 0.83rem + 0.21vw, 1.0625rem);  /* was 25.836 */
  height: clamp(0.875rem, 0.83rem + 0.21vw, 1.0625rem);
  background: var(--c-grey-400);
}

.perks__label {
  font-size: var(--fs-perk);
  font-weight: var(--fw-book);
  line-height: 1.35;
  color: var(--c-grey-400);
}

/* --------------------------------------------------------------------------
   Below lg the sidebar becomes a compact header band
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .job-panel {
    gap: 1.75rem;
  }

  .job-panel__body {
    gap: 1.5rem;
  }

  /* Salary and perks side by side on tablet to save vertical space. */
  .job-panel__cards {
    display: grid;
    gap: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .job-panel__cards {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
