/* Careers: hero, roles and the account-free application. Values follow Bora Careers.dc.html and
   Bora Application Form.dc.html; fields follow the backend application contract. */

html { scroll-behavior: smooth; }
#apply { scroll-margin-top: 64px; }
@container page (width >= 860px) { #apply { scroll-margin-top: 100px; } }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--terra-deep); }

/* Hero */
.careers-hero { display: flex; flex-direction: column; padding: 36px 20px 0; }
.ch-side { display: contents; }
.ch-eyebrow { order: 1; }
.ch-title {
  order: 2; margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(76px, 23cqw, 104px); line-height: .84;
  letter-spacing: -.045em;
}
.ch-title .line { display: block; animation: var(--rise); }
.ch-title .l1 { animation-delay: .05s; }
.ch-title .l2 { animation-delay: .18s; font-style: italic; color: var(--terra); }
.ch-photos { order: 3; position: relative; height: 440px; margin: 36px -20px 0; }
.ch-fig img { width: 100%; height: 100%; object-fit: cover; }
.ch-fig--a { position: absolute; left: 0; top: 0; width: 62%; height: 360px; }
.ch-fig--c { position: absolute; right: 20px; bottom: 0; width: 44%; height: 260px; border: 6px solid var(--cream); }
.ch-caption { order: 4; margin-top: 10px; font-size: 12px; color: var(--body-2); }
.ch-intro { order: 5; margin-top: 24px; font-size: 18px; line-height: 1.6; color: var(--olive); }
@container page (width >= 860px) {
  .careers-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 72px 48px 0; }
  .ch-title { grid-column: 1 / span 8; grid-row: 1; align-self: end; margin: 0; font-size: clamp(112px, 13cqw, 208px); }
  .ch-title .l2 { padding-left: 12cqw; }
  .ch-side { display: block; grid-column: 9 / span 4; grid-row: 1; align-self: end; padding-bottom: 16px; }
  .ch-eyebrow { font-size: 13px; }
  .ch-intro { margin-top: 16px; font-size: 19px; text-wrap: pretty; }
  .ch-cta { margin-top: 24px; }
  .ch-photos { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; height: auto; margin: 72px 0 0; align-items: start; }
  .ch-fig--a { position: static; grid-column: 1 / span 4; width: auto; height: auto; }
  .ch-fig--a img { height: 600px; object-position: 50% 40%; }
  .ch-fig--b { grid-column: 5 / span 5; margin-top: 160px; }
  .ch-fig--b img { height: 420px; object-position: 50% 45%; }
  .ch-fig--b figcaption { margin-top: 10px; font-size: 13px; color: var(--body-2); }
  .ch-fig--c { position: static; grid-column: 10 / span 3; width: auto; height: auto; margin-top: -40px; border: 0; }
  .ch-fig--c img { height: 480px; object-position: 50% 40%; }
}

/* Roles */
.roles { padding: 64px 20px 56px; }
.roles h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 12cqw, 52px); line-height: 1; letter-spacing: -.03em; }
.roles h2 em { color: var(--terra); }
.roles-head p { margin-top: 24px; max-width: 34ch; font-size: 17px; line-height: 1.6; color: var(--olive); }
.roles-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.roles-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.roles-list h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.roles-list p { margin-top: 4px; font-size: 15px; color: var(--body-2); }
.roles-list .num { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--terra-deep); }
@container page (width >= 860px) {
  .roles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; padding: 140px 48px 120px; }
  .roles-head { grid-column: 1 / span 4; }
  .roles h2 { font-size: clamp(56px, 5.4cqw, 84px); line-height: .98; }
  .roles-list { grid-column: 6 / span 7; margin: 0; }
  .roles-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 28px 0; }
  .roles-list h3 { font-size: 44px; line-height: 1; }
  .roles-list p { margin: 0; font-size: 17px; line-height: 1.55; }
}

