/* Layout concept: a quiet near-black trading-floor page; the dotted ring from the logo is the one bold element, everything else is type, hairlines and monospace data. */
:root {
  --ink: #0c0e0f;          /* page ground, near-black with a cool bias */
  --panel: #13171a;        /* raised surfaces */
  --line: #232a2e;         /* hairlines */
  --text: #eef2f1;         /* primary text */
  --muted: #9aa6a6;        /* secondary text */
  --green: #1ee8a0;        /* ring start */
  --blue: #18a8f0;         /* ring end */
  --grad: linear-gradient(100deg, var(--green), var(--blue));
  --danger: #ff7a6b;

  --display: "Marcellus", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem);

  --wrap: 1180px;
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.eyebrow {
  font: 500 var(--step--1)/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: var(--step-1); line-height: 1.5; max-width: 60ch; }
.prose { max-width: 66ch; display: grid; gap: 1rem; color: var(--muted); }
.prose strong { color: var(--text); font-weight: 500; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand .brand-word { width: auto; height: 18px; }
@media (max-width: 380px) { .brand .brand-word { height: 15px; } }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { text-decoration: none; color: var(--muted); padding: 0.5rem 0.75rem; border-radius: var(--radius); font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.nav .btn { margin-left: 0.5rem; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 0.45rem 0.7rem; font: inherit; cursor: pointer; }
@media (max-width: 880px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; padding: 0.5rem max(16px, env(safe-area-inset-right, 0px)) 1rem max(16px, env(safe-area-inset-left, 0px)); background: var(--ink); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 0.8rem 0.25rem; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--green); }
  .nav .btn { margin: 0.5rem 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 500 0.95rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.3rem; border-radius: var(--radius); border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--grad); color: #04110c; }
.btn-primary:hover { transform: translateY(-1px); }
.nav a.btn-primary { color: #04110c; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Sections */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section + .section { border-top: 1px solid var(--line); }

/* Alternating bands: after a page's opening section, sections alternate between a deep
   green-blue tint and a light band. Components restyle themselves through the tokens. */
.bands > section:nth-child(even) {
  --ink: #0b2024;
  --panel: #10292d;
  --line: #1f3d40;
  --muted: #a3b6b4;
  background: linear-gradient(115deg, #0a2721 0%, #0b1f29 55%, #0a1a2b 100%);
  color: var(--text);
}
.bands > section:nth-child(odd):not(:first-child) {
  --ink: #eef4f2;
  --panel: #ffffff;
  --line: #d3dedb;
  --text: #0c1615;
  --muted: #4d5e5c;
  --green: #07845a;
  --blue: #0a69a4;
  color-scheme: light;
  background: var(--ink);
  color: var(--text);
}
.bands > section:not(:first-child) { border-top: 0; }
.section-head { display: grid; gap: 0.9rem; margin-bottom: 2.5rem; }
.section-head p:not(.eyebrow) { color: var(--muted); max-width: 60ch; }
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero .wrap { display: grid; gap: 1rem; }

/* Home hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.hero-ring { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: end; }
.hero-ring canvas { width: 100%; height: 100%; display: block; }
.ring-wordmark { position: absolute; left: 50%; top: 50%; width: 60%; height: auto; transform: translate(-50%, -50%); pointer-events: none; }
.ticker { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font: 400 var(--step--1)/1.4 var(--mono); color: var(--muted); }
.ticker b { color: var(--text); font-weight: 500; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-ring { order: -1; max-width: 260px; justify-self: start; }
}
@media (max-width: 600px) { .hero-ring { justify-self: center; } } /* phones only; tablets keep the left-aligned ring */

/* Discipline grid */
.disciplines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.discipline { padding: 1.75rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 0.6rem; align-content: start; text-decoration: none; transition: background-color .2s ease; }
.discipline:hover { background: var(--panel); }
.discipline .code { font: 500 var(--step--1)/1 var(--mono); color: var(--blue); letter-spacing: 0.08em; }
.discipline p { color: var(--muted); font-size: 0.95rem; }
.discipline .count { font: 400 var(--step--1)/1 var(--mono); color: var(--muted); margin-top: 0.4rem; }
@media (max-width: 900px) { .disciplines { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .disciplines { grid-template-columns: 1fr; } }

/* Office map */
.map { position: relative; max-width: 100%; }
.map-svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-land { fill: url(#qs-land); opacity: 0.38; }
.map-pin { cursor: pointer; outline: none; }
.map-pin .hit { fill: transparent; }
.map-pin .core { fill: var(--text); stroke: var(--green); stroke-width: 3; transform-box: fill-box; transform-origin: center; transition: transform .2s ease; }
.map-pin .pulse { fill: none; stroke: var(--green); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map-pin .label { font: 500 14px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; fill: var(--text); transition: fill .2s ease; }
.map-pin.active .core, .map-pin:focus-visible .core { transform: scale(1.45); }
.map-pin.active .label, .map-pin:focus-visible .label { fill: var(--green); }
.map-pin:focus-visible .hit { stroke: var(--green); stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .map-pin .pulse { animation: pin-pulse 2.8s ease-out infinite; }
  .map-pin:nth-of-type(2) .pulse { animation-delay: .7s; }
  .map-pin:nth-of-type(3) .pulse { animation-delay: 1.4s; }
  .map-pin:nth-of-type(4) .pulse { animation-delay: 2.1s; }
}
@keyframes pin-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.map-tip {
  position: absolute; z-index: 2; width: 280px; max-width: 70vw; pointer-events: auto;
  background: color-mix(in srgb, var(--ink) 92%, #000); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; display: grid; gap: 0.35rem; box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  transform: translate(-50%, calc(-100% - 22px));
}
.map-tip.align-left { transform: translate(-24px, calc(-100% - 22px)); }
.map-tip.align-right { transform: translate(calc(-100% + 24px), calc(-100% - 22px)); }
.map-tip.below { transform: translate(-50%, 22px); }
.map-tip.below.align-left { transform: translate(-24px, 22px); }
.map-tip.below.align-right { transform: translate(calc(-100% + 24px), 22px); }
.map-tip .tip-city { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.map-tip .tip-time { font: 500 1.6rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--green); }
.map-tip .tip-time small { font-size: 0.8rem; color: var(--muted); margin-left: 0.4rem; letter-spacing: 0.06em; }
.map-tip a { margin-top: 0.4rem; color: var(--text); font-weight: 500; text-decoration: none; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.map-tip a:hover { color: var(--green); }
.map-legend { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.legend-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.2rem 0.6rem;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  background: color-mix(in srgb, var(--panel) 60%, transparent); transition: border-color .15s ease;
}
.legend-item:hover, .legend-item.active { border-color: var(--green); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.legend-name { font-weight: 500; }
.legend-time { font: 400 var(--step--1)/1 var(--mono); color: var(--green); font-variant-numeric: tabular-nums; }
.legend-count { grid-column: 2 / -1; font: 400 0.75rem/1.2 var(--mono); color: var(--muted); }
@media (max-width: 900px) { .map-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .map-pin .label { display: none; } .map-tip { display: none; } }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.process li { list-style: none; display: grid; gap: 0.6rem; align-content: start; padding-top: 1rem; border-top: 1px solid var(--line); counter-increment: step; }
.process li::before { content: "0" counter(step); font: 500 var(--step--1)/1 var(--mono); color: var(--green); }
.process p { color: var(--muted); font-size: 0.95rem; }
.process ol, ol.process { padding: 0; margin: 0; }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .process { grid-template-columns: 1fr; } }

/* Split CTA */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.split > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1rem; align-content: start; }
.split p { color: var(--muted); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Job list */
.notice { font: 400 var(--step--1)/1.5 var(--mono); color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; }
.notice b { color: var(--green); font-weight: 500; }
.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
@media (max-width: 720px) { .filters { grid-template-columns: 1fr; } }
.result-count { font: 400 var(--step--1)/1 var(--mono); color: var(--muted); margin-bottom: 0.75rem; }
.jobs { display: grid; border-top: 1px solid var(--line); }
.job {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1.5rem; align-items: center;
  padding: 1.25rem 0.75rem; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background-color .15s ease;
}
.job:hover { background: var(--panel); }
.job h3 { font-family: var(--body); font-weight: 500; font-size: 1.08rem; letter-spacing: 0; }
.job .meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font: 400 var(--step--1)/1.4 var(--mono); color: var(--muted); }
.job .salary { font: 400 var(--step--1)/1.4 var(--mono); color: var(--text); text-align: right; }
.job .arrow { color: var(--green); }
@media (max-width: 640px) { .job { grid-template-columns: 1fr; } .job .salary { text-align: left; } }
.tag { display: inline-flex; align-items: center; gap: 0.35rem; font: 500 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 45%, transparent); padding: 0.3rem 0.45rem; border-radius: 3px; }
.tag.sample { color: var(--muted); border-color: var(--line); }
.empty { padding: 2rem 0.75rem; color: var(--muted); }

/* Job detail */
.job-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: start; }
.job-detail .body { display: grid; gap: 2rem; min-width: 0; }
.job-detail ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; color: var(--muted); }
.facts { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; }
.facts dl { margin: 0; display: grid; gap: 0.75rem; }
.facts dt { font: 400 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.25rem 0 0; }
@media (max-width: 860px) { .job-detail { grid-template-columns: 1fr; } .facts { position: static; } }

/* Forms */
.form { display: grid; gap: 1.1rem; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label, .field .label { font-size: 0.9rem; color: var(--text); }
.field .hint { font-size: 0.82rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.85rem;
}
textarea { min-height: 130px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.dropzone {
  position: relative; display: grid; gap: 0.35rem; place-items: center; text-align: center;
  padding: 1.75rem 1rem; border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: var(--radius); background: var(--panel); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.drag, .dropzone:hover { border-color: var(--green); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .file-name { font: 400 var(--step--1)/1.4 var(--mono); color: var(--green); word-break: break-all; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.check input { margin-top: 0.3rem; accent-color: var(--green); }
.hp { position: absolute; left: -9999px; }
.form-status { font-size: 0.95rem; padding: 0.85rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); }
.form-status.ok { border-color: color-mix(in srgb, var(--green) 50%, transparent); color: var(--green); }
.form-status.err { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }

/* Contact */
.offices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.office { display: grid; gap: 0.25rem; align-content: start; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.office p { color: var(--muted); font-size: 0.95rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-grid h4 { margin: 0 0 0.75rem; font: 500 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-logo { width: 150px; margin-bottom: 1rem; }
.legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
