/* Spyder Controls careers site — public styles */

:root {
  --navy: #061F43;
  --navy-deep: #04162F;
  --ink: #1B2538;
  --slate: #5A6578;
  --line: #D9DFE8;
  --mist: #F3F6FA;
  --paper: #FFFFFF;
  --cobalt: #1F5EDC;
  --ok: #1E7F4F;
  --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: 20px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--navy);
  line-height: 1.05;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h4 { font-size: 1.35rem; margin-bottom: .35em; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--ink); max-width: 56ch; }
.muted { color: var(--slate); }
.small { font-size: .92rem; }
ul { padding-left: 1.2em; }
li { margin-bottom: .4em; }

.two-line span { display: block; }
.kicker { font-family: var(--display); font-weight: 500; color: var(--slate); font-size: 1rem; letter-spacing: .04em; margin-bottom: .6rem; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: var(--radius);
  border: 1.5px solid var(--navy); background: var(--paper); color: var(--navy);
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--mist); color: var(--navy); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { border-color: var(--line); }
.btn-small { padding: .5rem 1.1rem; font-size: .95rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .count { background: #fff; color: var(--navy); border-radius: 999px; font-size: .8rem; padding: .05rem .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand img { height: 30px; width: auto; }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.nav-login { color: var(--slate) !important; }

/* Photos & placeholders */
.photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--mist); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 14px; top: 12px;
  font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--navy);
  background: rgba(255,255,255,.9); padding: .25rem .6rem; border-radius: 4px;
}
.photo-empty { border: 1px dashed var(--line); background:
  linear-gradient(135deg, var(--mist) 0%, #E8EDF4 100%); }
.photo-empty::after { content: ""; position: absolute; inset: 18% 18%; border: 1.5px solid rgba(6,31,67,.12); border-radius: 4px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-photo { aspect-ratio: 5 / 4; }
.hero h1 { margin-bottom: .4em; }

/* Split sections (Mission, FAQ) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.band p { font-size: 1.08rem; }

/* Workplace */
.workplace { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4.5rem) 0 1rem; }
.section-title { margin-bottom: clamp(1.5rem, 3vw, 3rem); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(1.5rem, 3vw, 3rem) 0; }
.feature-reverse .feature-copy { order: 2; }
.feature p { font-size: 1.08rem; }

.values { padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1rem 0; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: 1.5rem; }
.values-grid > div { border-left: 3px solid var(--navy); padding-left: 1.1rem; }
.values-grid p { margin: 0; font-size: 1rem; }

/* FAQ */
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 1.1rem 2.4rem 1.1rem 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; color: var(--navy); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 1.6rem; color: var(--slate); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 0 1.2rem; margin: 0; color: var(--ink); }

/* Positions list */
.page-intro { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.positions { padding-bottom: clamp(3rem, 8vw, 6rem); min-height: 40vh; }
.positions-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--navy); padding-bottom: .6rem; margin-bottom: .2rem; }
.positions-head h2 { font-size: 1.6rem; margin: 0; }
.positions-table { width: 100%; border-collapse: collapse; }
.positions-table th { text-align: left; font-weight: 500; color: var(--slate); font-size: .9rem; padding: .9rem .5rem .6rem; border-bottom: 1px solid var(--line); }
.positions-table td { padding: 1.1rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pos-title a { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.pos-title a:hover { text-decoration: underline; }
.pos-type { display: block; color: var(--slate); font-size: .92rem; margin-top: .1rem; }
.pos-loc { color: var(--ink); }
.pos-action { text-align: right; white-space: nowrap; }
.empty { padding: 2.5rem 0; }

/* Position details */
.back { display: inline-block; margin: 1.4rem 0 .5rem; color: var(--slate); text-decoration: none; font-weight: 500; }
.back::before { content: "←"; margin-right: .45rem; }
.back:hover { color: var(--navy); }
.preview-bar { background: #FFF4D6; color: #6B4E00; font-size: .95rem; padding: .6rem 0; }
.preview-bar a { color: inherit; margin-left: .5rem; }

.position-hero { padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.position-hero.has-cover { position: relative; color: #fff; padding-top: clamp(6rem, 18vw, 12rem); background: var(--navy) var(--cover) center / cover no-repeat; }
.position-hero.has-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,22,47,.25) 0%, rgba(4,22,47,.86) 70%); }
.position-hero.has-cover .container { position: relative; }
.position-hero.has-cover h1, .position-hero.has-cover .kicker { color: #fff; }
.position-hero.has-cover .btn-primary { background: #fff; color: var(--navy); border-color: #fff; }
.position-summary { max-width: 62ch; font-size: 1.15rem; margin-bottom: 1.5rem; }
.position-summary p { max-width: none; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 5rem); padding: 1rem 0; }
.fact { padding: clamp(1.5rem, 3vw, 2.2rem) 0; border-bottom: 1px solid var(--line); }
.fact h2 { font-size: 1.15rem; color: var(--slate); font-family: var(--body); font-weight: 500; margin-bottom: .5rem; }
.fact-big { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; color: var(--navy); margin: 0 0 .5rem; line-height: 1.1; }
.fact-big.two-line span { display: inline; }
.fact-body p { color: var(--ink); margin-bottom: .5em; }
.fact-list { list-style: none; padding: 0; margin: 0 0 .6rem; font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600; color: var(--navy); }
.fact-list li { display: inline; }
.fact-list li + li::before { content: " / "; color: var(--line); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); padding: clamp(2rem, 4vw, 3.5rem) 0; }
.detail h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-top: 1.2rem; }
.detail h2:first-child { margin-top: 0; }
.detail ul { padding-left: 1.1rem; }
.detail li { margin-bottom: .6rem; }
.detail-wide { grid-column: 1 / -1; background: var(--mist); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius); }
.values-block ul { columns: 1; }

