/* ==========================================================================
   CityFoundry AG — Careers (Karriere)
   Banner, positioning, perks, job list with filter, hiring process, CTA.
   Requires: tokens.css, base.css, components.css
   ========================================================================== */

:root { --cf-zoom-duration: 1.1s; }

body { overflow-x: hidden; }

@keyframes cf-k-fade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes cf-k-up {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

/* --- Banner ------------------------------------------------------------------- */
.cf-khero {
  position: relative;
  background: var(--cf-ink);
  padding: 74px var(--cf-gutter) 92px;
  overflow: hidden;
}

.cf-khero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .15;
}

.cf-khero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--cf-ink) 36%, rgba(4, 33, 31, .5) 100%);
}

.cf-khero__glow {
  position: absolute;
  right: -8%;
  top: -42%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--cf-gradient-conic);
  filter: blur(115px);
  opacity: .22;
}

.cf-khero__grid {
  position: relative;
  max-width: var(--cf-shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 56px;
  align-items: end;
}

.cf-khero__breadcrumb { animation: cf-k-fade .7s ease both; }

.cf-khero__eyebrow {
  margin-bottom: 22px;
  animation: cf-k-fade .7s ease .06s both;
}

.cf-khero__title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  font-size: clamp(38px, 5.2vw, 74px);
  color: var(--cf-white);
}

/* Each line is masked so the words rise into view in turn. */
.cf-khero__line {
  display: block;
  overflow: hidden;
}

.cf-khero__line > span {
  display: block;
  animation: cf-k-up .9s var(--cf-ease) both;
}

.cf-khero__line:nth-of-type(1) > span { animation-delay: .1s; }
.cf-khero__line:nth-of-type(2) > span { animation-delay: .2s; }

.cf-khero__lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.7;
  color: #a9c8c5;
  animation: cf-k-fade .9s ease .35s both;
}

/* --- Section shells ---------------------------------------------------------------- */
.cf-ksection {
  background: var(--cf-white);
  padding: 96px var(--cf-gutter);
}

.cf-ksection--surface { background: var(--cf-surface); }

/* Runs straight into the section below it. */
.cf-ksection--open { padding-bottom: 0; }

/* Closes the page. */
.cf-ksection--last { padding: 0 var(--cf-gutter) 100px; }

.cf-ksection__title {
  margin: 0;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.06;
  font-size: clamp(30px, 3.8vw, 48px);
}

.cf-ksection__head {
  max-width: 620px;
  margin-bottom: 44px;
}

/* --- Positioning ---------------------------------------------------------------------- */
.cf-about-grid {
  max-width: var(--cf-shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 72px;
  align-items: center;
}

.cf-about__title {
  margin: 0 0 22px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.06;
  font-size: clamp(30px, 3.8vw, 48px);
}

.cf-about__p {
  margin: 0;
  max-width: 520px;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--cf-muted);
}

.cf-about__p--gap { margin-bottom: 20px; }

.cf-about__media-wrap { position: relative; }

.cf-about__media {
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.cf-about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Headcount card that overhangs the portrait. */
.cf-about__badge {
  position: absolute;
  left: -26px;
  bottom: 36px;
  max-width: 240px;
  padding: 24px;
  border-radius: 20px;
  background: var(--cf-white);
  box-shadow: 0 28px 60px rgba(4, 33, 31, .16);
}

.cf-about__badge-value {
  margin: 0 0 6px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.04em;
}

.cf-about__badge-label {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--cf-muted);
}

/* --- Perks ------------------------------------------------------------------------------ */
.cf-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cf-perk {
  padding: 32px;
  border-radius: var(--cf-radius-md);
  background: var(--cf-surface);
  transition: transform .4s var(--cf-ease);
}

.cf-perk:hover { transform: translateY(-5px); }

/* `--perk-tint` gives each card its own accent. */
.cf-perk__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--cf-radius-sm);
  background: var(--perk-tint);
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--cf-ink);
  margin-bottom: 18px;
}

.cf-perk__title {
  margin: 0 0 10px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.025em;
}

.cf-perk__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--cf-muted);
}

/* --- Job list ------------------------------------------------------------------------------ */
.cf-jobs__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 38px;
}

.cf-jobs__head-text { max-width: 600px; }