/* Apply */
.apply { padding: 56px 20px 72px; background: var(--cream-lift); border-top: 1px solid var(--line); }
.apply-side h2 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 76px; line-height: .9; letter-spacing: -.04em; color: var(--terra); }
.apply-lede { margin: 12px 0 28px; font-size: 15px; line-height: 1.55; color: var(--olive); }
.apply-eyebrow { margin-top: 32px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--olive); }
.apply-steps { margin: 36px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.apply-steps li { display: grid; grid-template-columns: 40px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.apply-steps li > span { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--terra); }
.apply-main { container: apply / inline-size; }
@container page (width >= 860px) {
  .apply { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; padding: 120px 48px 140px; }
  .apply-side { grid-column: 1 / span 4; align-self: start; position: sticky; top: 132px; }
  .apply-side h2 { font-size: clamp(88px, 8.4cqw, 132px); line-height: .88; }
  .apply-main { grid-column: 6 / span 7; }
}

/* Phase 1 (LAUNCH-4): the owner's exact notice stands where the form will be; the form styles below stay for the
   Phase 2 restore (see phase2/README.md). */
.apply-notice {
  max-width: 34ch; margin-top: 32px; padding-top: 24px; border-top: 1.5px solid var(--ink); font-family: var(--serif);
  font-size: clamp(24px, 6.4cqw, 30px); line-height: 1.3; letter-spacing: -.01em; color: var(--ink);
} /* margin-top keeps the rule clear of the italic "Apply" descenders above it on mobile */
@container page (width >= 860px) { .apply-notice { margin-top: 0; padding-top: 32px; font-size: clamp(30px, 2.6cqw, 40px); } }

/* Form */
.apply-form { display: flex; flex-direction: column; gap: 36px; font-family: var(--sans); color: var(--ink); }
.fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.fs > legend { padding: 0; margin-bottom: 18px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--terra-deep); }
.fs > legend .req, .sub > legend .req { letter-spacing: .04em; text-transform: none; font-weight: 400; color: var(--body-2); }
#f-role > legend { margin-bottom: 6px; }
.req { font-weight: 400; color: var(--body-2); }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .file-label { font-size: 16px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  height: 56px; padding: 0 16px; font-size: 17px; color: var(--ink); background: var(--cream-lift); border: 1.5px solid var(--input);
  border-radius: 3px; outline: none;
}
.field select { padding: 0 14px; }
.field textarea { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--terra) !important; box-shadow: 0 0 0 4px rgba(168, 94, 57, .2); }
.field [aria-invalid="true"] { border-color: var(--error) !important; }
.field--date { max-width: 280px; margin-top: 24px; }
.field--select { max-width: 360px; }
.field--wide { margin-top: 20px; }
.field-hint { font-size: 14px; line-height: 1.45; color: var(--body-2); }
.field-error { font-size: 14px; font-weight: 600; color: var(--error); }
.field-error:empty { display: none; }
.field-error--top { margin: 0 0 12px; min-height: 20px; }
.field-error--top:empty { display: block; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; min-height: 112px; padding: 18px; border: 1.5px solid var(--input); border-radius: 3px;
  background: var(--cream-lift); color: var(--ink); cursor: pointer;
}
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile-name { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.tile input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--terra); }
.tile-desc { font-size: 14px; line-height: 1.45; color: var(--body-2); }
.tile:has(input:checked) { background: var(--olive); border-color: var(--olive); color: var(--cream-lift); }
.tile:has(input:checked) .tile-desc { color: var(--on-olive); }
.tile:has(input:focus-visible), .chip:has(input:focus-visible) { outline: 3px solid var(--terra); outline-offset: 3px; }
#f-role[data-invalid] .tile:not(:has(input:checked)) { border-color: var(--error); }

