/* ═══════════════════════════════════════════════════════════════════════
   fressocafe.com / Jobs — the application that replaced the Google Form.

   One page, read top to bottom: the greeting, whether we are hiring, the
   team at the brewer, why Fresso, what the job asks of you, and the form.
   It speaks the contact page's language on purpose. Every field is a
   hairline whose label lifts out of the way; the field being written in
   draws an ink line in from the left; errors are ink, never red; and the
   one green on the page is the dot that says we are hiring and the petal
   that says the application is with us.

   Whether we are hiring is NOT this file's guess. The server writes yes or
   no onto .jobs[data-hiring] per request, and everything that depends on
   it below is a selector on that attribute, so the page is right with no
   script at all. "unknown" (the switch could not be read) keeps the whole
   hiring band out of sight and the form open; jobs.js then asks
   /api/site/jobs, and the band opens once there is an answer to give.

   Without a script the form still posts. The server answers with a 303 to
   /jobs#sent or /jobs#trouble, and :target puts that block where the form
   was, exactly as on /contact. This file loads after site.css, takes its
   tokens and its classes, and must never restyle anything outside .jobs.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── The hiring switch ───────────────────────────────────────────────────
   yes: the form. no: the closed note in its place. unknown: the form, and
   no hiring band until there is an answer. */
.jobs-closed { display: none; }
.jobs[data-hiring="no"] .jobs-apply { display: none; }
.jobs[data-hiring="no"] .jobs-closed { display: block; }
/* Somebody whose application arrived just as the switch went off still
   lands on #sent, and should read "Thank you", not "check back later". */
