/* Careers (careers.html) and Apply (careers/apply.html), on core.css + inner.css. Written for the v2 system: the
   page head, chapter heads, numbered columns (.model), buttons and form fields come from the shared files; this file
   adds the icon in each column, the Open Application close with the skyline, and the application form's layout and
   its extra field types. Hidden start states exist only under html.motion and stay inside [data-r] > * (core's
   failsafe and print rules cover them). */

/* == CAREERS: WHY EDGEWATER == */
/* each column: rule, number and icon on one row, title, the lead line in navy, the text in slate */
.why-list .model-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; }
.why-list .model-item > h3, .why-list .model-item > p { grid-column: 1 / -1; }
.why-list .model-item > .model-n { grid-column: 1; grid-row: 1; align-self: start; margin: 0; padding-top: 2px; }
.why-list .model-item > .why-ico { grid-column: 2; grid-row: 1; width: 40px; height: 40px; color: var(--navy); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* one line for "The Edgewater Standard" up to 1920 px (fix round 2, D2-07) */
.why-list h3 { margin: 26px 0 0; font-size: clamp(22px, 1.85vw, 26px); }
/* the line icons index the four columns; numbers under the chapter's own "01" read as a stutter (one set only) */
.why-list .model-n { display: none; }
.why-list .model-item > .why-ico { grid-column: 1; justify-self: start; }
.why-lead { margin-top: 12px; font: 500 16.5px/1.5 var(--sans); color: var(--navy); text-wrap: pretty; }
.why-list .why-lead + p { margin-top: 12px; font-size: 15.5px; }
/* two or more across: the title, lead and text rows line up from column to column */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 768px) {
    .why-list { row-gap: 0; }
    .why-list .model-item { grid-row: span 4; grid-template-rows: subgrid; padding-bottom: 48px; }
  }
  @media (min-width: 1200px) { .why-list .model-item { padding-bottom: 0; } }
}
/* the icon arrives just after its column */
html.motion .why-list .why-ico { transition: opacity .7s var(--ease) calc(var(--d, 0s) + .18s), transform .9s var(--ease) calc(var(--d, 0s) + .18s); }
html.motion .why-list [data-r]:not(.in) > .why-ico { opacity: 0; transform: translateY(8px) scale(.94); }
.why-more { margin-top: clamp(44px, 4.4vw, 64px); }

/* == CAREERS: OPEN APPLICATION (the close; the skyline sits on the footer) == */
.open { padding-bottom: 0; }
.open .ch-head { margin-bottom: 0; }
.open-sub { margin-top: 22px; max-width: 36em; }
.open-cta { margin-top: clamp(28px, 3vw, 40px); }
.coda { margin-top: clamp(56px, 5.4vw, 88px); overflow: hidden; }
.coda img { width: min(100%, 1040px); margin-inline: auto; }
html.motion .coda img { transition: transform 1s var(--ease); }
html.motion .coda:not(.in) img { transform: translateY(101%); }

/* == APPLY: the form on columns 1 to 8 (the offices sit in the head's water strip, as on Careers) == */
.apply { padding-top: clamp(40px, 4.4vw, 64px); }
.apply-grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: clamp(34px, 3.4vw, 50px); }
.apply-main { grid-column: 1 / span 8; min-width: 0; }
/* the navy rule frames the form only (fix round 2, D2-08): a head with no label is the rule alone (phase 5) */
@media (min-width: 1024px) { .apply-grid > .ch-rule { grid-column: 1 / span 8; } }

