/* /careers — page-specific styles. Mirrors the design handoff inline
 * CSS from imaginando-3-0/project/Imaginando Careers.html with tokens
 * hoisted to var(--…). Scoped under `.careers-head`, `.manifesto`,
 * `.perks`, `.studio`, `.roles-wrap`, `.process` so they don't collide
 * with the rest of the sandbox.
 *
 * Sections:
 *   .careers-head      — page header: lede grid + 4-cell .hero-stats
 *   .manifesto         — founder manifesto: sticky aside + body w/ dropcap
 *   .perks / .perk     — 4-up grid of principle cards
 *   .studio / .stile   — 3-tile hatched studio strip
 *   .roles-wrap / .role — open-roles list rows
 *   .process / .step   — 4-step hiring process grid
 *
 * Shared chrome reused from public/style.css:
 *   .page-head, .crumbs, .sec-head, .section-title, .cta-block.
 */

/* ---------- Page-head: bigger H1 cap + 2-col lede grid + stats ---------- */

/* Bigger H1 cap than the global `.page-head h1` so the design's
 * `clamp(60px, 8.2vw, 140px)` "Come build the next instrument." reads at
 * the design scale. Mirrors the about-head bump. */
.careers-head h1 {
  font-size: clamp(56px, 8.4vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.careers-head .hero-lede {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  margin-top: 48px;
  align-items: end;
}
@media (max-width: 900px) {
  .careers-head .hero-lede {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.careers-head .hero-lede .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 48ch;
  margin: 0;
  text-wrap: pretty;
}

/* Override the global `.hero-meta { display: flex; flex-wrap: wrap }` rule
 * in style.css — same scoping pattern as about-head. */
.careers-head .hero-meta {
  display: block;
  margin: 0;
  text-align: right;
  line-height: 1.8;
  color: var(--fg-dim);
}
.careers-head .hero-meta > div {
  display: block;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .careers-head .hero-meta { text-align: left; }
}

.careers-head .hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  margin-top: 48px;
  background: var(--card);
  overflow: hidden;
}
@media (max-width: 760px) {
  .careers-head .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
.careers-head .hero-stats .cell {
  padding: 24px;
  border-right: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.careers-head .hero-stats .cell:last-child { border-right: 0; }
@media (max-width: 760px) {
  .careers-head .hero-stats .cell:nth-child(2) { border-right: 0; }
  .careers-head .hero-stats .cell:nth-child(-n+2) {
    border-bottom: 0.5px solid var(--line);
  }
}
.careers-head .hero-stats .cell .num {
  font-family: var(--display);
  font-weight: 500;
  font-size: 38px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.careers-head .hero-stats .cell .num em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.careers-head .hero-stats .cell .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---------- Section head (page-local variant) ----------
 * The shared `.sec-head` in style.css doesn't paint the right-side
 * `.meta` text as mono uppercase and caps `.section-title` at 32px,
 * but the careers design wants the bigger 60px heading + tiny eyebrow
 * + right-aligned mono caption. Mirrors the affiliate-program variant. */
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.sec-head .l { max-width: 42ch; }
.sec-head .l .index { display: block; margin-bottom: 8px; }
.sec-head h2.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 8px 0 0;
  text-wrap: balance;
}
.sec-head h2.section-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.sec-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
}

/* ---------- Manifesto: sticky aside + body with drop-cap ---------- */

.manifesto {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 1000px) {
  .manifesto { grid-template-columns: 1fr; gap: 40px; }
}
.manifesto-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 1000px) {
  .manifesto-side { position: static; }
}
.manifesto-side .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.manifesto-side h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
.manifesto-side h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.manifesto-body p {
  margin: 0 0 22px;
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.65;
  max-width: 60ch;
  text-wrap: pretty;
}
.manifesto-body p strong {
  color: var(--fg);
  font-weight: 500;
}
/* Drop-cap on the first paragraph — accent serif glyph floated left.
 * Same `_md` array → source-order rendering as about-us so
 * `:first-of-type` lands on the first intro paragraph. */
.manifesto-body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 84px;
  line-height: 0.85;
  float: left;
  padding: 6px 14px 0 0;
  color: var(--accent);
}
.manifesto-body .pull {
  margin: 34px 0;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
  max-width: 36ch;
}
.manifesto-body .pull em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* ---------- Perks: 4-card grid ---------- */

.perks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .perks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .perks { grid-template-columns: 1fr; } }

