/* Apply page: the home page's lavender ground, black ink, white cards and mono labels. */
.apply-page .header { position: absolute; }
.dock .pill .back { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.apply {
  display: grid; grid-template-columns: minmax(0, 5.6fr) minmax(0, 6.4fr); gap: clamp(28px, 4vw, 72px); align-items: start;
  max-width: 1480px; margin: 0 auto; padding: clamp(120px, 12vw, 170px) var(--pad) clamp(56px, 7vw, 100px);
}
.apply-title { margin-top: 14px; font-family: var(--display); font-size: clamp(56px, 7.6vw, 132px); font-weight: 800; line-height: .86; letter-spacing: -.055em; }
.apply-lead { margin-top: 22px; max-width: 30ch; font-family: var(--display); font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }

/* the role being applied for, like a job card turned black */
.apply-role { display: flex; align-items: center; gap: 16px; max-width: 560px; margin-top: 30px; padding: 10px 22px 10px 10px; border-radius: 26px; background: var(--ink); color: #fff; }
.apply-role[hidden] { display: none; }
.apply-role-media { flex: none; width: 112px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #1c1a26; }
.apply-role-media img { width: 100%; height: 100%; object-fit: cover; }
.apply-role .caps { color: rgba(255, 255, 255, .6); }
.apply-role-title { margin: 6px 0 5px; font-family: var(--display); font-size: clamp(22px, 2vw, 30px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }


/* the listing: a white card like the form's, the terms as tiles, then the studio, the role, what
   we offer and how we work, each under a hairline */
.apply-job {
  max-width: 560px; margin-top: 16px; padding: clamp(26px, 3vw, 44px); border-radius: 30px;
  background: #fff; box-shadow: 0 30px 80px rgba(40, 20, 90, .14);
  font-size: 15px; line-height: 1.6; color: var(--muted);
}
.apply-job .apply-job-title { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink); }
.apply-facts { margin-top: 22px; border-top: 1px solid var(--line); }
.apply-facts div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.apply-facts dt { color: var(--muted); opacity: .7; }
.apply-facts dd { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.apply-job .apply-job-note { margin-top: 18px; font-size: 14px; line-height: 1.6; }
.apply-job .apply-job-more { margin-top: 22px; font-size: 14px; }
.apply-job a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.apply-job-sec { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.apply-job-sec[hidden] { display: none; }
.apply-job-h { font-family: var(--display); font-size: clamp(22px, 1.9vw, 27px); font-weight: 800; line-height: 1; letter-spacing: -.035em; color: var(--ink); }
.apply-job h3 { margin-top: 22px; color: var(--ink); }
.apply-job p { margin-top: 12px; }
.apply-job ul { margin-top: 12px; list-style: none; }
.apply-job li { position: relative; padding-left: 22px; }
.apply-job li + li { margin-top: 8px; }
.apply-job li::before { content: '+'; position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 500; color: var(--lav-deep); }
.apply-job b { color: var(--ink); font-weight: 600; }
.apply-offers b { display: block; }
.apply-offers li + li { margin-top: 14px; }

/* the form card */
.apply-card { padding: clamp(22px, 3vw, 44px); border-radius: 30px; background: #fff; box-shadow: 0 30px 80px rgba(40, 20, 90, .14); }
.apply-form-title { display: flex; align-items: center; gap: 10px; }
.apply-form fieldset { margin-top: 30px; border: 0; }
.apply-form legend { width: 100%; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: grid; gap: 8px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.field label span { opacity: .5; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; line-height: 1.35; color: var(--ink);
  background: var(--mist); border: 1px solid transparent; border-radius: 14px; outline: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(58, 49, 86, .45); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--lav-deep); box-shadow: 0 0 0 4px rgba(190, 171, 239, .45); }
.field select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 12px 8px;
}
.field select:invalid { color: rgba(58, 49, 86, .55); }
.field select option { color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.field-hint { justify-self: end; color: var(--muted); }

/* the CV: a box like the other fields, with the real file input laid invisibly over all of it
   (so a click anywhere opens the picker, and a file dropped on it is picked) */
.cv-file {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 51px; padding: 12px 16px;
  background: var(--mist); border: 1px dashed rgba(58, 49, 86, .32); border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.cv-file[hidden] { display: none; }
[data-cv], .cv-file { min-width: 0; } /* a long file name is cut short, it never widens the form */
.field .cv-file input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.cv-file:hover, .cv-file.drag, .cv-file.has-file { border-style: solid; border-color: var(--line); }
.cv-file.drag { background: #fff; border-color: var(--lav-deep); }
.cv-file:focus-within { background: #fff; border-style: solid; border-color: var(--lav-deep); box-shadow: 0 0 0 4px rgba(190, 171, 239, .45); }
.cv-file.bad, .cv-file:has(:user-invalid) { border-style: solid; border-color: #c62250; }
.cv-file.bad:focus-within, .cv-file:has(:user-invalid):focus-within { box-shadow: 0 0 0 4px rgba(198, 34, 80, .18); }
.cv-file-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cv-file-name { flex: 1 1 0; min-width: 0; overflow: hidden; font-size: 16px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.cv-file:not(.has-file) .cv-file-name { color: rgba(58, 49, 86, .7); }
.cv-file-note { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.cv-file.bad .cv-file-note { color: #8f1238; }
.cv-swap {
  justify-self: start; padding: 2px 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px; transition: color .2s;
}
.cv-swap:hover { color: var(--ink); }
.cv-swap[hidden] { display: none; }
/* a field only turns red once the visitor has touched it or tried to submit */
.field :user-invalid { border-color: #c62250; }
.field :user-invalid:focus { box-shadow: 0 0 0 4px rgba(198, 34, 80, .18); }

.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 28px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check input {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 0; appearance: none; cursor: pointer;
  background: var(--mist); border: 1px solid var(--line); border-radius: 7px; transition: background .2s, border-color .2s;
}
.check input::after { content: ''; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { opacity: 1; }
.check input:user-invalid { border-color: #c62250; }

.apply-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.apply-card .pill.dark { height: 52px; padding: 0 26px; }
.apply-how { flex: 1 1 220px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.apply-how[hidden] { display: none; }
.apply-card .pill.dark:disabled { opacity: .55; cursor: progress; transform: none; }
.apply-trap { display: none; }
.apply-error { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: rgba(198, 34, 80, .08); color: #8f1238; font-size: 14px; line-height: 1.5; }
.apply-error[hidden] { display: none; }
.apply-error p { flex: 1 1 260px; }

/* after submitting */
.apply-done:focus { outline: none; }
.apply-done h2 { margin-top: 14px; font-family: var(--display); font-size: clamp(34px, 3.8vw, 58px); font-weight: 800; line-height: .95; letter-spacing: -.05em; }
.apply-done [data-when] > p:not(.caps) { max-width: 52ch; margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.apply-done a:not(.pill) { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.apply-done b { color: var(--ink); font-weight: 600; }
.apply-done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill.line { box-shadow: inset 0 0 0 1px var(--line); }
.pill.line:hover, .pill.line:focus-visible { background: var(--mist); }
.apply-status { min-height: 1.4em; margin-top: 14px; color: var(--muted); }
.apply-preview-label { margin-top: 10px; color: var(--muted); }
.apply-preview {
  max-height: 300px; margin-top: 8px; padding: 16px 18px; overflow: auto; border-radius: 16px; background: var(--mist);
  font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}

.apply-foot { display: flex; justify-content: space-between; gap: 12px; max-width: 1480px; margin: 0 auto; padding: 0 var(--pad) 28px; color: var(--muted); }
.apply-foot a:hover { color: var(--ink); }

/* a soft rise on arrival, like the home page reveals */
.apply-intro, .apply-card { animation: apply-rise 1s var(--ease) both; }
.apply-card { animation-delay: .08s; }
@keyframes apply-rise { from { opacity: 0; transform: translateY(28px); } }

@media (max-width: 980px) {
  .apply { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .apply-grid { grid-template-columns: 1fr; }
  .cv-file-note { flex-basis: 100%; padding-left: 28px; } /* under the name, lined up with it */
  .apply-card, .apply-job { border-radius: 24px; }
  .apply-facts div { grid-template-columns: 76px 1fr; gap: 12px; }
  .apply-card .pill.dark { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .apply-intro, .apply-card { animation: none; }
}