/* the submit button and the privacy line share a row; the status region spans it */
.apply-form { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: center; }
.apply-form > * { grid-column: 1 / -1; }
.apply-form > .apply-submit { grid-column: 1; margin-top: 10px; }
.apply-form > .apply-privacy { grid-column: 2; margin-top: 10px; }
.apply-form ::placeholder { color: #6B7682; opacity: 1; }
.apply-form .form-group { margin-bottom: 28px; }
/* the break before the documents is space, not a line: a rule here read as one more empty field */
.apply-divider { height: 0; margin: 14px 0 26px; border: 0; }

/* selects: a role waits for an office (disabled until then) */
/* an empty required select reads as a prompt, in the placeholder colour; its options stay ink */
.apply-form select:required:invalid { color: #6B7682; }
.apply-form option { color: var(--ink); }
.apply-form select:disabled { color: var(--label); border-bottom-style: dashed; cursor: not-allowed; opacity: 1; }
/* "Other" opens a second line under the source select */
.field--other input { padding-top: 8px; }

/* the work-authorization question appears for New York and San José (the script toggles .is-visible) */
.apply-conditional { display: none; }
.apply-conditional.is-visible { display: block; margin: -8px 0 28px; }
.apply-checkbox-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--stone); }
html.motion .apply-conditional.is-visible .apply-checkbox-row { animation: applyIn .5s var(--ease) both; }
@keyframes applyIn { from { opacity: 0; transform: translateY(-6px); } }
.apply-form .apply-checkbox-row input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; border: 1.5px solid var(--navy); background: #fff; cursor: pointer; transition: background-color .2s; }
.apply-form .apply-checkbox-row input[type="checkbox"]:checked { background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5' fill='none' stroke='%23FFFFFF' stroke-width='1.6'/%3E%3C/svg%3E") center / 13px 13px no-repeat; }
.apply-form .apply-checkbox-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.apply-form .apply-checkbox-row label { margin: 0; font: 400 15.5px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }

/* file inputs: the picker as a small outlined button on the field's rule */
.apply-form input[type="file"] { padding: 9px 0 10px; font-size: 15px; color: var(--slate); cursor: pointer; }
.apply-form input[type="file"]::file-selector-button { height: 36px; margin-right: 16px; padding: 0 16px; border: 1px solid var(--navy); border-radius: 0; background: #fff; color: var(--navy); font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: background-color .25s var(--ease-ui), color .25s var(--ease-ui); }
.apply-form input[type="file"]:hover::file-selector-button, .apply-form input[type="file"]:focus-visible::file-selector-button { background: var(--navy); color: #fff; }

/* submit: no sweep while sending or once sent (the script disables it and dims a sent button) */
.apply-submit:disabled::before { transform: translateX(-100%); }
.apply-submit[data-locked] { cursor: default; }
.apply-privacy { font-size: 14px; line-height: 1.55; color: var(--label); }
.apply-privacy a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: .24em; transition: text-decoration-color .2s; }
.apply-privacy a:hover { text-decoration-color: currentColor; }
/* the status region is in the layout and the accessibility tree from load, empty; the script fills it and sets
   display: block, so its message is announced reliably */
.apply-success { margin-top: 24px; padding: 16px 20px; background: var(--stone); border-left: 2px solid var(--navy); color: var(--navy); font-size: 15.5px; line-height: 1.5; }
.apply-success:empty { margin: 0; padding: 0; border: 0; }

/* == RESPONSIVE == */
@media (max-width: 1023px) {
  .apply-main { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .why-list .model-item > .why-ico { width: 36px; height: 36px; }
  .why-list h3 { margin-top: 20px; }
  /* the coda bleeds to the screen edges and shows the homepage hero's window (12.5%-92.5%) */
  .coda.wrap { width: 100%; }
  .coda img { width: 125vw; max-width: none; margin-left: -15.6vw; }
  .apply-form { grid-template-columns: minmax(0, 1fr); }
  .apply-form > .apply-submit { justify-content: center; }
  .apply-form > .apply-privacy { grid-column: 1; margin-top: 18px; }
}

/* == FORCED COLOURS AND PRINT == */
@media (forced-colors: active) {
  /* icons in the system text colour (author navy vanishes on a dark theme; core.css covers the rules and selects) */
  .why-list .model-item > .why-ico { color: CanvasText; }
  .apply-form .apply-checkbox-row input[type="checkbox"] { forced-color-adjust: auto; appearance: auto; -webkit-appearance: auto; }
  .apply-form input[type="file"]::file-selector-button { border-color: ButtonText; }
}
@media print {
  .coda { display: none; }
  .why-list .why-ico { opacity: 1 !important; transform: none !important; }
  .apply-form input[type="file"]::file-selector-button { border-color: var(--ink); }
}