.next-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-top: 1px solid var(--line); margin-bottom: 1rem; }
.next-step h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }

/* Apply / Prevue */
.apply-head { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 2rem; align-items: start; padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.applying-for { display: grid; gap: .15rem; justify-self: end; text-align: right; }
.applying-for strong { font-family: var(--display); font-size: 1.6rem; color: var(--navy); font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 0 auto 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.step-n { grid-row: 1 / 3; width: 2.1rem; height: 2.1rem; border-radius: 999px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; background: var(--mist); color: var(--navy); align-self: center; }
.step-name { font-weight: 600; color: var(--navy); }
.step-state { color: var(--slate); font-size: .9rem; }
.step.current { border-color: var(--navy); border-width: 2px; }
.step.current .step-n { background: var(--navy); color: #fff; }
.step.done .step-n { background: var(--ok); color: #fff; }
.assessment { padding-bottom: 1rem; }
.assessment-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.assessment-head h2 { font-size: 1.8rem; margin-bottom: .2rem; }
.status-pill { white-space: nowrap; font-size: .9rem; font-weight: 600; color: var(--slate); border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 999px; }
.assessment-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--mist); min-height: 520px; display: grid; }
.assessment-frame iframe { width: 100%; height: 720px; border: 0; background: #fff; }
.assessment-empty { place-self: center; text-align: center; max-width: 36ch; padding: 2rem; }
.assessment-empty strong { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--navy); margin-bottom: .4rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(2rem, 5vw, 4rem); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: repeat(3, auto); justify-content: end; gap: clamp(2rem, 6vw, 6rem); padding: 2.5rem 0 1.5rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-address { font-style: normal; color: var(--ink); line-height: 1.8; }
.footer-base { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--slate); }
.footer-base a { color: var(--slate); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero, .feature, .split, .facts, .detail-grid, .next-step, .apply-head { grid-template-columns: 1fr; }
  .feature-reverse .feature-copy { order: 0; }
  .values-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .applying-for { justify-self: start; text-align: left; }
  .footer-grid { justify-content: start; grid-template-columns: 1fr 1fr; }
  .footer-address { grid-column: 1 / -1; }
  .positions-table thead { display: none; }
  .positions-table tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .positions-table td { border: 0; padding: 0; }
  .pos-loc { grid-column: 1; color: var(--slate); }
  .pos-action { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: .95rem; }
  .brand img { height: 24px; }
  .footer-base { flex-direction: column; }
}

/* HR login (shown over the positions page) */
.page-positions, .page-login { min-height: 100vh; }
.login-backdrop { position: fixed; inset: 0; background: rgba(6,31,67,.55); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.login-card { background: var(--paper); border-radius: 8px; padding: 2rem; width: min(420px, 100%); box-shadow: 0 24px 60px rgba(4,22,47,.35); }
.login-card h2 { font-size: 2rem; margin-bottom: .2rem; }
.login-card label { display: block; font-weight: 600; font-size: .95rem; margin: 1rem 0 .35rem; }
.login-card input { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #C3CBD8; border-radius: var(--radius); }
.login-card input:focus { border-color: var(--cobalt); outline: 3px solid rgba(31,94,220,.2); outline-offset: 0; }
.login-card .btn-block { width: 100%; justify-content: center; margin-top: 1.4rem; }
.form-error { background: #FEF0EE; color: #8A1C14; border: 1px solid #F3C3BE; border-radius: var(--radius); padding: .6rem .8rem; font-size: .95rem; margin: 1rem 0 0; }
.login-back { display: block; text-align: center; margin-top: 1rem; font-size: .92rem; color: var(--slate); }

/* Prevue launch card (Prevue blocks embedding, so the assessment opens in a new tab) */
.assessment-launch { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--mist); padding: clamp(1.5rem, 4vw, 3rem); }
.assessment-launch h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.assessment-launch-copy p { max-width: 52ch; }
.assessment-tips { margin: 0; padding-left: 1.1rem; }
.assessment-tips li { margin-bottom: .35rem; }
.assessment-launch-action { display: grid; gap: .6rem; justify-items: start; }
.assessment-launch-action p { margin: 0; }
.btn-large { font-size: 1.1rem; padding: 1rem 1.8rem; }
.assessment-launch-empty { grid-template-columns: 1fr; }
@media (max-width: 900px) { .assessment-launch { grid-template-columns: 1fr; } }
.assessment + .next-step { margin-top: clamp(1.5rem, 4vw, 3rem); }

/* Apply flow: requirement notice, confirmation, ADP step */
.requirement { border-left: 4px solid var(--navy); background: #FFF8E1; border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; margin-bottom: 1.75rem; }
.requirement strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: .2rem; }
.requirement p { margin: 0; max-width: 75ch; }
.confirm-box { margin-top: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.confirm { display: flex; gap: .75rem; align-items: flex-start; font-weight: 600; color: var(--navy); cursor: pointer; }
.confirm input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--navy); flex: none; }
.confirm-box p { margin: .4rem 0 0 2.15rem; }
.adp-step { padding: clamp(2rem, 4vw, 3rem) 0 1rem; margin-top: clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid var(--line); }
.adp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: 1.2rem; }
.adp-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.adp-head p { margin: 0; }
.adp-head .btn[hidden] { display: none; }
.adp-locked { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--mist); padding: 2.5rem 1.5rem; text-align: center; }
.adp-locked strong { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--navy); margin-bottom: .3rem; }
.adp-locked p { margin: 0 auto; }
.adp-locked[hidden], .adp-frame[hidden] { display: none; }
.adp-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.adp-frame iframe { display: block; width: 100%; height: 900px; border: 0; }
@media (max-width: 900px) { .adp-head { flex-direction: column; } .adp-frame iframe { height: 760px; } }
.adp-head { margin-bottom: 1rem; }
.assessment-launch[hidden] { display: none; }

/* Step 3 greyed out until the Prevue box is ticked */
.adp-step .assessment-launch, .adp-step h2 { transition: opacity .2s, filter .2s; }
.adp-step.is-locked h2, .adp-step.is-locked .assessment-launch { opacity: .45; filter: grayscale(1); }
.adp-step.is-locked .btn { pointer-events: none; cursor: not-allowed; }
.adp-lock-note { font-weight: 600; color: var(--slate); margin: 0 0 1rem; }
.adp-lock-note[hidden] { display: none; }
