/* Datagist Careers — brand tokens and base styles copied from datagist.ai (src/styles/global.css, brand v1.2). */
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/libre-franklin-400.woff2) format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/libre-franklin-500.woff2) format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/libre-franklin-700.woff2) format("woff2"); }

/* Datagist brand constants (never change with theme) */
:root {
  --brand-ink: #0E1621;
  --brand-teal: #14505C;
  --brand-copper: #E07A3F; /* accent: logo node and g, plus sparing rules/labels (brand v1.2) */
  --brand-bone: #F6F5F2;
  --brand-mist: #7CBCC6; /* support colour: accents and small labels on dark surfaces only (brand v1.2) */

  /* Alphas of bone, used on dark surfaces in both themes */
  --bone-70: rgba(246, 245, 242, 0.72);
  --bone-14: rgba(246, 245, 242, 0.14);

  /* Solid teal for filled buttons and the teal band; same in both themes */
  --teal-solid: var(--brand-teal);
  --teal-solid-hover: #0F3F49;
  --copper: var(--brand-copper);
}

/* Light theme (default) */
:root {
  color-scheme: light;
  --bone: #F6F5F2;                 /* page background */
  --ink: #0E1621;                  /* foreground */
  --ink-80: rgba(14, 22, 33, 0.8);
  --ink-60: rgba(14, 22, 33, 0.62);
  --ink-12: rgba(14, 22, 33, 0.12);
  --ink-06: rgba(14, 22, 33, 0.06);
  --surface: #FFFFFF;              /* cards, forms */
  --surface-ink: #0E1621;          /* dark bands and footer */
  --teal: #14505C;                 /* accent for text, icons, rules */
  --teal-soft: #E6EEF0;
  --error: #A63D12;
  --field-border: #767B83;          /* form control edges: >= 3:1 on white and bone (WCAG 1.4.11) */
  --shadow: rgba(14, 22, 33, 0.35);
}

/* Dark theme tokens */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bone: #0E1621;
  --ink: #F6F5F2;
  --ink-80: rgba(246, 245, 242, 0.82);
  --ink-60: rgba(246, 245, 242, 0.64);
  --ink-12: rgba(246, 245, 242, 0.14);
  --ink-06: rgba(246, 245, 242, 0.08);
  --surface: #151F2B;
  --surface-ink: #141E2B;
  --teal: var(--brand-mist);
  --teal-soft: rgba(124, 188, 198, 0.14);
  --error: #F0A17C;
  --field-border: #7E8793;
  --shadow: rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bone: #0E1621;
    --ink: #F6F5F2;
    --ink-80: rgba(246, 245, 242, 0.82);
    --ink-60: rgba(246, 245, 242, 0.64);
    --ink-12: rgba(246, 245, 242, 0.14);
    --ink-06: rgba(246, 245, 242, 0.08);
    --surface: #151F2B;
    --surface-ink: #141E2B;
    --teal: var(--brand-mist);
    --teal-soft: rgba(124, 188, 198, 0.14);
    --error: #F0A17C;
  --field-border: #7E8793;
    --shadow: rgba(0, 0, 0, 0.6);
  }
}

:root {
  --font: "Libre Franklin", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --container: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 6px;

  --step--1: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.97rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.6vw, 4.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  /* WCAG 2.4.11: keep focused / scrolled-to content clear of the sticky header and the cookie banner */
  scroll-padding-top: 96px;
  scroll-padding-bottom: calc(var(--dgn-bar-h, 0px) + 16px);
}
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--teal); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3, h4 { overflow-wrap: break-word; hyphens: manual; margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.012em; line-height: 1.25; }
p { margin: 0; }
p + p { margin-top: 1em; }
.lede { font-size: var(--step-1); font-weight: 400; line-height: 1.45; color: var(--ink-80); max-width: var(--measure); text-wrap: pretty; }
.measure { max-width: var(--measure); text-wrap: pretty; }
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px; height: 2px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-1px);
}

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--ink { background: var(--surface-ink); color: var(--brand-bone); --ink: var(--brand-bone); --ink-80: var(--bone-70); --ink-60: var(--bone-70); --ink-12: var(--bone-14); --ink-06: var(--bone-14); --teal: var(--brand-mist); --teal-soft: rgba(124,188,198,0.14); --surface: rgba(246,245,242,0.06); }
.section--ink .lede, .section--ink .muted { color: var(--bone-70); }
.section--ink .eyebrow { color: var(--bone-70); }
.section--teal { background: var(--teal-solid); color: var(--brand-bone); --ink: var(--brand-bone); --ink-80: var(--bone-70); --ink-60: var(--bone-70); --ink-12: var(--bone-14); --ink-06: var(--bone-14); --teal: var(--brand-bone); --teal-soft: rgba(246,245,242,0.12); --surface: rgba(246,245,242,0.06); }
.section--teal .lede, .section--teal .muted { color: var(--bone-70); }
.section--teal .eyebrow { color: var(--brand-bone); }
.muted { color: var(--ink-60); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 880px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.split--rev { direction: ltr; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.85em 1.4em;
  font: inherit; font-weight: 500; font-size: var(--step-0);
  line-height: 1;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--teal-solid); color: var(--brand-bone); border-color: var(--teal-solid); }