.perk {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  overflow: hidden;
}
.perk .ix {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-faint);
  letter-spacing: 0.12em;
}
.perk .gly {
  font-family: var(--display);
  font-weight: 500;
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: var(--fg);
}
.perk .gly em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.perk h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.perk h4 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.perk p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
  flex: 1;
}

/* ---------- Studio: 3 tiles, same size ---------- */

.studio {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) { .studio { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .studio { grid-template-columns: 1fr; } }

.stile {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 0.5px solid var(--line);
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, #1a1a20, #0a0a0c);
  display: flex;
  align-items: flex-end;
}
.stile .glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(200, 255, 58, 0.18), transparent 55%);
  pointer-events: none;
}
/* Real photo tile — the image carries the whole card; a bottom scrim keeps
 * the caption legible instead of the CSS hatch + glow (which only apply to
 * image-less tiles, the `else` branch in careers.pug). */
.stile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stile.has-image .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
  pointer-events: none;
}
.stile .cap {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6));
  position: relative;
}
.stile .cap .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.stile .cap .l {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
}
/* A real photo + scrim is always dark, regardless of site theme (same
 * reasoning as .artist.has-banner in the expansion-detail template) — pin
 * the caption to light text so light-theme visitors don't get near-black
 * text over a dark photo. */
.stile.has-image .cap .k { color: rgba(244, 241, 234, 0.7); }
.stile.has-image .cap .l { color: #f4f1ea; }

/* Light-mode tile texture — lower-contrast hatch on a cream gradient,
 * accent-tinted glow so the chip still reads against the bright surface.
 * Image tiles keep the dark photo scrim above regardless of theme. */
:root[data-theme="light"] .stile:not(.has-image) {
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, #ebe7dd, #d8d2c6);
}
:root[data-theme="light"] .stile .glow {
  background: radial-gradient(circle at 30% 30%, rgba(127, 184, 0, 0.22), transparent 55%);
}
:root[data-theme="light"] .stile:not(.has-image) .cap {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

/* ---------- Roles list ---------- */

.roles-wrap { border-top: 0.5px solid var(--line); }

.role {
  display: grid;
  grid-template-columns: 80px 1.4fr 1fr 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px 6px;
  border-bottom: 0.5px solid var(--line);
  transition: background 0.25s ease;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.role:hover { background: color-mix(in oklab, var(--fg) 4%, transparent); }
.role .ix {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.12em;
}
.role .title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0;
}
.role .title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.role .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  margin-top: 6px;
  text-transform: uppercase;
}
.role .meta-cell {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.4;
}
.role .meta-cell .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: block;
  margin-bottom: 4px;
}
.role .meta-cell .sub-line {
  color: var(--fg-faint);
  font-size: 12px;
}
.role .gocta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0.5px solid var(--line-strong);
  font-size: 13.5px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.role:hover .gocta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateX(-4px);
}
.role .gocta .arrow { transition: transform 0.25s ease; }
.role:hover .gocta .arrow { transform: translateX(4px); }

@media (max-width: 1000px) {
  .role {
    grid-template-columns: 60px 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 14px;
  }
  .role .meta-cell { grid-column: 2 / 3; font-size: 13px; }
  .role .meta-cell + .meta-cell { grid-column: 3 / 4; }
  .role .gocta { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .role {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .role .meta-cell,
  .role .meta-cell + .meta-cell { grid-column: 1 / -1; }
  .role .ix { grid-column: 1 / -1; }
}

.roles-empty {
  padding: 36px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.roles-empty .pulse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.roles-empty .pulse .pd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: careers-pulse 1.6s ease-in-out infinite;
}
@keyframes careers-pulse {
  50% { opacity: 0.4; }
}

/* ---------- No open positions: empty state ---------- */

.roles-closed {
  border-top: 0.5px solid var(--line);
  padding: 48px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 640px;
}
.roles-closed .body {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
  color: var(--fg);
  text-wrap: balance;
}

/* ---------- Hiring process: 4-step grid ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

.process .step {
  position: relative;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
}
.process .step .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}
.process .step h5 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.process .step p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 13.5px;
  line-height: 1.55;
  text-wrap: pretty;
  flex: 1;
}
.process .step .when {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