.sub { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.sub > legend { padding: 0; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border: 1.5px solid var(--input); border-radius: 3px;
  background: var(--cream-lift); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
}
.chip--day { min-width: 76px; padding: 0 14px; }
.chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--terra); }
.chip:has(input:checked) { background: var(--olive); border-color: var(--olive); color: var(--cream-lift); }
.sub[data-invalid] .chip:not(:has(input:checked)) { border-color: var(--error); }

.drop {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 20px; border: 1.5px dashed var(--input);
  border-radius: 3px; background: var(--cream-lift);
}
.drop[data-over] { border-color: var(--terra); background: var(--cream); }
.drop[data-invalid] { border-color: var(--error); }
.attach {
  display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 3px;
  font-size: 14px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.drop:has(.file-input:focus-visible) .attach { outline: 3px solid var(--terra); outline-offset: 3px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-hint { font-size: 14px; color: var(--body-2); }
.file-chosen {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1.5px solid var(--olive);
  border-radius: 3px; background: var(--cream-lift); font-size: 16px;
}
.file-size { color: var(--body-2); }
.file-remove { height: 44px; padding: 0 12px; background: none; border: 0; font-size: 15px; font-weight: 700; color: var(--terra-deep); text-decoration: underline; cursor: pointer; }

.consent { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 3px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--terra); }
.consent label { position: relative; font-size: 16px; font-weight: 600; }
/* The label is the checkbox's 44px target; the transparent box keeps the text where it is. */
.consent label::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(100%, 48px); transform: translateY(-50%); }
.consent p { grid-column: 2; font-size: 14px; line-height: 1.5; color: var(--body-2); }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 28px; border-top: 1.5px solid var(--ink); }
.submit-btn { height: 60px; padding: 0 32px; background: var(--terra); color: var(--cream-lift); }
.submit-btn:disabled { background: var(--input); cursor: progress; }
.submit-row p { flex: 1; min-width: 220px; font-size: 14px; line-height: 1.55; color: var(--body-2); }
.submit-row a { color: var(--terra-deep); }

.form-alert { padding: 20px 22px; background: var(--error-bg); border-top: 3px solid var(--error); }
.form-alert-title { font-size: 17px; font-weight: 700; color: var(--error-deep); }
.form-alert ul { margin: 10px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.7; }
.form-alert a { color: var(--error-deep); }
.form-alert li a { display: block; padding: 9px 0; } /* each summary link is a 44px+ row; the bullet stays on its first line */
.form-alert-text { margin-top: 6px; font-size: 16px; line-height: 1.6; color: var(--ink); }

.apply-form[aria-busy="true"] :is(.tile, .chip, .attach, .file-remove) { cursor: progress; } /* answers locked while sending */

.apply-success { padding: 32px; background: var(--olive); color: var(--cream); border-radius: 2px; }
.ok-tr { font-family: var(--serif); font-style: italic; font-size: clamp(56px, 10cqw, 96px); line-height: .9; color: var(--sand); }
.ok-title { margin-top: 20px; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5cqw, 44px); line-height: 1.1; }
.ok-list { margin-top: 28px; border-top: 1px solid var(--olive-line); }
.ok-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--olive-line); }
.ok-list dt { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.ok-list dd { font-size: 17px; overflow-wrap: anywhere; text-align: right; }
.ok-note { margin-top: 24px; max-width: 52ch; font-size: 17px; line-height: 1.6; color: var(--on-olive); }
.ok-back { height: 52px; margin-top: 28px; padding: 0 22px; border: 1.5px solid var(--cream); color: var(--cream); background: transparent; font-size: 14px; }
@container apply (width >= 560px) { .apply-success { padding: clamp(32px, 6cqw, 64px); } }

/* Hover colour changes only where hover exists, so taps do not leave buttons stuck in their hover state. */
@media (hover: hover) {
  .attach:hover { background: var(--ink); color: var(--cream-lift); }
  .submit-btn:hover { background: var(--terra-deep); color: var(--cream-lift); }
  .ok-back:hover { background: var(--cream); color: var(--ink); }
}
