/* Careers page (/careers): role cards with 3D characters popping out of the top, a detail view, and the application form */
.kc {
  overflow: hidden;
}

.kc__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.kc__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.kc__nav {
  display: flex;
  gap: 22px;
}

.kc__nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.kc__nav-btn svg,
.kc__close svg,
.kc__d-apply svg,
.kc__rail-down svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kc__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.kc__empty {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
}

/* ---- role cards ---- */
.kc__stage {
  position: relative;
  margin-top: 10px;
}

.kc__track {
  display: flex;
  align-items: flex-start; /* every card stays square; the staggered ones just sit lower */
  gap: 34px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* room above the cards for the characters, which pop out of the top */
  padding: 230px 4px 50px;
  margin: 0 -4px;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kc__track::-webkit-scrollbar {
  display: none;
}

.kc__card {
  position: relative;
  flex: 0 0 clamp(240px, 24vw, 300px);
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 26px 50px -22px var(--c2);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
}

/* staggered heights, like a row of shelves */
.kc__card:nth-child(even) {
  margin-top: 46px;
}

.kc__card:hover,
.kc__card:focus-visible {
  transform: translateY(-10px);
  box-shadow: 0 40px 70px -26px var(--c2);
}

.kc__card:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}

.kc__char {
  position: absolute;
  left: 50%;
  bottom: 38%;
  width: 92%;
  height: 112%; /* tops out about half a card above the card, inside the headroom above */
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kc__card:hover .kc__char {
  transform: translateX(-50%) translateY(-8px) scale(1.04);
}

.kc__char img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}

/* shown until a 3D character is uploaded for the role */
.kc__mono {
  margin-bottom: 4%;
  font-size: clamp(90px, 10vw, 140px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 18px 30px rgba(0, 0, 0, 0.3);
}

.kc__card-body {
  position: absolute;
  left: 26px;
  right: 22px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kc__card-title {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
}

.kc__card-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.kc__card-meta b {
  margin-left: 6px;
  color: #fff;
  font-weight: 600;
}

/* ---- detail view ---- */
.kc__stage.is-open .kc__track {
  display: none;
}

.kc__detail {
  position: relative;
  padding-top: 130px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  min-height: 460px;
}

.kc__detail[hidden] {
  display: none;
}

.kc__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.kc__rail-item {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 4px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s ease, font-size 0.3s ease;
}

.kc__rail-item {
  max-height: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kc__rail-item.is-active {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.kc__rail-down {
  margin-top: 6px;
  padding: 8px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.kc__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-top: 70px;
  border-radius: 120px 26px 26px 26px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 40px 80px -40px var(--c2);
  animation: kc-panel 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes kc-panel {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: none; }
}

.kc__detail-char {
  position: relative;
  min-height: 100%;
}

.kc__detail-char img,
.kc__detail-char .kc__mono {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  animation: kc-char 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.kc__detail-char img {
  width: auto;
  max-width: 108%;
  height: 128%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.35));
}

.kc__detail-char .kc__mono {
  bottom: 50%;
  transform: translate(-50%, 50%);
  font-size: clamp(130px, 16vw, 220px);
}

@keyframes kc-char {
  from { opacity: 0; translate: 0 40px; scale: 0.85; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

.kc__panel-copy {
  padding: 46px 44px 44px 10px;
  color: #fff;
}

.kc__d-title {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.05;
  font-weight: 700;
}

.kc__d-meta {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.kc__d-meta b {
  color: #fff;
}

.kc__d-summary {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.65;
}

.kc__d-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.kc__d-cols h6 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kc__d-cols ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.6;
}

.kc__d-cols li {
  list-style: disc;
}

.kc__d-apply {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 600;
  transition: transform 0.25s ease;
}

.kc__d-apply:hover {
  color: #111;
  transform: translateY(-2px);
}

.kc__close {
  position: absolute;
  top: 16px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* basic list when scripts are off */
.kc__list .kc__job {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---- application form ---- */
.kc__form-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  margin-top: clamp(70px, 9vw, 120px);
  scroll-margin-top: 100px;
}

.kc__form-intro p {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.75);
}

.kc__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.kc__field > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.kc__field input,
.kc__field select,
.kc__field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 16px;
}

.kc__field select option {
  color: #111;
}

.kc__field input:focus,
.kc__field select:focus,
.kc__field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.kc__file {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  cursor: pointer;
}

.kc__file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kc__file-btn {
  padding: 11px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
}

.kc__file:focus-within .kc__file-btn {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.kc__file-name {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  word-break: break-all;
}

.kc__submit[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.kc__notice {
  margin-bottom: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
}

.kc__notice--success {
  background: rgba(46, 160, 67, 0.15);
  border: 1px solid rgba(46, 160, 67, 0.5);
  color: #d7f5dc;
}

.kc__notice--danger {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #ffd7db;
}

.kc__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- smaller screens ---- */
@media (max-width: 991px) {
  .kc__form-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .kc__panel {
    grid-template-columns: 1fr;
    border-radius: 80px 22px 22px 22px;
  }

  .kc__detail-char {
    min-height: 280px;
  }

  .kc__detail-char img {
    height: 125%;
  }

  .kc__panel-copy {
    padding: 10px 28px 32px;
  }
}

@media (max-width: 767px) {
  .kc__track {
    gap: 22px;
    padding-top: 200px;
  }

  .kc__card {
    flex-basis: 74%;
  }

  .kc__card:nth-child(even) {
    margin-top: 0;
  }

  .kc__detail {
    padding-top: 56px;
    grid-template-columns: 1fr;
  }

  .kc__rail {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 70px 4px 0;
    scrollbar-width: none;
  }

  .kc__rail-item {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 14px;
  }

  .kc__rail-item.is-active {
    font-size: 16px;
  }

  .kc__rail-down {
    display: none;
  }

  .kc__panel {
    margin-top: 120px;
  }

  .kc__close {
    top: 6px;
  }

  .kc__d-cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kc__track,
  .kc__card,
  .kc__char,
  .kc__panel,
  .kc__detail-char img,
  .kc__detail-char .kc__mono {
    transition: none;
    animation: none;
  }
}
