/* ============================================================
   A job's page. Night ground, the brand's three blues, one warm
   colour (amber) kept for the reader: "you" in the scene, and
   what you build. Archivo for titles, Inter for reading, as on
   the site. No colour here comes from the fort's design system:
   this page is for people outside the company.
   ============================================================ */

:root {
  --night: #060a14;
  --night-2: #0a1122;
  --panel: rgba(156, 185, 243, 0.045);
  --rule: rgba(156, 185, 243, 0.16);
  --rule-strong: rgba(156, 185, 243, 0.32);
  --text: #eef3ff;
  --soft: #c9d4ee;
  --quiet: #8fa0c2;
  --brand: #1570ef;
  --sky: #53b1fd;
  --peri: #9cb9f3;
  --amber: #fdb022;
  --display: Archivo, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Roboto Mono", SFMono-Regular, Consolas, Menlo, monospace;
  --gutter: clamp(20px, 3.4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--night); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(21, 112, 239, 0.55); }

/* ------------------------------------------------------------ hero */

.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  background:
    radial-gradient(120% 90% at 68% 46%, #0d1a38 0%, rgba(13, 26, 56, 0) 62%),
    linear-gradient(180deg, #070c19 0%, var(--night) 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 10, 20, 0.9) 0%, rgba(6, 10, 20, 0.62) 26%, rgba(6, 10, 20, 0) 50%),
    linear-gradient(180deg, rgba(6, 10, 20, 0.55) 0%, rgba(6, 10, 20, 0) 16%, rgba(6, 10, 20, 0) 84%, var(--night) 100%);
}

.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--gutter); pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar-static { position: static; }
.brand { display: inline-flex; color: var(--text); }
.brand .logo { height: 32px; width: auto; display: block; }
.bar-link {
  font-size: 14px; font-weight: 600; text-decoration: none; letter-spacing: 0.01em;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--rule-strong);
  background: rgba(6, 10, 20, 0.5); backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.bar-link:hover { border-color: var(--sky); background: rgba(21, 112, 239, 0.22); }

.hero-copy {
  position: absolute; z-index: 2; left: var(--gutter); top: 50%; transform: translateY(-54%);
  width: min(36vw, 620px); pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.facts {
  display: flex; flex-wrap: wrap; gap: 8px 0; margin: 30px 0 0;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri);
}
.facts span + span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 14px 2px; background: var(--brand); transform: rotate(45deg); }
h1 {
  margin: 0; font-family: var(--display); font-weight: 650;
  font-size: clamp(38px, 4.3vw, 76px); line-height: 1.02; letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 em { display: block; margin-top: 0.22em; font-style: normal; font-weight: 400; font-size: 0.56em; letter-spacing: -0.012em; color: var(--peri); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--body); font-size: 16px; font-weight: 600; text-decoration: none; letter-spacing: 0.005em;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--brand); color: #fff; box-shadow: 0 10px 34px -10px rgba(21, 112, 239, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-solid:hover { background: #2a82ff; box-shadow: 0 14px 40px -10px rgba(21, 112, 239, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-solid[disabled] { opacity: 0.55; cursor: default; }
.btn-ghost { border-color: var(--rule-strong); color: var(--text); background: rgba(6, 10, 20, 0.45); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--sky); }


/* ------------------------------------------------------------ the role */

main { max-width: 1160px; margin: 0 auto; padding: clamp(64px, 9vw, 128px) var(--gutter) 40px; }
.sec { margin-bottom: clamp(64px, 8vw, 112px); }
.sec h2 {
  margin: 0 0 30px; font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 2.7vw, 40px); line-height: 1.1; letter-spacing: -0.02em;
}
.texts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.sec-text h2 {
  font-family: var(--mono); font-weight: 500; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peri);
  margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.sec-text h2::before { content: ""; width: 22px; height: 1px; background: var(--brand); }
.sec-text p { margin: 0 0 1em; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.5; color: var(--text); letter-spacing: -0.005em; text-wrap: pretty; }

.hex { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; flex-shrink: 0; }

.rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.room {
  position: relative; display: flex; gap: 22px; align-items: flex-start; padding: 28px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 18px;
  font-size: 19px; line-height: 1.42; color: var(--text); overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.room::after {
  content: ""; position: absolute; inset: auto -30% -70% auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(21, 112, 239, 0.3), rgba(21, 112, 239, 0)); opacity: 0; transition: opacity 0.3s;
}
.room:hover { border-color: var(--rule-strong); transform: translateY(-2px); background: rgba(156, 185, 243, 0.07); }
.room:hover::after { opacity: 1; }
.room-n { position: relative; width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; color: var(--sky); }
.room-n .hex { position: absolute; inset: 0; width: 100%; height: 100%; transition: fill 0.25s, transform 0.5s; }
.room:hover .room-n .hex { fill: rgba(21, 112, 239, 0.35); transform: rotate(60deg); }
.room-n b { position: relative; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 64px); }
.checks li { display: flex; gap: 16px; align-items: flex-start; padding: 19px 0; border-top: 1px solid var(--rule); color: var(--soft); font-size: 17.5px; line-height: 1.45; }
.checks .hex { width: 20px; height: 20px; margin-top: 3px; color: var(--sky); fill: rgba(83, 177, 253, 0.16); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li { padding: 12px 20px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); color: var(--soft); font-size: 16px; }

/* ------------------------------------------------------------ apply */

.apply {
  padding: clamp(24px, 4vw, 56px); border: 1px solid var(--rule); border-radius: 24px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(21, 112, 239, 0.2), rgba(21, 112, 239, 0) 60%),
    var(--night-2);
  scroll-margin-top: 24px;
}
.apply form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.apply label { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--soft); letter-spacing: 0.01em; }
.apply label i { font-style: normal; font-weight: 400; color: var(--quiet); display: inline; }
.apply label:has(i) { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; }
.apply label:has(i) > :last-child { grid-column: 1 / -1; }
.apply .wide { grid-column: 1 / -1; }
.apply input, .apply textarea {
  width: 100%; padding: 14px 15px; border-radius: 11px; border: 1px solid var(--rule-strong);
  background: rgba(4, 7, 16, 0.6); color: var(--text); font: 400 16px/1.4 var(--body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.apply textarea { resize: vertical; min-height: 110px; }
.apply input:focus, .apply textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(83, 177, 253, 0.18); }
.apply input[type="file"] { padding: 10px; color: var(--quiet); font-size: 14px; cursor: pointer; }
.apply input[type="file"]::file-selector-button {
  margin-right: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: rgba(156, 185, 243, 0.1); color: var(--text); font: 600 13.5px var(--body); cursor: pointer;
}
.apply .bad { border-color: #f97066; box-shadow: 0 0 0 4px rgba(249, 112, 102, 0.16); }
.trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
#apply-msg { font-size: 15px; color: var(--soft); }
#apply-msg.ok { color: #6ce9a6; }
#apply-msg.err { color: #fda29b; }
.apply.sent form { opacity: 0.5; pointer-events: none; }

.term { margin-top: 36px; border: 1px solid var(--rule); border-radius: 14px; background: rgba(4, 7, 16, 0.7); overflow: hidden; }
.term-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--quiet); }
.term-bar button { background: none; border: 0; color: var(--peri); font: inherit; cursor: pointer; padding: 2px 4px; }
.term-bar button:hover { color: var(--text); }
.term pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: var(--soft); }
.term pre .k { color: var(--sky); }
.term pre .s { color: #f7c56b; }


/* sections arrive as they are scrolled to; without script they are simply there */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ the list of roles */

.index { min-height: 100vh; background: radial-gradient(90% 70% at 70% 0%, #0d1a38 0%, rgba(13, 26, 56, 0) 60%), var(--night); }
.roles { max-width: 860px; margin: 0 auto; padding: 8vh var(--gutter); }
.roles h1 { font-size: clamp(36px, 4vw, 60px); margin-bottom: 36px; }
.roles ul { list-style: none; margin: 0; padding: 0; }
.roles li a { display: flex; flex-direction: column; gap: 6px; padding: 26px 0; border-top: 1px solid var(--rule); text-decoration: none; transition: padding 0.2s; }
.roles li a:hover { padding-left: 10px; }
.roles li b { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.015em; }
.roles li span { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--peri); }
.roles p { color: var(--quiet); }

/* ------------------------------------------------------------ narrow */

@media (max-width: 899px) {
  .hero { min-height: 100svh; }
  .hero-shade { background: linear-gradient(180deg, rgba(6, 10, 20, 0.5) 0%, rgba(6, 10, 20, 0) 14%, rgba(6, 10, 20, 0) 52%, rgba(6, 10, 20, 0.86) 70%, var(--night) 100%); }
  .hero-copy { top: auto; bottom: 56px; transform: none; width: auto; right: var(--gutter); }
  .facts { margin-top: 20px; font-size: 11.5px; }
  .texts, .rooms, .checks, .apply form { grid-template-columns: 1fr; }
  .room { padding: 22px; font-size: 17.5px; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