.btn--primary:hover { background: var(--teal-solid-hover); border-color: var(--teal-solid-hover); }
.section--teal .btn--primary { background: var(--brand-bone); color: var(--brand-teal); border-color: var(--brand-bone); }
.section--teal .btn--primary:hover { background: #fff; border-color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-12); }
.btn--ghost:hover { border-color: var(--ink); }
.section--ink .btn--ghost, .section--teal .btn--ghost { color: var(--brand-bone); border-color: var(--bone-14); }
.section--ink .btn--ghost:hover, .section--teal .btn--ghost:hover { border-color: var(--brand-bone); }
.btn svg { width: 1em; height: 1em; }

.icon { width: 32px; height: 32px; color: var(--teal); flex: none; }
.section--ink .icon, .section--teal .icon { color: var(--brand-bone); }

.rule { height: 1px; background: var(--ink-12); border: 0; margin: 0; }
.section--ink .rule { background: var(--bone-14); }


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* Skip link: hidden until focused, then shown above the sticky header (WCAG 2.4.1, 2.4.7, 2.4.11) */
.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  padding: 0.75em 1.1em; border-radius: var(--radius);
  background: var(--teal-solid); color: var(--brand-bone);
  font-weight: 500; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid var(--ink); outline-offset: 2px; }

/* Form controls: visible focus ring on every field (WCAG 2.4.7) */
input:not([type="checkbox"]):not([type="radio"]):focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================================ Careers portal */

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bone) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ink-06); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.85rem; text-decoration: none; color: var(--ink); }
.brand__logo { width: 150px; height: auto; }
.brand__logo--dark { display: none; }
.brand__tag { padding-left: 0.85rem; border-left: 1px solid var(--ink-12); font-weight: 500; font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 1.75rem); font-size: var(--step--1); font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--ink-80); padding-block: 0.4em; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--teal); }
.site-nav__out { color: var(--teal) !important; }
@media (max-width: 640px) { .hide-sm { display: none; } .brand__logo { width: 120px; } .brand__tag { display: none; } }
@media (prefers-color-scheme: dark) {
  .brand__logo--light { display: none; }
  .brand__logo--dark { display: block; }
}

/* Hero */
.hero { padding-block: clamp(4rem, 9vw, 7rem); }
.hero h1 { max-width: 16ch; font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.02; }
.hero .lede { margin-top: 1.5rem; max-width: 52ch; }
.hero__actions, .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 56ch; }
.band { border-top: 1px solid var(--ink-12); }
.narrow { max-width: 760px; }

