/* ============================================================
   Quadraloop holding site
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-soft: #101014;
  --bg-card: #141419;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --text-dim: #a2a4ad;
  --text-faint: #6d6f79;
  --blue: #4ea3ff;
  --red: #ff5a3c;
  --grad: linear-gradient(90deg, #4ea3ff 0%, #8f7bff 45%, #ff5a3c 100%);
  --grad-soft: linear-gradient(90deg, rgba(78,163,255,.16), rgba(255,90,60,.16));
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .brand__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; }
.brand__name { font-size: 20px; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 15px;
  color: var(--text-dim);
  transition: color .25s;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line-strong);
  padding: 9px 18px;
  border-radius: 999px;
  transition: border-color .25s, background .25s !important;
}
.nav__cta:hover { border-color: var(--blue); background: rgba(78,163,255,.08); }

/* Mobile menu toggle (hidden on desktop) */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin: -6px -8px -6px 0;
  padding: 0;
  background: none; border: 0; cursor: pointer;
}
.nav__toggle span {
  display: block; width: 22px; height: 2px; margin-left: auto; margin-right: auto;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s, border-color .3s;
  cursor: pointer;
}
.btn--primary {
  color: #0a0a0c;
  background: #fff;
  position: relative;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(120,160,255,.28); }
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--text-dim); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 8vh;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% center;
  animation: heroZoom 24s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.15) 35%, rgba(10,10,12,.75) 78%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,10,12,.85) 0%, rgba(10,10,12,.2) 55%, transparent 100%);
}
.hero__content { position: relative; z-index: 2; }
.hero__title {
  font-size: clamp(2.8rem, 8.2vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.hero__lead {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* LED light bar (signature accent, echoing the vehicle) */
.led-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  z-index: 3;
  background: var(--grad);
  box-shadow: 0 0 20px rgba(120,140,255,.6), 0 0 40px rgba(255,90,60,.35);
}
.led-bar--sm { position: static; border-radius: 2px; box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}
.section__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 22px;
}
.section__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 60px;
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px 38px;
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); background: #17171d; }
.card:hover::before { transform: scaleX(1); }
.card__num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 40px;
}
.card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.card p { color: var(--text-dim); font-size: 1rem; }

/* ---------- Feature (approach) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.feature__list { list-style: none; display: flex; flex-direction: column; gap: 28px; }
.feature__list li { padding-top: 28px; border-top: 1px solid var(--line); }
.feature__list li:first-child { padding-top: 0; border-top: 0; }
.feature__list h3 { font-size: 1.25rem; margin-bottom: 7px; }
.feature__list p { color: var(--text-dim); font-size: 1.02rem; }
.feature__media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.feature__media img { width: 100%; }
.feature__media-glow {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 80% 60%, transparent 40%, rgba(10,10,12,.35) 100%);
  pointer-events: none;
}

/* ---------- Vehicle showcase ---------- */
.showcase {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.showcase__item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.showcase__item--wide { grid-column: 1 / -1; }
.showcase__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.showcase__item:hover img { transform: scale(1.04); }
.showcase__item figcaption {
  position: absolute;
  left: 22px; bottom: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: var(--text);
  text-shadow: 0 1px 20px rgba(0,0,0,.8);
  z-index: 2;
}
.showcase__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10,10,12,.7) 100%);
  pointer-events: none;
}
.showcase__item--wide img { max-height: 520px; }

/* ---------- Statement ---------- */
.statement { text-align: center; }
.statement__text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.9rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: 0 auto;
  color: var(--text-faint);
}
.statement__text span { color: var(--text); display: block; margin-top: 6px; }

