/* ============================================================
   Braindoos — Careers page
   Reuses .svhero / .cap / .frame / .cta / section-head from
   styles-sections.css, ai-page.css & service.css.
   Adds: hero stat panel, perks grid, filterable expandable roles.
   ============================================================ */

/* ---------- HERO STAT PANEL ---------- */
.svstat { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.svstat__cell { padding: 18px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.svstat__cell .n { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; color: #fff; }
.svstat__cell .n .suffix { color: var(--accent); }
.svstat__cell .l { margin-top: 5px; font-size: 12.5px; color: rgba(225,233,250,.62); }

/* ---------- PERKS GRID ---------- */
.perks { background: var(--panel); }
.perks__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.perk {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.perk:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.perk__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--primary); background: linear-gradient(135deg, rgba(34,211,238,.15), rgba(59,91,196,.14)); }
.perk__ic svg { width: 23px; height: 23px; }
.perk h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); margin-top: 18px; }
.perk p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin-top: 8px; }

/* ---------- OPEN ROLES ---------- */
.roles__bar { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.roles__group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roles__label { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-200); width: 88px; flex: 0 0 auto; }
.rolechip {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--ink-700);
  padding: 8px 15px; border-radius: 100px; border: 1px solid var(--line-strong); background: #fff;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.rolechip:hover { border-color: var(--accent); color: var(--primary); }
.rolechip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.roles__count { margin-top: 26px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.roles__count b { color: var(--ink); }

.roles__list { margin-top: 14px; border-top: 1px solid var(--line); }
.role { border-bottom: 1px solid var(--line); }
.role.is-hidden { display: none; }
.role__head {
  width: 100%; display: flex; align-items: center; gap: 18px; text-align: left;
  padding: 24px 6px; background: transparent; border: 0; cursor: pointer; font-family: var(--font-body);
}
.role__head:hover .role__title { color: var(--primary); }
.role__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--ink); transition: color .18s ease; flex: 1 1 auto; }
.role__meta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.role__pill { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 100px; background: var(--panel-2); color: var(--ink-700); white-space: nowrap; }
.role__pill--loc { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.role__chev { width: 22px; height: 22px; color: var(--muted-200); flex: 0 0 auto; transition: transform .28s ease; }
.role.is-open .role__chev { transform: rotate(180deg); color: var(--primary); }

.role__body { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.role.is-open .role__body { max-height: 760px; }
.role__inner { padding: 4px 6px 30px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; }
.role__inner p { font-size: 15px; line-height: 1.7; color: var(--ink-700); }
.role__inner h4 { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-200); margin-bottom: 12px; }
.role__resp { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.role__resp li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.55; color: var(--ink-700); }
.role__resp li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.role__aside { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; align-self: start; }
.role__aside .k { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-200); }
.role__aside .v { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); margin: 4px 0 16px; }
.role__aside .btn { width: 100%; justify-content: center; }

.roles__empty { padding: 40px 6px; font-size: 15px; color: var(--muted); display: none; }
.roles__empty.is-shown { display: block; }

@media (max-width: 900px) {
  .perks__grid { grid-template-columns: 1fr; }
  .role__inner { grid-template-columns: 1fr; gap: 22px; }
  .role__head { gap: 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .role__body { transition: none; }
  .role__chev { transition: none; }
  .perk { transition: none; }
}
