/* ============================================================
   DeepByte · /apply careers page · v5 "foundry" skin
   Self-contained: tokens copied from the v5 design system.
   Obsidian ground, porcelain type, one molten gold accent.
   Do not import site.css or v5.css here.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  --void: #060607;
  --coal: #0d0d10;
  --iron: #141419;
  --iron-2: #1a1a21;
  --porcelain: #f3f1ea;
  --ash: #a09c90;
  --ash-deep: #6d695f;
  --line: rgba(243, 241, 234, 0.1);
  --line-strong: rgba(243, 241, 234, 0.22);
  --gold: #e8b64c;
  --gold-hot: #f6cd6f;
  --gold-deep: #c4923a;
  --ember: rgba(232, 150, 60, 0.16);
  --live: #34d17d;
  --bad: #f26d6d;
  --bad-soft: #f28b8b;

  --display: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", sans-serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", "SFMono-Regular", Consolas, monospace;

  --hd-h: 74px;
  --r: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { background: var(--void); scroll-padding-top: calc(var(--hd-h) + 18px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.66;
  color: var(--porcelain);
  background: var(--void);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: #14100a; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 500;
  background: var(--gold); color: #14100a; padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - clamp(40px, 6vw, 110px))); margin-inline: auto; }

/* ---------- Type ---------- */
.tag {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ash);
}
.tag i { font-style: normal; color: var(--gold); letter-spacing: 0; }
.tag--dim i { color: var(--ash-deep); }

.display {
  font-family: var(--display); font-weight: 480;
  line-height: 0.97; letter-spacing: -0.025em;
  text-wrap: balance; color: var(--porcelain);
}
.display em { font-style: italic; font-weight: 430; color: var(--gold); letter-spacing: -0.015em; }

.lede { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ash); max-width: 560px; text-wrap: pretty; }
.lede strong { color: var(--porcelain); font-weight: 560; }

/* masked line reveals (JS adds html.app; without JS everything is visible) */
.lmask { display: block; overflow: hidden; padding: 0.16em 0.08em 0.08em 0; margin: -0.16em -0.08em -0.08em 0; }
.lmask > span { display: block; }
html.app .lmask > span { transform: translateY(114%); }
html.app .lmask.in > span { transform: none; transition: transform 1.1s var(--ease); }
html.app [data-r]:not(.lmask) { opacity: 0; transform: translateY(24px); }
html.app [data-r].in:not(.lmask) { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 1.05s var(--ease); }
html.app [data-r].d1.in { transition-delay: 0.08s; }
html.app [data-r].d2.in { transition-delay: 0.16s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 32px; border-radius: 999px;
  background: var(--gold); color: #14100a;
  font-weight: 650; font-size: 15px; letter-spacing: 0.01em; line-height: 1;
  text-decoration: none; border: 1px solid var(--gold);
  transition: background 0.25s, border-color 0.25s, color 0.25s, translate 0.25s var(--ease), box-shadow 0.25s;
}
.btn:hover { background: var(--gold-hot); border-color: var(--gold-hot); translate: 0 -2px; box-shadow: 0 14px 40px -14px rgba(232, 182, 76, 0.55); }
.btn:disabled { opacity: 0.55; cursor: default; translate: none; box-shadow: none; background: var(--gold); border-color: var(--gold); }
.btn--primary { background: var(--gold); }
.btn--ghost { background: transparent; color: var(--porcelain); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(243, 241, 234, 0.06); border-color: var(--porcelain); box-shadow: none; }
.btn--sm { padding: 12px 22px; font-size: 13.5px; }
.btn--lg { padding: 19px 40px; font-size: 15.5px; }

