/* Gulf Job Feed web app. One family (Atkinson Hyperlegible Next, built for legibility on small screens),
   a cool sea-haze ground, teal for actions, and saffron kept for one job only: how fresh a job is. */

@font-face {
    font-family: 'Atkinson Next';
    src: url('../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Atkinson Next';
    src: url('../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --ground: #eef2f1;
    --surface: #ffffff;
    --ink: #13262d;
    --muted: #587077;
    --line: #d3dddd;
    --sea: #0d6466;
    --sea-deep: #0a4b4d;
    --sea-wash: #dcecea;
    --saffron: #d99a1e;
    --saffron-ink: #7a5306;
    --saffron-wash: #fbefd2;
    --danger: #a3362a;
    --danger-wash: #f8e3df;
    --ok: #2e7a4c;
    --ok-wash: #e0f0e6;

    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: 1.5rem;
    --step-3: 2rem;
    --step-4: 2.625rem;

    --radius: 10px;
    --gap: 1rem;
    --measure: 36rem;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: 'Atkinson Next', system-ui, sans-serif;
    font-size: var(--step-0);
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
}

a { color: var(--sea); text-underline-offset: 0.18em; }
a:hover { color: var(--sea-deep); }

:focus-visible {
    outline: 3px solid var(--saffron);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1rem; max-width: 62ch; }

/* ---------- Shell ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--ground);
}
.wordmark {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--step-1);
    letter-spacing: -0.02em;
}
.wordmark:hover { color: inherit; }
.wordmark .dot { color: var(--saffron); }
.topnav { display: flex; gap: 0.25rem; align-items: center; }
.topnav a {
    color: var(--ground);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}
.topnav a[aria-current="page"] { background: rgba(238, 242, 241, 0.16); }
.topnav a:hover { color: #fff; }

main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1.75rem 1.25rem 4rem;
}

.lede { font-size: var(--step-1); color: var(--muted); }

/* ---------- Welcome ---------- */

.welcome { padding-top: 2.5rem; }
.welcome h1 { font-size: var(--step-4); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1rem; }
.welcome .actions { margin-top: 2rem; }

/* ---------- Forms ---------- */

form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
label { display: grid; gap: 0.35rem; font-weight: 700; }
label .hint { font-weight: 400; color: var(--muted); font-size: var(--step--1); }

input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
    font: inherit;
    color: inherit;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
input:focus, select:focus, textarea:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px var(--sea-wash); }
textarea { min-height: 6rem; resize: vertical; }

input.code {
    font-size: var(--step-3);
    letter-spacing: 0.3em;
    text-align: center;
    padding: 0.5rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

button, .button {
    font: inherit;
    font-weight: 700;
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 0.7rem 1.3rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.9rem;
}
.primary { background: var(--sea); color: #fff; }
.primary:hover { background: var(--sea-deep); color: #fff; }
.secondary { background: transparent; color: var(--sea); border-color: var(--sea); }
.secondary:hover { background: var(--sea-wash); color: var(--sea-deep); }
.quiet { background: transparent; color: var(--sea); padding-inline: 0.4rem; }
.quiet:hover { text-decoration: underline; }
.danger { background: var(--danger); color: #fff; }
.quiet.on-dark { color: var(--ground); }
button:disabled { opacity: 0.55; cursor: progress; }

.notice {
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    background: var(--sea-wash);
}
.notice.error { background: var(--danger-wash); color: var(--danger); }
.notice.ok { background: var(--ok-wash); color: var(--ok); }
.notice:empty { display: none; }

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

.panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
}

.loading { color: var(--muted); padding: 2rem 0; }

@media (prefers-reduced-motion: no-preference) {
    .loading::after { content: ''; display: inline-block; width: 1.2em; animation: dots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; }
    @keyframes dots { from { width: 0; } to { width: 1.2em; } }
}

@media (min-width: 40rem) {
    main { padding-top: 2.5rem; }
}

/* ---------- Onboarding ---------- */

.progress {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: var(--step--1);
    color: var(--muted);
    counter-reset: step;
}
.progress li { flex: 1; padding-top: 0.5rem; border-top: 4px solid var(--line); }
.progress li.done { border-top-color: var(--sea); color: var(--ink); }
.progress li[aria-current="step"] { border-top-color: var(--saffron); color: var(--ink); font-weight: 700; }

fieldset {
    border: 0;
    margin: 0;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    display: grid;
    gap: 1rem;
}
legend { font-weight: 700; font-size: var(--step-1); padding: 0; float: left; width: 100%; margin-bottom: 0.25rem; }
fieldset > legend + * { clear: both; }
fieldset.role { border-left: 4px solid var(--sea); }

.grid2, .grid3 { display: grid; gap: 1rem; }
@media (min-width: 34rem) {
    .grid2 { grid-template-columns: 1fr 1fr; }
    .grid3 { grid-template-columns: 2fr 2fr 1fr auto; align-items: end; }
}

.label { font-weight: 700; margin: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.facts li { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: start; }
.facts textarea { min-height: 3.2rem; }

.checks { display: grid; gap: 0.4rem; }
@media (min-width: 34rem) { .checks { grid-template-columns: 1fr 1fr; } }
label.check { display: flex; gap: 0.6rem; align-items: center; font-weight: 400; }
label.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--sea); }

.actions.sticky {
    position: sticky;
    bottom: 0;
    background: var(--ground);
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 -1px 0 var(--line);
}

input[type="file"] { font: inherit; padding: 0.6rem; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* ---------- Alerts set-up ---------- */

ol.steps { padding-left: 1.4rem; display: grid; gap: 1.25rem; }
ol.steps li::marker { font-weight: 700; color: var(--sea); }
.topic { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.topic code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--step--1);
    background: var(--surface);
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    word-break: break-all;
}

/* Browser notifications: the panel at the top of the alerts set-up. */
.pushbox {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
}
.pushbox > :first-child { margin-top: 0; }
.pushbox > :last-child { margin-bottom: 0; }
.pushstate.on { color: var(--ok); font-weight: 700; }
.pushstate.on::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%;
    background: var(--ok); margin-right: 0.5em; vertical-align: 0.05em; }

details.other-way { margin: 1.5rem 0; }
details.other-way > summary { cursor: pointer; font-weight: 700; color: var(--sea); }
details.other-way[open] > summary { margin-bottom: 0.75rem; }

/* Feed banner asking to turn notifications on. */
.nudge {
    background: var(--sea-wash);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    margin: 0 0 1.25rem;
}
.nudge p { margin: 0 0 0.6rem; }
.nudge .actions { margin: 0; }

/* ---------- Feed ---------- */

.feedhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

.tabs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    margin: 0.5rem -1.25rem 1rem;
    padding: 0 1.25rem 0.25rem;
    scrollbar-width: none;
}
.tabs a {
    flex: none;
    text-decoration: none;
    color: var(--ink);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--surface);
    display: inline-flex;
    gap: 0.45rem;
    align-items: baseline;
}
.tabs a[aria-current="page"] { background: var(--ink); color: var(--ground); }
.tabs .count { font-size: var(--step--1); opacity: 0.7; }

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-radius: var(--radius); overflow: hidden; }
.job {
    display: grid;
    grid-template-columns: 4.25rem 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 0.95rem 1rem;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}