.jobs[data-hiring="no"]:has(#sent:target) .jobs-apply { display: block; }
.jobs[data-hiring="no"]:has(#sent:target) .jobs-closed { display: none; }

/* ─── Greeting ────────────────────────────────────────────────────────── */
.jobs-page .jobs-intro { padding-top: calc(var(--header-h) + clamp(48px, 9vw, 120px)); }
.jobs-intro .lede { margin-top: 20px; max-width: 34rem; }

/* ─── Are we hiring right now? ────────────────────────────────────────────
   A ruled band. A phone reads the question and the answer under it; a wide
   screen sets them on the FAQ grid the sections below share, so the answer
   starts on the same line as the list, the paragraph and the form. */
.jobs-status {
  margin-top: clamp(40px, 7vw, 72px);
  padding-block: clamp(24px, 3vw, 36px) clamp(26px, 3.2vw, 38px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  row-gap: 10px;
}
@media (min-width: 900px) {
  .jobs-status { align-items: center; }
  .jobs-status > :first-child { position: static; }
}

/* The whole band, question and answer, opens through its grid row once the
   answer is known: a page that had to ask shows neither a question it
   cannot answer nor a gap while it waits, and never jumps when it hears.
   When it never hears (no script, or a switch the server still cannot
   read) the band simply is not there. The clip is only there while the row
   is closed or opening: open, it would cut the band's rise as the page
   arrives. flow-root keeps the band's margin inside the row, so the height
   it opens to is the height it keeps. */
.jobs-status-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s var(--ease); }
.jobs-status-clip { display: flow-root; min-height: 0; transition: opacity .5s var(--ease-soft) .12s; }
.jobs[data-hiring="unknown"] .jobs-status-wrap { grid-template-rows: 0fr; }
.jobs[data-hiring="unknown"] .jobs-status-clip,
.jobs-status-wrap.is-opening > .jobs-status-clip { overflow: hidden; }
.jobs[data-hiring="unknown"] .jobs-status-clip { opacity: 0; visibility: hidden; transition: none; }

.jobs-answer {
  margin: 0;
  align-items: flex-start; gap: 11px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.5; color: var(--ink);
}
/* The dot sits on the middle of the FIRST line, however many there are. */
.jobs-answer .dot { margin-top: calc((1.5em - 7px) / 2); transition: background-color .4s var(--ease-soft); }
.jobs[data-hiring="no"] .jobs-answer .dot { background: var(--ink-3); }
.jobs-answer-words { min-width: 0; }
/* The sentence and its link share a line where there is room; on a phone
   the link drops under the sentence and starts where the sentence does. */
.jobs-yes { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 22px; row-gap: 6px; }
.jobs-no,
.jobs[data-hiring="no"] .jobs-yes { display: none; }
.jobs[data-hiring="no"] .jobs-no { display: inline; }

/* ─── Sections ────────────────────────────────────────────────────────────
   One measure of air between neighbours, and one more under the last. */
.jobs-why, .jobs-expect, .jobs-apply, .jobs-closed { padding-top: var(--section); }
.jobs-apply, .jobs-closed { padding-bottom: var(--section); }

/* Why Fresso: the owner's four sentences, one to a ruled row. */
.jobs-list li {
  padding: clamp(20px, 2.4vw, 28px) 0 clamp(22px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.5; color: var(--ink);
  text-wrap: pretty;
}
.jobs-list li:first-child { border-top: 1px solid var(--line); }

.jobs-expect .lede { max-width: 40rem; }

/* Apply: on a wide screen the heading and its line stay in view beside the
   form (the FAQ grid's sticky column); the form keeps the contact form's
   measure. "Apply below" lands with the heading a breath under the bar,
   not a whole section of air under it. */
.jobs-apply { scroll-margin-top: calc(clamp(28px, 4vw, 48px) - var(--section)); }
.jobs-head .lede { margin-top: 20px; max-width: 30rem; }
.jobs-body { max-width: 34rem; }

/* Closed: the same place, said once, in the page's own column. */
.jobs-closed .wrap > * { max-width: 40rem; }
.jobs-closed .lede { margin-top: 20px; }
.jobs-closed .link { margin-top: 26px; }
.jobs-closed:focus { outline: none; }

/* ─── Fields (the contact form's) ──────────────────────────────────────────
   Scoped to .field-line so the choices and the file control below, which
   carry labels of their own, are untouched by the floating-label rules. */
.jobs-form { position: relative; display: grid; gap: 10px; }

.field-line {
  position: relative;
  padding-top: 22px;
  border-bottom: 1px solid var(--line);
  transition: border-color .4s var(--ease-soft);
}
/* The ink line. transform-origin is NOT transitioned: focus sets it to the
   left and the line grows out of the left edge; blur sets it back to the
   right and the line withdraws into the right. It is the focus ring. */
.field-line::after,
.set-line::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.field-line:focus-within::after,
.set-line:focus-within::after { transform: scaleX(1); transform-origin: left; }

.field-line > input,
.field-line > textarea {
  display: block; width: 100%; margin: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  padding: 10px 0 14px;
  font: inherit; letter-spacing: inherit; color: var(--ink);
  outline: none;
  -webkit-appearance: none; appearance: none;
}
/* One line until there is more to say, then a line at a time (jobs.js, or
   field-sizing where the browser has it), exactly as tall as the inputs
   while empty. */
.field-line > textarea {
  line-height: 1.5;
  padding: 11px 0 15px;
  min-height: calc(1.5em + 26px);
  resize: none; overflow: hidden;
  field-sizing: content;
}
.field-line > input:-webkit-autofill,
.field-line > input:-webkit-autofill:hover,
.field-line > input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 60px var(--cream) inset;
  box-shadow: 0 0 0 60px var(--cream) inset;
  caret-color: var(--ink);
}

/* The label is the placeholder, and lifts with a transform (never a
   font-size) the moment there is something to say. */
.field-line > label {
  position: absolute; left: 0; top: 32px;
  color: var(--ink-3);
  white-space: nowrap;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .5s var(--ease), color .4s var(--ease-soft);
}
.field-line:focus-within > label,
.field-line > input:not(:placeholder-shown) + label,
.field-line > textarea:not(:placeholder-shown) + label {
  transform: translateY(-24px) scale(.78);
  color: var(--ink-2);
}
/* Kept apart: a browser that does not know this selector drops the rule it
   is in, and the one above must survive that. */
.field-line > input:-webkit-autofill + label {
  transform: translateY(-24px) scale(.78);
  color: var(--ink-2);
}

/* ─── Sets: the resume, the status, the times ──────────────────────────────
   A set is a field with its label already lifted: the same size, the same
   ink and the same height above the line as a lifted label, then its
   controls, then the hairline every field ends on. The float takes the
   legend off the fieldset's border so it lays out like any other line. */
.field-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.set-label {
  float: left; width: 100%;
  margin: 8px 0 0; padding: 0;
  font-size: .82875rem; line-height: 1.62; color: var(--ink-2);
  transition: color .4s var(--ease-soft);
}
.set-line {
  clear: both; position: relative;
  border-bottom: 1px solid var(--line);
  transition: border-color .4s var(--ease-soft);
}

/* The choices: hairline marks that fill with ink when chosen and draw their
   mark in cream. One column on a phone, two from 600px. Every row is a
   48px target, the whole row a label. */
.choices { display: grid; padding: 6px 0 10px; }
@media (min-width: 600px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
.choice {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 48px; padding-block: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}
.choice-text { line-height: 1.4; }
/* The native control stays in the page, focusable and announced, and only
   out of sight; without a script it is the control (the end of this file). */
.choice input {
  position: absolute; left: 0; top: 50%;
  width: 18px; height: 18px; margin: -9px 0 0;
  opacity: 0;
}
.choice-mark {
  position: relative; flex: none;
  width: 18px; height: 18px;
  border: 1px solid var(--ink-3);
  transition: border-color .3s var(--ease-soft), transform .25s var(--ease);
}
/* The fill: grows from the middle when chosen, after the mark is gone when not. */
.choice-mark::before {
  content: ''; position: absolute; inset: -1px;
  background: var(--ink); border-radius: inherit;
  transform: scale(0);
  transition: transform .3s var(--ease) .06s;
}
.choice input:checked + .choice-mark { border-color: var(--ink); }
.choice input:checked + .choice-mark::before { transform: scale(1); transition: transform .38s var(--ease); }
.choice:active .choice-mark { transform: scale(.92); }
@media (hover: hover) { .choice:hover .choice-mark { border-color: var(--ink); } }
.choice input:focus-visible + .choice-mark { outline: 1.5px solid var(--ink); outline-offset: 4px; }

/* A radio: a circle, and a cream dot in the ink once chosen. */
.choice:not(.choice-box) .choice-mark { border-radius: 50%; }
.choice:not(.choice-box) .choice-mark::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--cream);
  transform: scale(0);
  transition: transform .2s var(--ease-soft);
}
.choice:not(.choice-box) input:checked + .choice-mark::after { transform: scale(1); transition: transform .32s var(--ease) .12s; }

/* A checkbox: a square, the ruled rectangle of the site's one button, and
   a cream tick drawn on with the petal's stroke. The dash is 1.02 parked at
   1.06 behind a 1.4 gap, for the reason contact.css gives: parked at exactly
   its length, the round cap paints a speck on the empty square. */
.choice-mark svg {
  position: absolute; inset: -1px; width: 18px; height: 18px;
  fill: none; stroke: var(--cream); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  overflow: visible;
}
.choice-mark path {
  stroke-dasharray: 1.02 1.4; stroke-dashoffset: 1.06;
  transition: stroke-dashoffset .18s var(--ease-soft);
}
.choice input:checked + .choice-mark path { stroke-dashoffset: 0; transition: stroke-dashoffset .42s var(--ease) .14s; }

/* The resume: the site's button, which opens the picker, the chosen file
   named beside it, and what is accepted under both. The two words of the
   button are stacked in one cell, so the button is always the width of the
   longer and never twitches when "Attach" becomes "Change". */
.file-row {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding-top: 12px;
}
.file-input {
  position: absolute; left: 0; top: 12px;
  width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
  opacity: 0; overflow: hidden;
}
.file-btn { cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; }
/* The owner asked (2026-10-17) for no sliding ink fill on Attach / Change
   resume. So on this button alone the fill layer .btn slides up becomes a
   quiet 6% ink wash that fades in on hover, the words stay ink rather than
   turning cream, and the resting rule and label are .btn's own. :active
   keeps .btn's press and the focus ring below is untouched. Send
   application keeps the site's fill. */
.file-btn::before {
  background: rgba(26, 26, 26, .06);
  transform: none; opacity: 0;
  transition: opacity .2s var(--ease-soft);
}
@media (hover: hover) {
  .file-btn:hover { color: inherit; }
  .file-btn:hover::before { opacity: 1; }
}
.file-input:focus-visible + .file-btn { outline: 1.5px solid var(--ink); outline-offset: 4px; }
.file-btn-words { display: grid; }
.file-btn-words > span { grid-area: 1 / 1; text-align: center; transition: opacity .3s var(--ease-soft); }
[data-file-chosen],
.field-file.is-chosen [data-file-empty] { opacity: 0; }
.field-file.is-chosen [data-file-chosen] { opacity: 1; }
/* The name keeps its extension and its size whatever happens to the rest:
   a long name gives way in its middle, the way a Finder window cuts one.
   jobs.js measures that cut and writes the "…" itself (showFile says why
   text-overflow cannot); the stem's clip is only a net, for a name measured
   before the page's font had arrived. */
.file-name {
  flex: 1 1 9rem; min-width: 0;
  display: flex; white-space: nowrap;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .45s var(--ease-soft), transform .55s var(--ease);
}
.field-file.is-chosen .file-name { opacity: 1; transform: none; }
.file-stem { min-width: 0; overflow: hidden; }
.file-tail { flex: none; }
/* The whole stem, for a screen reader only: the one on screen may be cut,
   and is cut again on every resize, so it is hidden from the reader, which
   hears this instead. Out of the flex row, so it takes no room from it. */
.file-heard {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.file-hint { padding: 12px 0 18px; }

/* The long question: too long to float, so it is set as a question, in
   Medium and ink, with an example under it and the line under both. */
.long-label { display: block; padding-top: 18px; font-weight: 500; color: var(--ink); line-height: 1.5; text-wrap: pretty; }
.long-example { margin-top: 6px; text-wrap: pretty; }
.field-long .field-line { padding-top: 4px; }

/* ─── What is wrong, and where ─────────────────────────────────────────────
   Ink, never red: the rule turns to ink and one short sentence opens under
   it, through the grid row (nothing to measure), fading down into place. */
.field.is-invalid .field-line,
.field.is-invalid .set-line { border-bottom-color: var(--ink); }
.field.is-invalid .field-line > label { color: var(--ink-2); }
.field.is-invalid .field-line:focus-within > label,
.field.is-invalid .field-line > input:not(:placeholder-shown) + label,
.field.is-invalid .field-line > textarea:not(:placeholder-shown) + label,
.field.is-invalid .set-label { color: var(--ink); }
.field-note {
  display: grid; grid-template-rows: 0fr;
  font-size: .8125rem; line-height: 1.45; font-weight: 500; color: var(--ink);
  transition: grid-template-rows .5s var(--ease);
}
.field-note > span {
  display: block; overflow: hidden; min-height: 0;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .35s var(--ease-soft), transform .5s var(--ease);
}
/* The space above the words is inside the row that opens, so a field with
   nothing wrong carries no empty pixels under its rule. */
.field-note > span::before { content: ''; display: block; height: 8px; }
.field.is-invalid .field-note { grid-template-rows: 1fr; }
.field.is-invalid .field-note > span { opacity: 1; transform: none; transition-delay: .06s; }

/* The honeypot: off the page rather than display:none, which some bots read
   as "leave this one empty". */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 0; overflow: hidden; opacity: 0; }

/* ─── Sending ─────────────────────────────────────────────────────────────
   The label cross-fades to "Sending…" (jobs.js swaps the words while they
   are invisible), the button rests lower and stops listening, and its width
   is held so the rectangle never twitches. */
.jobs-actions { margin-top: clamp(30px, 5vw, 44px); display: grid; justify-items: start; }
.jobs-actions .btn { transition: color .45s var(--ease), opacity .35s var(--ease-soft); }
[data-submit-label] { transition: opacity .25s var(--ease-soft); }
.jobs-form.is-swapping [data-submit-label] { opacity: 0; }
.jobs-form.is-sending .btn { pointer-events: none; }
.jobs-actions .btn[disabled] { opacity: .6; cursor: default; }

/* What belongs to no one field (too many applications, the server could
   not keep it, the connection dropped) is said once, under the button. */
.jobs-note {
  display: grid; grid-template-rows: 0fr;
  color: var(--ink); max-width: 30rem;
  transition: grid-template-rows .55s var(--ease);
}
.jobs-note > span {
  display: block; overflow: hidden; min-height: 0;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .4s var(--ease-soft), transform .55s var(--ease);
  text-wrap: pretty;
}
.jobs-note > span::before { content: ''; display: block; height: 18px; }
.jobs-note.is-in { grid-template-rows: 1fr; }
.jobs-note.is-in > span { opacity: 1; transform: none; transition-delay: .08s; }

/* ─── Sent ────────────────────────────────────────────────────────────────
   The form lifts away and the thank-you rises in its place while the petal
   draws itself, four strokes, the F last. jobs.js eases the height across
   the swap so the page below glides rather than jumps. */
.jobs-form.is-done {
  opacity: 0; transform: translateY(-10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.jobs-form.is-gone { display: none; }
.jobs-body.is-sizing { transition: height .6s var(--ease); }

.jobs-sent {
  display: none;
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.jobs-sent.is-shown, .jobs-sent:target { display: block; }
/* Where it lands: a breath under the bar, over and above html's
   scroll-padding, which only clears the bar. jobs.js thank() scrolls to the
   block in the frame its rise begins, while it still sits 14px low, so it
   settles 14px higher than it was put, and without this the petal's top
   ended under the bar. With it the petal settles 22px below the bar; a
   :target landing (no rise: the block is already in place) 36px. Standing,
   not on :target alone, because the scripted scroll never has a :target. */
.jobs-sent { scroll-margin-top: 28px; }
.jobs-sent.is-in, .jobs-sent:target { opacity: 1; transform: none; }
.jobs-sent:focus { outline: none; }
.jobs-sent .lede { margin-top: 14px; max-width: 30rem; }
.jobs-sent > .link { margin-top: 26px; }
[data-sent-email] { color: var(--ink); overflow-wrap: anywhere; }
/* Without a script the span still holds "your email", which is not an
   address and should not be set like one. */
.jobs-sent:target [data-sent-email] { color: inherit; }

.sent-mark {
  width: clamp(64px, 12vw, 88px); height: auto;
  color: var(--green);
  margin-bottom: 26px;
  overflow: visible;
}
.sent-mark path {
  stroke-dasharray: 1.02 1.4; stroke-dashoffset: 1.06;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.jobs-sent.is-in .sent-mark path,
.jobs-sent:target .sent-mark path { stroke-dashoffset: 0; }
.sent-mark path:nth-child(1) { transition-delay: .25s; }
.sent-mark path:nth-child(2) { transition-delay: .45s; }
.sent-mark path:nth-child(3) { transition-delay: .65s; }
.sent-mark path:nth-child(4) { transition-delay: .85s; }

/* No script, and /jobs#sent or /jobs#trouble: that block in place of the
   form, already finished. */
.jobs-form:has(~ .jobs-sent:target) { display: none; }

/* ─── Reduced motion ──────────────────────────────────────────────────────
   site.css already makes every transition instant; these are the states the
   motion would have ended in, stated so nothing waits on it. */
@media (prefers-reduced-motion: reduce) {
  .jobs-form.is-done, .jobs-sent { transform: none; }
  .sent-mark path { stroke-dashoffset: 0; }
  .field-note > span, .jobs-note > span { transform: none; }
  .file-name { transform: none; }
  .choice:active .choice-mark { transform: none; }
}

/* ─── Without JavaScript ──────────────────────────────────────────────────
   Nothing waits to be drawn, and the long fields have room to be written in
   without a script to grow them. The file control is the browser's own:
   naming the chosen file beside the button is jobs.js's work, so without it
   the native control, which names the file itself, takes the button's
   place. The radios and checkboxes would draw their marks without a script
   (the marks are CSS on :checked alone), but they turn native too, so a
   form with no script is one consistent set of the browser's own controls
   rather than custom choices beside a native file picker. */
.no-js .sent-mark path { stroke-dashoffset: 0; }
.no-js .field-line > textarea { min-height: calc(1.5em * 4 + 26px); overflow: auto; }
.no-js .choice input {
  position: static; flex: none;
  width: 18px; height: 18px; margin: 0;
  opacity: 1; accent-color: var(--ink);
}
.no-js .choice-mark { display: none; }
.no-js .file-input {
  position: static; width: auto; height: auto; overflow: visible;
  opacity: 1; font: inherit; font-size: .9375rem; color: var(--ink-2);
}
.no-js .file-input::file-selector-button {
  min-height: 50px; margin-right: 18px; padding: 0 26px;
  border: 1px solid var(--ink); border-radius: 0; background: none;
  font: inherit; font-weight: 500; letter-spacing: -.01em; color: var(--ink);
  cursor: pointer;
}
.no-js .file-btn,
.no-js .file-name {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* …and landing on #sent or #trouble with no site.js to take the bar out of
   its clear top-of-page state, the bar keeps its cream. */
.no-js body:has(.jobs-sent:target) .header::before { opacity: 1; }

/* ─── Forced colours (Windows High Contrast) ─────────────────────────────
   Forced colours repaint every background with the system's Canvas, which
   erases the marks' ink fill, the radio's dot and the field's ink focus
   line, and leaves a cream tick on white: a chosen Status would look like
   none at all. So the browser's own radios and checkboxes take the marks'
   place and draw their checked state in system colours, and the focus line
   is drawn in the system's own ink. */
@media (forced-colors: active) {
  .choice input {
    position: static; flex: none;
    width: 18px; height: 18px; margin: 0;
    opacity: 1;
  }
  .choice-mark { display: none; }
  .field-line::after,
  .set-line::after { forced-color-adjust: none; background: CanvasText; }
}