.tlink {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--porcelain); font-weight: 550; font-size: 15px; text-decoration: none;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 3px;
  transition: border-color 0.25s, color 0.25s;
}
.tlink:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--hd-h); display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}
.top.scrolled {
  background: rgba(6, 6, 7, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark {
  font-family: var(--display); font-weight: 560; font-size: 21px; letter-spacing: -0.02em;
  color: var(--porcelain); text-decoration: none;
}
.wordmark i { font-style: normal; color: var(--gold); }
.top__cta { display: flex; align-items: center; gap: 22px; }
.top__back {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ash); text-decoration: none; transition: color 0.2s;
}
.top__back:hover { color: var(--porcelain); }
@media (max-width: 560px) { .top__back { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(780px, 92svh);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--hd-h) + clamp(56px, 9vh, 100px)) 0 clamp(54px, 7vw, 90px);
  overflow: clip;
}
.hero__glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 40% at 76% 18%, rgba(232, 150, 60, 0.13), transparent 70%),
    radial-gradient(30% 26% at 76% 18%, rgba(246, 205, 111, 0.09), transparent 72%),
    linear-gradient(to bottom, transparent 60%, var(--void) 100%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero__eyebrow { margin-bottom: clamp(22px, 3.2vw, 38px); }
.hero__title { font-size: clamp(50px, 9.2vw, 148px); }
.hero__foot {
  margin-top: clamp(28px, 4vw, 50px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.hero__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__proof {
  margin-top: clamp(40px, 6.5vh, 80px);
  padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; gap: clamp(18px, 3vw, 44px); flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash);
}
.hero__proof span { display: inline-flex; align-items: center; gap: 9px; }
.hero__proof span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }

/* ---------- Sections ---------- */
.sec { padding: clamp(64px, 8.5vw, 120px) 0; position: relative; }
.sec--form { padding-top: clamp(30px, 4vw, 56px); scroll-margin-top: calc(var(--hd-h) + 18px); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: clamp(26px, 3.6vw, 46px); }

/* ---------- Role posting ---------- */
.posting {
  background: linear-gradient(160deg, var(--iron) 0%, var(--coal) 74%);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
  scroll-margin-top: calc(var(--hd-h) + 18px);
}
.posting__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap;
  padding: clamp(26px, 3.6vw, 46px) clamp(22px, 3.8vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 241, 234, 0.02);
}
.posting__tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--live);
}
.posting__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 10px rgba(52, 209, 125, 0.8);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.posting__title { font-size: clamp(38px, 4.8vw, 68px); margin-top: 14px; }
.posting__meta {
  margin-top: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ash);
}
.posting__body { padding: clamp(26px, 3.8vw, 54px); display: grid; gap: clamp(30px, 3.8vw, 46px); }
.posting__body h3 {
  font-family: var(--display); font-weight: 520; font-size: clamp(20px, 2.1vw, 27px);
  letter-spacing: -0.015em; line-height: 1.15; color: var(--porcelain);
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px;
}
.posting__body h3::before { content: "//"; font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0; flex: 0 0 auto; }
.posting__body p { color: var(--ash); max-width: 72ch; }
.posting__body p strong { color: var(--porcelain); font-weight: 560; }
.posting__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 3.6vw, 52px); }
@media (max-width: 860px) { .posting__cols { grid-template-columns: 1fr; } }
.posting__list { display: grid; gap: 10px; }
.posting__list li { position: relative; padding-left: 24px; color: #cdc9bd; font-size: 15.5px; }
.posting__list li::before {
  content: "→"; position: absolute; left: 0; top: 2px;
  color: var(--gold); font-family: var(--mono); font-size: 12.5px;
}
.posting__list li strong { color: var(--porcelain); font-weight: 560; }

.posting__legal {
  border: 1px solid rgba(232, 182, 76, 0.32);
  background: linear-gradient(165deg, #17150e 0%, rgba(23, 21, 14, 0.35) 100%);
  border-radius: 14px;
  padding: clamp(20px, 2.8vw, 36px);
}
.posting__legal .posting__list { margin-top: 4px; }
.posting__legal .posting__list li { color: var(--ash); font-size: 14.5px; }
.posting__fineprint { margin-top: 18px; font-size: 13.5px; color: var(--ash-deep); max-width: none; }
.posting__fineprint a { color: var(--ash); text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s; }
.posting__fineprint a:hover { color: var(--gold); }

/* ---------- Apply card ---------- */
.apply-card {
  max-width: 880px; margin-inline: auto;
  background: linear-gradient(160deg, var(--iron) 0%, var(--coal) 78%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(26px, 4.5vw, 60px);
}
.apply-card__title { font-size: clamp(30px, 3.8vw, 48px); margin: 16px 0 10px; }
.apply-card__sub { color: var(--ash); font-size: 15px; margin-bottom: clamp(26px, 3.2vw, 40px); }

.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 680px) { .f-row { grid-template-columns: 1fr; gap: 0; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 13.5px; font-weight: 550; color: #d9d5ca; letter-spacing: 0.01em; }
.field .req { color: var(--gold); }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: rgba(243, 241, 234, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px; color: var(--porcelain);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  background: rgba(243, 241, 234, 0.055);
  box-shadow: 0 0 0 3px rgba(232, 182, 76, 0.16);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ash-deep); }
.field textarea { resize: vertical; min-height: 112px; line-height: 1.55; }
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23a09c90' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field select option { background: var(--iron); color: var(--porcelain); }
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--bad); }
.field input.invalid:focus, .field textarea.invalid:focus { box-shadow: 0 0 0 3px rgba(242, 109, 109, 0.16); }

/* Consents */
.consents {
  border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(18px, 2.6vw, 26px) clamp(18px, 2.8vw, 30px) clamp(20px, 2.8vw, 28px);
  margin: 8px 0 24px;
  display: grid; gap: 14px;
}
.consents legend {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ash); padding: 0 10px; margin-left: -10px;
}
.consents legend i { font-style: normal; color: var(--gold); letter-spacing: 0; }
.consent {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start;
  font-size: 14px; line-height: 1.55; color: var(--ash); cursor: pointer;
}
.consent input {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--gold); cursor: pointer;
}
.consent strong { color: var(--porcelain); font-weight: 560; }
.consent a { color: #d9d5ca; text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s; }
.consent a:hover { color: var(--gold); }
.consent.invalid span, .consent.invalid strong { color: var(--bad-soft); }

.apply-submit { width: 100%; }
.apply-status { margin-top: 14px; min-height: 1.5em; font-size: 14px; color: var(--ash); }
.apply-status.err { color: var(--bad-soft); }
.apply-status.ok { color: var(--live); }

/* Success state (injected by apply.js after a 200 + ok:true) */
.apply-done {
  text-align: center;
  padding: clamp(18px, 4vw, 40px) 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.apply-done__check {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(52, 209, 125, 0.1);
  border: 1px solid rgba(52, 209, 125, 0.4);
  color: var(--live);
  box-shadow: 0 0 44px -8px rgba(52, 209, 125, 0.35);
}
.apply-done h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; color: var(--porcelain);
}
.apply-done p { color: var(--ash); max-width: 46ch; }
.apply-done .btn { margin-top: 10px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 34px; margin-top: clamp(30px, 5vw, 70px); }
.footer__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px 26px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ash-deep);
}
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a {
  color: var(--ash); text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.14em; transition: color 0.2s;
}
.footer__links a:hover { color: var(--gold); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.app [data-r], html.app [data-r]:not(.lmask) { opacity: 1; transform: none; }
  html.app .lmask > span { transform: none; }
}