/* ---------- Partners ---------- */
.partners__box {
  background: linear-gradient(180deg, #131319, #0d0d11);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.partners__box .led-bar--sm {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; border-radius: 0;
  background: var(--grad);
  box-shadow: 0 0 24px rgba(120,140,255,.4);
}
.partners__box .section__lead { max-width: 640px; }
.partners__actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 50px;
  background: var(--bg-soft);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__brand .brand__name { font-size: 22px; }
.footer__brand p { color: var(--text-faint); margin-top: 8px; font-size: 15px; }
.footer__meta { text-align: right; }
.footer__meta a { color: var(--text-dim); transition: color .25s; }
.footer__meta a:hover { color: var(--text); }
.footer__note { color: var(--text-faint); font-size: 14px; margin-top: 10px; }
.footer__copy { color: var(--text-faint); font-size: 13px; margin-top: 6px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards--3 { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature__media { order: -1; }

  /* Collapse nav into a toggle-driven dropdown */
  .nav__toggle { display: flex; }
  /* Frosted bar so the brand + toggle stay legible over the hero image */
  .nav { background: rgba(10, 10, 12, 0.72); backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
  .nav.is-open { background: rgba(10, 10, 12, 0.96); backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
  .nav__links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 6px 0 14px;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 15px 24px; font-size: 16px; }
  .nav__links .nav__cta { margin: 12px 24px 4px; padding: 13px 18px; text-align: center; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .showcase { grid-template-columns: 1fr; }
  .hero { padding-bottom: 12vh; }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(10,10,12,.5) 0%, rgba(10,10,12,.2) 30%, rgba(10,10,12,.85) 75%, var(--bg) 100%);
  }
  .footer__inner { flex-direction: column; }
  .footer__meta { text-align: left; }
  .nav__inner { padding: 14px 20px; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .partners__actions { gap: 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero__media img { animation: none; }
}

/* ============================================================
   Careers
   ============================================================ */
.footer__meta a { display: inline-block; }
.footer__meta a + a { margin-left: 18px; }

/* Sub-page headers (careers listing + role detail) */
.subhead { padding: 150px 0 20px; }
.role-hero { padding: 140px 0 44px; border-bottom: 1px solid var(--line); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px;
  color: var(--text-dim); margin-bottom: 28px;
  transition: color .25s, gap .25s;
}
.back-link:hover { color: var(--text); gap: 12px; }

/* Roles listing */
.roles { padding: 44px 0 60px; }
.role-list { display: flex; flex-direction: column; gap: 16px; }
.role-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 32px; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.role-card::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 2px;
  background: var(--grad); transform: scaleY(0); transform-origin: top;
  transition: transform .45s var(--ease);
}
.role-card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: #17171d; }
.role-card:hover::before { transform: scaleY(1); }
.role-card__tag {
  display: block; margin-bottom: 12px;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.role-card__main h3 { font-size: 1.4rem; margin-bottom: 10px; }
.role-card__summary { color: var(--text-dim); max-width: 62ch; }
.role-card__meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px;
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--text-faint);
}
.role-card__arrow { color: var(--text-faint); flex: none; display: inline-flex;
  transition: color .3s, transform .3s var(--ease); }
.role-card:hover .role-card__arrow { color: var(--blue); transform: translateX(5px); }

/* "Don't see your role" card */
.role-open {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-top: 4px;
  background: linear-gradient(180deg, #131319, #0d0d11);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 32px;
}
.role-open h3 { font-size: 1.25rem; margin-bottom: 6px; }
.role-open p { color: var(--text-dim); font-size: 1rem; max-width: 52ch; }

/* Role detail */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.chip {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 15px;
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; color: var(--text-dim);
}
.role-body { padding: 56px 0 40px; }
.role-body .prose { max-width: 720px; }
.role-body h2 { font-size: 1.5rem; margin: 44px 0 16px; }
.role-body h2:first-child { margin-top: 0; }
.role-body p { color: var(--text-dim); }
.role-body ul { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-top: 4px; }
.role-body li { position: relative; padding-left: 26px; color: var(--text-dim); }
.role-body li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--text-faint);
}
@media (max-width: 640px) {
  .subhead { padding-top: 126px; }
  .role-hero { padding-top: 118px; }
  .role-card { grid-template-columns: 1fr; gap: 14px; padding: 26px; }
  .role-card__arrow { display: none; }
  .role-open { padding: 26px; }
}

/* Application form */
.apply-form { max-width: 660px; }
.field { margin-bottom: 22px; }
.field > label {
  display: block; margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--text);
}
.field .req { color: var(--blue); }
.field .hint { display: block; margin-top: 3px; font-weight: 400; font-size: 13px; color: var(--text-faint); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: 12px;
  color: var(--text); font-family: 'Inter', sans-serif; font-size: 16px;
  transition: border-color .2s, background .2s;
}
.field input, .field select { height: 48px; }
.field textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
/* Role dropdown: narrower, matched to the text-field height, no native chevron */
#role {
  max-width: 440px;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
}
#role::-ms-expand { display: none; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); background: #17171d;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-row .field { margin-bottom: 22px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.apply-actions { margin-top: 30px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.apply-note { color: var(--text-faint); font-size: 13px; margin-top: 16px; max-width: 60ch; }
.apply-status {
  margin-top: 26px; padding: 24px 26px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg-card);
}
.apply-status h3 { font-size: 1.15rem; margin-bottom: 8px; }
.apply-status p { color: var(--text-dim); font-size: 1rem; margin-bottom: 14px; }
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
