/* ============================================================
   CloudTech - Talent Portal
   Layered on top of index.css (tokens, fonts, .icon are inherited).
   Scoped under .talent-body so nothing here can leak into the
   main site if the stylesheets are ever concatenated.
   ============================================================ */

.talent-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f7f9fd;
  color: var(--c-text-dark);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Top bar ────────────────────────────────────────────── */
.talent-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 1.35rem var(--pad-x);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}
.talent-logo img { height: 34px; width: auto; }

.talent-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-text-muted);
  transition: color 0.25s ease, gap 0.25s ease;
}
.talent-back .icon { width: 16px; height: 16px; }
.talent-back:hover { color: var(--c-navy); gap: 12px; }

/* ── Stage ──────────────────────────────────────────────── */
.talent-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px var(--pad-x) var(--space-xl);
  overflow: hidden;
}

.talent-field { position: absolute; inset: 0; pointer-events: none; }
.talent-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.5;
}
.talent-blob-1 {
  width: 620px; height: 620px;
  top: -230px; right: -180px;
  background: radial-gradient(circle at 30% 30%, rgba(0, 69, 173, 0.10), rgba(0, 69, 173, 0) 70%);
}
.talent-blob-2 {
  width: 540px; height: 540px;
  bottom: -220px; left: -160px;
  background: radial-gradient(circle at 60% 40%, rgba(254, 119, 29, 0.10), rgba(254, 119, 29, 0) 70%);
}
.talent-blob-3 {
  width: 380px; height: 380px;
  top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 19, 51, 0.05), rgba(0, 19, 51, 0) 70%);
}

.talent-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Brandmark above the card ───────────────────────────── */
.talent-brandmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-sm);
  text-align: center;
}
.talent-brandmark-img { height: 38px; width: auto; }
.talent-brandmark-label {
  font-family: var(--f-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* ── Card ───────────────────────────────────────────────── */
/* Specificity note: index.css has `section:not(.hero) { padding: ... }` at
   (0,1,1). The .talent-body prefix lifts this to (0,2,0) so the card keeps
   its own padding regardless of stylesheet order. */
.talent-body .talent-card {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md) calc(var(--space-sm) - 0.25rem);
  box-shadow: 0 24px 60px rgba(0, 19, 51, 0.10), 0 2px 6px rgba(0, 19, 51, 0.04);
  overflow: hidden;
}
/* Brand hairline across the top edge */
.talent-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-orange));
}

.talent-card-head { text-align: center; margin-bottom: var(--space-sm); }
.talent-card-head h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--c-navy);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.talent-card-head p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  margin: 0;
}

/* ── Role options ───────────────────────────────────────── */
.talent-form { display: flex; flex-direction: column; }
/* .talent-form sets display:flex at the same specificity as the UA's
   [hidden]{display:none}, and author styles win ties - so toggling the
   hidden attribute alone left both the role and detail forms stacked
   on screen. This restores the expected hide behaviour. */
.talent-form[hidden] { display: none; }
.talent-roles {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}
.role-option:hover {
  border-color: rgba(0, 69, 173, 0.35);
  box-shadow: 0 8px 22px rgba(0, 19, 51, 0.07);
  transform: translateY(-2px);
}
.role-option input { position: absolute; opacity: 0; pointer-events: none; }

.role-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 19, 51, 0.04);
  border: 1px solid rgba(0, 19, 51, 0.08);
  color: var(--c-navy);
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.role-icon .icon { width: 20px; height: 20px; }

.role-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.role-title {
  font-family: var(--f-heading);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--c-navy);
  line-height: 1.3;
}
.role-sub {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.4;
}

.role-radio {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 50%;
  border: 1.5px solid #cbd4e3;
  position: relative;
  transition: border-color 0.22s ease, background-color 0.22s ease;
}
.role-radio::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Selected state */
.role-option:has(input:checked) {
  border-color: var(--c-orange);
  background: rgba(254, 119, 29, 0.035);
  box-shadow: 0 10px 26px rgba(254, 119, 29, 0.13);
}
.role-option:has(input:checked) .role-icon {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
}
.role-option:has(input:checked) .role-radio {
  border-color: var(--c-orange);
  background: var(--c-orange);
}
.role-option:has(input:checked) .role-radio::after { transform: scale(1); }