.job:hover { background: #f7faf9; color: var(--ink); }
.job:hover .job-title { text-decoration: underline; text-underline-offset: 0.18em; }

/* The one loud thing: how fresh a job is, read like a departures board. */
.fresh {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 3.6rem;
    border-radius: 8px;
    background: var(--saffron-wash);
    color: var(--saffron-ink);
    line-height: 1;
}
.fresh-value { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; }
.fresh-unit { font-size: var(--step--1); margin-top: 0.15rem; }

.job-main { display: grid; gap: 0.2rem; min-width: 0; }
.job-title { font-weight: 700; font-size: var(--step-1); line-height: 1.25; }
.job-meta { color: var(--muted); }
.job-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.3rem; }
.job-applicants { font-size: var(--step--1); color: var(--muted); }

.tag {
    font-size: var(--step--1);
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--ground);
    color: var(--ink);
}
.tag.ok { background: var(--ok-wash); color: var(--ok); }
.tag.sea { background: var(--sea-wash); color: var(--sea-deep); }
.tag.muted { color: var(--muted); }
/* Alerted on Live: the one place the saffron accent marks speed. */
.tag.live { background: var(--ink); color: #fff; }
.live-line { margin: 0.5rem 0 1rem; }

.actions.center { justify-content: center; margin-top: 1rem; }

/* ---------- One job ---------- */

.back { display: inline-block; margin-bottom: 1rem; }
.back::before { content: '‹ '; }
.jobpage h1 { font-size: var(--step-3); }
.facts-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; margin: 0 0 1.25rem; }
.facts-row dt { font-size: var(--step--1); color: var(--muted); }
.facts-row dd { margin: 0; font-weight: 700; }

