/* ============================================================
   HLS Trading — Careers Page
   Design tokens mirror landing/css/main.css
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:        #faf3e8;
  --cream-mid:    #f2e8d5;
  --navy:         #1e2d4a;
  --navy-deep:    #0d1b2e;
  --coral:        #e8895a;
  --coral-hover:  #d4733f;
  --body:         #4a5060;
  --muted:        #8a8278;
  --white:        #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-w:        1100px;
  --nav-h:        68px;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 200;
  background: var(--cream);
  transition: box-shadow 0.3s var(--ease-std);
}
.nav.nav--scrolled {
  background: rgba(250, 243, 232, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(30, 45, 74, 0.08);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo { display: flex; align-items: center; gap: 0.6rem; transition: opacity 0.2s; }
.nav__logo:hover { opacity: 0.75; }
.nav__logo-img { height: 36px; width: auto; display: block; }
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 500;
  color: var(--navy); letter-spacing: 0.03em;
}
.nav__links { display: flex; align-items: center; gap: 0.25rem; }
.nav__link {
  font-size: 0.82rem; font-weight: 400;
  color: var(--navy);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav__link:hover { color: var(--coral); background: rgba(232, 137, 90, 0.07); }
.nav__link--cta {
  background: var(--navy); color: var(--white);
  margin-left: 0.5rem; padding: 0.5rem 1.1rem;
}
.nav__link--cta:hover { background: var(--coral); color: var(--white); }
.nav__link--active { color: var(--coral); }

/* Mobile burger */
.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.nav__burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--navy);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
.nav__drawer {
  display: none; flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(250, 243, 232, 0.98);
  border-top: 1px solid rgba(30, 45, 74, 0.08);
}
.nav__drawer.open { display: flex; }
.nav__drawer .nav__link {
  padding: 0.75rem 0; border-radius: 0;
  border-bottom: 1px solid rgba(30, 45, 74, 0.06); font-size: 1rem;
}
.nav__drawer .nav__link--cta {
  margin-left: 0; margin-top: 0.75rem; text-align: center;
  border-bottom: none; border-radius: 6px;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ruleExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.page-header {
  padding-top: calc(var(--nav-h) + clamp(3rem, 6vw, 5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-header__label {
  display: inline-block;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
  animation: fadeUp 0.6s var(--ease) 0.1s both;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}
.page-header__rule {
  width: 40px; height: 2px;
  background: var(--coral);
  transform-origin: left center;
  animation: ruleExpand 0.6s var(--ease) 0.7s both;
}
.page-header__meta {
  font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 1rem;
  animation: fadeUp 0.6s var(--ease) 0.5s both;
}

/* ── CAREERS LAYOUT ──────────────────────────────────────── */
.careers-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(5rem, 10vw, 7rem);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.careers-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  animation: fadeUp 0.7s var(--ease) 0.3s both;
}

.sidebar-label {
  display: block;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(30, 45, 74, 0.08);
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.role-item {
  padding: 0.875rem 1rem 0.875rem 0.875rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background 0.2s var(--ease-std), border-color 0.2s;
}

.role-item:hover {
  background: rgba(232, 137, 90, 0.06);
  border-left-color: rgba(232, 137, 90, 0.4);
}

.role-item.active {
  background: rgba(232, 137, 90, 0.08);
  border-left-color: var(--coral);
}

.role-item__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 500;
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.role-item.active .role-item__title { color: var(--navy); }
.role-item:not(.active):hover .role-item__title { color: var(--coral); }

.role-item__badge {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

/* ── ROLE CONTENT ────────────────────────────────────────── */
.careers-content {
  animation: fadeUp 0.7s var(--ease) 0.4s both;
  min-width: 0; /* prevent overflow in grid */
}

.role-detail { display: none; }

.role-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 450;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.role-detail-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(30, 45, 74, 0.1);
}

.role-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.role-meta__item::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0.7;
  flex-shrink: 0;
}

/* ── ROLE SECTIONS ───────────────────────────────────────── */
.role-section {
  margin-bottom: 2.25rem;
}

.role-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(30, 45, 74, 0.07);
  font-style: normal;
  text-transform: none;
}

.role-subhead {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.role-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--body);
  margin-bottom: 0.85rem;
}

.role-section ul {
  list-style: none;
  margin: 0.25rem 0 0.5rem;
  padding: 0;
}

.role-section li {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--body);
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
}

.role-section li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.77rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0.65;
}

.role-section li strong {
  font-weight: 500;
  color: var(--navy);
}

/* ── APPLY CTA ───────────────────────────────────────────── */
.role-apply {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(30, 45, 74, 0.08);
}

.btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: background 0.25s var(--ease-std), border-color 0.25s var(--ease-std), transform 0.25s var(--ease);
}

.btn-apply:hover {
  background: var(--coral);
  border-color: var(--coral);
  transform: translateY(-2px);
}

.btn-apply::after {
  content: '→';
  transition: transform 0.3s var(--ease);
}

.btn-apply:hover::after { transform: translateX(4px); }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep, #0d1b2e);
  color: rgba(250, 243, 232, 0.55);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}
.footer__name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 400;
  color: rgba(250, 243, 232, 0.9);
  letter-spacing: 0.03em; margin-bottom: 0.3rem;
}
.footer__tagline {
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: rgba(250, 243, 232, 0.35);
}
.footer__nav { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.footer__nav a {
  font-size: 0.82rem; letter-spacing: 0.06em;
  color: rgba(250, 243, 232, 0.5);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--coral); }
.footer__contact { text-align: right; }
.footer__contact a {
  font-size: 0.88rem;
  color: rgba(250, 243, 232, 0.55);
  transition: color 0.2s; letter-spacing: 0.02em;
}
.footer__contact a:hover { color: var(--coral); }
.footer__bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: rgba(250, 243, 232, 0.3);
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.footer__bottom a { color: rgba(250, 243, 232, 0.35); transition: color 0.2s; }
.footer__bottom a:hover { color: rgba(250, 243, 232, 0.65); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .careers-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .careers-sidebar {
    position: static;
  }

  .role-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .role-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px;
    padding: 0.6rem 1rem;
  }

  .role-item:hover { border-bottom-color: rgba(232, 137, 90, 0.4); }
  .role-item.active { border-bottom-color: var(--coral); }

  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__contact { text-align: center; }
  .footer__nav { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}