/* Roles list */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink-12); }
.roles li { border-bottom: 1px solid var(--ink-12); }
.role { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem 2rem; align-items: center; padding: 1.5rem 0.25rem; text-decoration: none; color: var(--ink); transition: background-color 160ms ease; }
.role h3 { font-size: var(--step-1); }
.role__main p { margin-top: 0.35rem; color: var(--ink-80); max-width: 60ch; }
.role__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.role__meta span, .meta span { font-size: var(--step--1); font-weight: 500; padding: 0.25em 0.75em; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.role__go { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--ink-12); border-radius: 50%; color: var(--teal); transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.role__go svg { width: 18px; height: 18px; }
.role:hover .role__go, .role:focus-visible .role__go { transform: translateX(4px); background: var(--teal-solid); border-color: var(--teal-solid); color: var(--brand-bone); }
.role:hover h3 { color: var(--teal); }
.roles__general { margin-top: 1.5rem; }

/* What the work is like */
.work { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.work li { padding: 1.5rem 0 2rem; border-top: 1px solid var(--ink-12); }
.work__num { display: block; font-size: var(--step--1); font-weight: 500; letter-spacing: 0.08em; color: var(--teal); margin-bottom: 0.75rem; }
.work h3 { font-size: var(--step-1); }
.work p { margin-top: 0.6rem; color: var(--ink-80); line-height: 1.6; text-wrap: pretty; }

/* Hiring steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { padding: 1.5rem; border: 1px solid var(--bone-14); border-radius: var(--radius); background: rgba(246, 245, 242, 0.04); }
.steps__num { display: block; font-size: var(--step--1); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-mist); margin-bottom: 0.75rem; }
.steps h3 { font-size: var(--step-1); color: var(--brand-bone); }
.steps p { margin-top: 0.5rem; color: var(--bone-70); line-height: 1.55; text-wrap: pretty; }

/* Job page */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-hero h1 { font-size: var(--step-3); letter-spacing: -0.025em; }
.crumbs { display: flex; gap: 0.5rem; font-size: var(--step--1); color: var(--ink-60); margin-bottom: 1.75rem; }
.crumbs a { color: var(--ink-60); text-decoration: none; }
.crumbs a:hover { color: var(--teal); }
.crumbs [aria-current] { color: var(--ink-80); }
.strap { margin-top: 0.75rem; font-size: var(--step-1); font-weight: 500; color: var(--teal); line-height: 1.3; text-wrap: balance; max-width: 44ch; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.5rem; }
#apply { scroll-margin-top: 96px; }
.job { display: grid; gap: clamp(2.5rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .job { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } .job__apply { position: sticky; top: 96px; } }
.job__body h2, .job__apply h2 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.job__body h2:not(:first-child) { margin-top: 2.25rem; }
.job__body p { color: var(--ink-80); line-height: 1.6; max-width: var(--measure); text-wrap: pretty; }
.job__body ul { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.job__body li { padding: 0.7rem 0 0.7rem 1.4rem; position: relative; border-top: 1px solid var(--ink-06); color: var(--ink-80); line-height: 1.5; text-wrap: pretty; }
.job__body li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: 9px; height: 2px; background: var(--teal); }
.eeo { margin-top: 2.5rem; font-size: var(--step--1); }
.posted { margin-top: 0.75rem; font-size: var(--step--1); }

/* Application form */
.form { background: var(--surface); border: 1px solid var(--ink-06); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.25rem; }
.form__grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form__row { display: grid; gap: 0.45rem; align-content: start; }
.form__role { padding-bottom: 1rem; border-bottom: 1px solid var(--ink-12); }
.form label { font-size: var(--step--1); font-weight: 500; }
.opt { font-weight: 400; color: var(--ink-60); margin-left: 0.4em; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  font: inherit; color: var(--ink); width: 100%; padding: 0.75em 0.9em;
  background: var(--bone); border: 1px solid var(--field-border); border-radius: var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.form input[type="file"] { padding: 0.6em 0.75em; cursor: pointer; }
.form input[type="file"]::file-selector-button { font: inherit; font-size: var(--step--1); font-weight: 500; margin-right: 0.9em; padding: 0.45em 0.9em; border: 1px solid var(--field-border); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--teal); outline-offset: 2px; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.form textarea { resize: vertical; min-height: 120px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; font-weight: 400 !important; line-height: 1.5; color: var(--ink-80); text-wrap: pretty; }
.check input { width: 20px; height: 20px; margin-top: 0.15em; accent-color: var(--teal); }
.hint { font-size: var(--step--1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-error { font-size: var(--step--1); color: var(--error); line-height: 1.4; }
.field-error:empty { display: none; }
.is-invalid { border-color: var(--error) !important; }
.form__submit { justify-self: start; }
.form__status { font-size: var(--step--1); font-weight: 500; min-height: 1.5em; }
.form__status[data-state="ok"] { color: var(--teal); }
.form__status[data-state="error"] { color: var(--error); }
.form.is-done > :not(.form__status):not(.form__done) { display: none; }
.form__done h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }

/* Footer */
.site-footer { background: var(--surface-ink); color: var(--bone-70); padding-block: 3rem 2rem; font-size: var(--step--1); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.site-footer__note { margin-top: 0.75rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--brand-bone); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--brand-mist); }
.site-footer__base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--bone-14); }
