/* talent.yottabrain.<tld>: the pages are rendered by the API (app-service/talent-site-render.js).
   Colours and fonts follow yottabrain.com. */
:root {
  --red: #c92027;
  --red-dark: #a71920;
  --red-soft: #fff5f5;
  --red-line: rgba(201, 32, 39, 0.14);
  --navy: #102a4c;
  --navy-soft: #f1f5fb;
  --text: #475467;
  --muted: #667085;
  --border: #e8edf3;
  --surface: #ffffff;
  --page: #f8fafc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 6px rgba(19, 41, 75, 0.05);
  --shadow: 0 18px 50px rgba(19, 41, 75, 0.08);
  --heading-font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 16px/1.7 var(--body-font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--red);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--heading-font);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(201, 32, 39, 0.35);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.icon {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Brand stripe along the top */
.site-header::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, #e2474d 45%, var(--navy) 100%);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(19, 41, 75, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 32px;
  width: auto;
}

.brand-label {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: var(--red);
  font-family: var(--heading-font);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.header-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  color: var(--navy);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.header-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.header-nav a:hover {
  color: var(--red);
}

.header-nav a:hover::after {
  transform: scaleX(1);
}

.header-external .icon {
  width: 0.75em;
  height: 0.75em;
  opacity: 0.7;
}

.header-cta {
  padding: 10px 22px;
}

/* ── Buttons ────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  box-shadow: 0 8px 20px rgba(201, 32, 39, 0.22);
}

.button .icon {
  transition: transform 0.2s ease;
}

.button:hover .icon:last-child {
  transform: translateX(2px);
}

.button-large {
  padding: 13px 26px;
  font-size: 1.05rem;
}

.button-block {
  width: 100%;
}

.button-small {
  padding: 6px 14px;
  font-size: 0.875rem;
}

.button-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--navy);
}

.button-ghost:hover {
  background: var(--navy-soft);
  border-color: var(--border);
  box-shadow: none;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Sections ───────────────────────────────────────── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--red-line);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.section-head p {
  font-size: 1.05rem;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 80px;
  background:
    radial-gradient(640px 320px at 92% 0%, rgba(201, 32, 39, 0.1), transparent 70%),
    linear-gradient(180deg, var(--red-soft), var(--surface));
}

.hero-inner {
  max-width: 1120px;
}

.hero h1 {
  max-width: 960px;
  margin: 20px 0 18px;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
}

.accent {
  color: var(--red);
}

.hero-lead {
  max-width: 640px;
  font-size: 1.15rem;
}

.hero-actions {
  margin-top: 32px;
}

/* ── Positions ──────────────────────────────────────── */

.positions {
  background: var(--page);
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px 200px;
  gap: 12px;
  margin-bottom: 20px;
}

.filters input,
.filters select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font: inherit;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 32, 39, 0.12);
}

.search {
  position: relative;
}

.search .icon {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--muted);
}

.search input {
  padding: 0 14px 0 42px;
}

.select select {
  padding: 0 12px;
}

.no-match {
  margin: 0 0 20px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 500;
}

.meta .icon {
  color: var(--red);
}

.job-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.job-card-link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 26px 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Red accent that grows along the top on hover */
.job-card-link::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--red), #e2474d);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.job-card-link:hover,
.job-card-link:focus-visible {
  transform: translateY(-4px);
  border-color: var(--red-line);
  box-shadow: var(--shadow);
}

.job-card-link:hover::before,
.job-card-link:focus-visible::before {
  transform: scaleX(1);
}

.job-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.job-type {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.job-card-arrow {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.job-card-link:hover .job-card-arrow {
  background: var(--red);
  color: #fff;
  transform: rotate(-45deg);
}

.job-card-link h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  transition: color 0.2s ease;
}

.job-card-link:hover h3 {
  color: var(--red);
}

.job-summary {
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-link .meta {
  margin-bottom: 20px;
}

.job-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--red);
  font-weight: 700;
}

.job-card-cta .icon {
  transition: transform 0.2s ease;
}

.job-card-link:hover .job-card-cta .icon {
  transform: translateX(4px);
}

.empty {
  max-width: 640px;
  padding: 40px;
  border: 1px dashed #d0d7e2;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  margin: 0 auto;
}

.empty h1,
.empty h3 {
  margin-bottom: 10px;
}

.empty h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.empty .button {
  margin-top: 20px;
}

/* ── Why / steps ────────────────────────────────────── */

.highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.highlight {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.highlight-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 1.3rem;
}

.highlight h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.highlight p {
  font-size: 0.95rem;
}

.steps-section {
  background: var(--navy);
  color: #c9d5e6;
}

.steps-section h2,
.steps-section h3 {
  color: #fff;
}

.steps-section .tag {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.steps-section .tag::before {
  background: var(--red);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: var(--red);
  font-family: var(--heading-font);
  font-size: 1.6rem;
  font-weight: 800;
}

.steps h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.steps p {
  font-size: 0.95rem;
}

.steps-note {
  margin-top: 28px;
}

.steps-note a {
  color: #fff;
}

/* ── Posting page ───────────────────────────────────── */

.posting-hero {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--red-soft), var(--surface));
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.back:hover {
  color: var(--red);
}

.posting-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
}

.meta-large li {
  padding: 6px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.posting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 80px;
}

.lead {
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.6;
}

.description {
  overflow-wrap: anywhere;
}

.description h1,
.description h2,
.description h3 {
  margin: 32px 0 12px;
  font-size: 1.3rem;
}

.description h3 {
  font-size: 1.1rem;
}

.description p {
  margin: 0 0 14px;
}

.description ul,
.description ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.description li {
  margin: 6px 0;
  padding-left: 4px;
}

.description ul li::marker {
  color: var(--red);
}

.description strong {
  color: var(--navy);
}

.description code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--navy-soft);
  font-size: 0.9em;
}

.description pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--navy-soft);
}

.description blockquote {
  margin: 0 0 16px;
  padding: 4px 16px;
  border-left: 3px solid var(--red);
  color: var(--navy);
}

.description table {
  border-collapse: collapse;
  margin-bottom: 16px;
}

.description th,
.description td {
  padding: 8px 12px;
  border: 1px solid var(--border);
}

.apply-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #c9d5e6;
}

.apply-panel h2 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 1.3rem;
}

.posting-aside {
  position: sticky;
  top: 96px;
}

.summary-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card h2 {
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.meta-stacked {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.meta-stacked li {
  padding: 0;
  background: none;
  color: var(--text);
  font-size: 0.95rem;
}

.share {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.share .button {
  flex: 1;
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--page);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 28px;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand img {
  display: block;
  height: 34px;
  width: auto;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-bottom {
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
}

/* ── Smaller screens ────────────────────────────────── */

@media (max-width: 1080px) {
  .header-nav {
    display: none;
  }
}

@media (max-width: 960px) {
  .job-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .highlights,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posting-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .posting-aside {
    position: static;
    order: -1;
  }

  .summary-card {
    box-shadow: var(--shadow-sm);
  }

  .summary-card h2,
  .meta-stacked {
    display: none;
  }
}

@media (max-width: 680px) {
  .brand img {
    height: 26px;
  }

  .brand-label {
    display: none;
  }

  .header-inner {
    min-height: 68px;
  }

  .header-cta {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 56px 0 52px;
  }

  .section {
    padding: 52px 0;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .search {
    grid-column: 1 / -1;
  }

  .job-card-link {
    padding: 22px 20px 18px;
  }

  .highlights,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .apply-panel {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