.panel.fit { border-left: 5px solid var(--line); }
.panel.fit.ok { border-left-color: var(--ok); }
.panel.fit.sea { border-left-color: var(--sea); }
.panel h2 { font-size: var(--step-1); }

.textblock { margin-top: 1.5rem; }
.textblock-head { display: flex; align-items: baseline; gap: 0.75rem; }
.textblock-head h3 { margin: 0; }
.prose { background: var(--ground); border-radius: 8px; padding: 0.9rem 1rem; }
.prose p:last-child { margin-bottom: 0; }

form.skip { margin-top: 1rem; }
form[hidden] { display: none; }

/* ---------- Passes ---------- */

.passes { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 1rem; }
@media (min-width: 34rem) { .passes { grid-template-columns: 1fr 1fr; } }
.pass { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 0.25rem; align-content: start; }
.pass h2 { margin: 0; font-size: var(--step-1); }
.pass.picked { box-shadow: 0 0 0 2px var(--sea); }
.pass .price { font-size: var(--step-3); font-weight: 700; margin: 0.25rem 0; letter-spacing: -0.02em; }
.pass button { margin-top: 0.75rem; justify-self: start; }

.panel select { margin-top: 0.25rem; }
form.inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
form.inline select { flex: 1 1 14rem; width: auto; }

/* ---------- Privacy notice, terms, consent ---------- */

.legal { max-width: 46rem; }
.legal-section { margin-top: 2rem; }
.legal-section h2 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.45rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--line); }
.legal thead th { color: var(--muted); font-weight: 400; }
.retention th { font-weight: 700; width: 40%; }
@media (max-width: 34rem) {
    .processors thead { display: none; }
    .processors tr { display: grid; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
    .processors td { border: 0; padding: 0.1rem 0; }
    .processors td:first-child { font-weight: 700; }
}
.operator { display: grid; gap: 0.5rem; margin: 0; }
.operator dt { font-size: var(--step--1); color: var(--muted); }
.operator dd { margin: 0; }

.consent-fields { display: grid; gap: 0.75rem; margin: 1rem 0; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 0.3rem; flex: none; }

.sitefoot { display: flex; gap: 1.25rem; justify-content: center; padding: 2rem 1rem 2.5rem; font-size: var(--step--1); }
.sitefoot a { color: var(--muted); }

/* Pass offers: the trial card on the feed, the out-of-applications box, the late-alert line. */
.offer {
    background: var(--surface);
    border-left: 4px solid var(--saffron);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin: 0 0 1.25rem;
}
.offer h2 { margin: 0 0 0.4rem; font-size: var(--step-1); }
.offer p { margin: 0 0 0.6rem; }
.offer .actions { margin: 0.25rem 0 0; }
.offer.inline { margin: 0.75rem 0 0; }
.offer-line { border-left: 3px solid var(--saffron); padding-left: 0.6rem; margin: 0.5rem 0 1rem; }

/* Style choices on the resume page. */
label.choice { display: flex; gap: 0.6rem; align-items: baseline; margin: 0.5rem 0; font-weight: 400; }
label.choice input { flex: none; }

/* Waitlist and invites */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
ul.we-dont { padding-left: 1.2rem; margin: 1rem 0 1.5rem; }
ul.we-dont li { margin: 0.35rem 0; }
.code-ready code { font-size: 1.25em; letter-spacing: 0.05em; }
.share-text { white-space: pre-wrap; background: var(--paper, #fff); border-left: 4px solid var(--sea); padding: 0.6rem 0.8rem; }
table.invites { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.invites th, table.invites td { text-align: left; padding: 0.4rem 0.3rem; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
table.invites td:first-child { overflow-wrap: anywhere; }