.cf-jobs__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* `--filter-*` carry the selected state. */
.cf-jobs__filter {
  padding: 11px 20px;
  border-radius: var(--cf-radius-pill);
  border: 1px solid var(--filter-border);
  background: var(--filter-bg);
  color: var(--filter-fg);
  font-family: var(--cf-font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s ease;
}

.cf-jobs {
  background: var(--cf-white);
  border-radius: 26px;
  overflow: hidden;
}

.cf-job {
  display: block;
  padding: 32px 34px;
  border-bottom: 1px solid rgba(4, 33, 31, .09);
  text-decoration: none;
  color: var(--cf-ink);
  transition: background .3s ease;
}

.cf-job:hover {
  background: var(--cf-surface);
  color: var(--cf-ink);
}

.cf-job__row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.cf-job__main {
  flex: 1;
  min-width: 0;
}

.cf-job__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* `--job-tint` differs per contract type. */
.cf-job__type {
  padding: 5px 13px;
  border-radius: var(--cf-radius-pill);
  background: var(--job-tint);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cf-job__where {
  font-size: 14.5px;
  color: var(--cf-muted);
}

.cf-job__title {
  display: block;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.cf-job__desc {
  display: block;
  margin-top: 8px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cf-muted);
}

.cf-job__arrow {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--cf-line-ink-16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  transition: all .4s var(--cf-ease);
}

.cf-job:hover .cf-job__arrow {
  background: var(--cf-cyan);
  border-color: var(--cf-cyan);
  transform: rotate(-45deg);
}

/* --- Empty state ------------------------------------------------------------------------------ */
.cf-jobs__empty {
  padding: 52px 34px;
  text-align: center;
}

.cf-jobs__empty-title {
  margin: 0 0 10px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 20px;
}

.cf-jobs__empty-text {
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--cf-muted);
}

.cf-btn--dark {
  gap: 11px;
  padding: 9px 9px 9px 24px;
  background: var(--cf-ink);
  color: var(--cf-white);
  font-size: 16px;
}

.cf-btn--dark:hover { color: var(--cf-white); }

.cf-btn__icon--xs {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.cf-jobs__note {
  margin: 18px 4px 0;
  font-size: 14.5px;
  color: var(--cf-muted);
}

/* --- Hiring process ------------------------------------------------------------------------------ */
.cf-process-grid {
  max-width: var(--cf-shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.cf-process-grid__title {
  margin: 0 0 20px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.06;
  font-size: clamp(30px, 3.6vw, 46px);
}

.cf-process-grid__lead {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--cf-muted);
}

.cf-steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cf-kstep {
  display: flex;
  gap: 26px;
  padding: 32px;
  border-radius: 24px;
  background: var(--cf-surface);
}

/* The final step is inverted to mark the decision. */
.cf-kstep--dark { background: var(--cf-ink); }

.cf-kstep__num {
  flex-shrink: 0;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--cf-link);
}

.cf-kstep--dark .cf-kstep__num { color: var(--cf-cyan); }

.cf-kstep__title {
  margin: 0 0 9px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -.025em;
}

.cf-kstep--dark .cf-kstep__title { color: var(--cf-white); }

.cf-kstep__text {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--cf-muted);
}

.cf-kstep--dark .cf-kstep__text { color: #a9c8c5; }

/* --- Closing CTA -------------------------------------------------------------------------------- */
.cf-kcta {
  position: relative;
  max-width: var(--cf-shell);
  margin: 0 auto;
  border-radius: 32px;
  overflow: hidden;
  background: var(--cf-ink);
}

.cf-kcta__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .2;
}

.cf-kcta__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--cf-ink) 32%, rgba(4, 33, 31, .5) 100%);
}

.cf-kcta__rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--cf-gradient);
}

.cf-kcta__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 48px;
  align-items: center;
  padding: 66px 54px;
}

.cf-kcta__title {
  margin: 0 0 18px;
  font-family: var(--cf-font-head);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.04;
  font-size: clamp(28px, 3.8vw, 48px);
  color: var(--cf-white);
}

.cf-kcta__lead {
  margin: 0;
  max-width: 520px;
  font-size: 18.5px;
  line-height: 1.65;
  color: #a9c8c5;
}

.cf-kcta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-kcta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 10px 10px 26px;
  border-radius: var(--cf-radius-pill);
  font-size: 16.5px;
  font-weight: 500;
  text-decoration: none;
}

.cf-kcta__btn--solid {
  background: var(--cf-cyan);
  color: var(--cf-ink);
  transition: transform .3s ease;
}

.cf-kcta__btn--solid:hover { color: var(--cf-ink); }

.cf-kcta__btn--ghost {
  border: 1px solid rgba(255, 255, 255, .3);
  color: var(--cf-white);
}

.cf-kcta__btn--ghost:hover { color: var(--cf-white); }

.cf-kcta__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cf-ink);
  color: var(--cf-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cf-kcta__icon--veil {
  background: var(--cf-line-light-12);
  color: var(--cf-white);
}

/* --- Responsive ------------------------------------------------------------------------------------ */
@media (max-width: 1040px) {
  .cf-khero__grid,
  .cf-about-grid,
  .cf-process-grid,
  .cf-kcta__grid { grid-template-columns: 1fr; }

  .cf-perks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .cf-perks { grid-template-columns: 1fr; }

  .cf-khero,
  .cf-ksection {
    padding-left: var(--cf-gutter-sm);
    padding-right: var(--cf-gutter-sm);
  }

  .cf-job__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
  }
}