/* Keyboard focus ring on the label, driven by the hidden input */
.role-option:has(input:focus-visible) {
  outline: 3px solid rgba(0, 69, 173, 0.25);
  outline-offset: 2px;
}

/* :has() fallback - JS mirrors selection onto the label */
.role-option.is-selected {
  border-color: var(--c-orange);
  background: rgba(254, 119, 29, 0.035);
  box-shadow: 0 10px 26px rgba(254, 119, 29, 0.13);
}
.role-option.is-selected .role-icon {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
}
.role-option.is-selected .role-radio { border-color: var(--c-orange); background: var(--c-orange); }
.role-option.is-selected .role-radio::after { transform: scale(1); }

/* ── Continue ───────────────────────────────────────────── */
.talent-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--c-orange);
  color: #fff;
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(254, 119, 29, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.talent-continue .icon { width: 16px; height: 16px; transition: transform 0.25s ease; }
.talent-continue:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(254, 119, 29, 0.34); }
.talent-continue:hover:not(:disabled) .icon { transform: translateX(4px); }
.talent-continue:disabled {
  background: #e6eaf2;
  color: #9aa5b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* ── Detail form (step 2) ───────────────────────────────── */
.talent-detail-form { animation: talent-fade 0.35s ease both; }

.talent-honey {
  position: absolute !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

.talent-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: var(--space-sm);
  font-family: var(--f-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
}
.talent-back-link .icon { width: 14px; height: 14px; }
.talent-back-link:hover { color: var(--c-navy); gap: 9px; }

.talent-detail-head { margin-bottom: var(--space-sm); }

.talent-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.9rem;
}
.talent-field-group label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--c-navy);
}
.talent-field-group .req { color: var(--c-orange); }

.talent-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--f-body);
  font-size: var(--text-sm);
  color: var(--c-text-dark);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.talent-input:focus {
  outline: none;
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(254, 119, 29, 0.15);
}
textarea.talent-input { resize: vertical; min-height: 90px; font-family: var(--f-body); }

/* ── Confirmation / waitlist state ──────────────────────── */
.talent-confirm { text-align: center; animation: talent-fade 0.4s ease both; }
@keyframes talent-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.talent-confirm-mark {
  width: 54px; height: 54px;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(254, 119, 29, 0.1);
  border: 1px solid rgba(254, 119, 29, 0.28);
  color: var(--c-orange);
}
.talent-confirm-mark .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.talent-confirm h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--c-navy);
  margin-bottom: 8px;
}
.talent-confirm p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  max-width: 400px;
  margin: 0 auto var(--space-sm);
}

.talent-reset {
  margin-top: var(--space-sm);
  background: none;
  border: none;
  font-family: var(--f-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.talent-reset:hover { color: var(--c-navy); }

/* ── Trust strip ────────────────────────────────────────── */
.talent-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-sm);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--c-border);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  line-height: 1.4;
}
.talent-trust .icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--c-blue); }

.talent-legal {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  text-align: center;
}
.talent-legal a { color: var(--c-blue); font-weight: 600; }
.talent-legal a:hover { color: var(--c-orange); }

/* ── Footer ─────────────────────────────────────────────── */
.talent-footer {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--space-sm) var(--pad-x) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}
.talent-footer-links { display: flex; gap: var(--space-sm); }
.talent-footer-links a { transition: color 0.2s ease; }
.talent-footer-links a:hover { color: var(--c-orange); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 560px) {
  .talent-main { padding-bottom: var(--space-lg); }
  .talent-body .talent-card { padding: var(--space-sm) var(--space-sm) 1.25rem; }
  .talent-card-head h1 { font-size: 1.35rem; }
  .talent-brandmark-img { height: 38px; }
  .role-option { padding: 0.9rem; gap: 11px; }
  .role-icon { width: 40px; height: 40px; }
  .role-title { font-size: 0.95rem; }
  .role-sub { font-size: 0.8rem; }
  .talent-footer { flex-direction: column; text-align: center; }
  .talent-back span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .role-option, .role-radio::after, .talent-continue, .talent-confirm { transition: none !important; animation: none !important; }
}
