/* apply-page.css — Extracted from recruitment/candidate/apply/index.html */

:root {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-obsidian, #020617);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.apply-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 11;
}

/* Ambient background: organic light + grain (tokens: site-tokens.css) */
.apply-page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.apply-page-bg-blob {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  will-change: transform, border-radius;
}

.apply-page-bg-blob--1 {
  top: 0;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background: var(--brand-gold);
  filter: blur(120px);
  opacity: 0.15;
  animation: apply-bg-roam-1 35s var(--ease-keyword-ease-in-out) infinite;
}

.apply-page-bg-blob--2 {
  bottom: -5%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background: var(--brand-surface-strong);
  filter: blur(130px);
  opacity: 0.4;
  animation: apply-bg-roam-2 42s var(--ease-keyword-ease-in-out) -10s infinite;
}

.apply-page-bg-blob--3 {
  top: 20%;
  left: 25%;
  width: 40vw;
  height: 40vw;
  background: var(--brand-gold);
  filter: blur(100px);
  opacity: 0.1;
  animation: apply-bg-roam-3 38s var(--ease-keyword-ease-in-out) -5s infinite;
}

.apply-page-bg-blob--4 {
  top: 40%;
  left: 40%;
  width: 20vw;
  height: 20vw;
  background: var(--brand-gold);
  filter: blur(70px);
  opacity: 0.2;
  animation: apply-bg-roam-5 25s var(--ease-keyword-ease-in-out) -2s infinite;
}

.apply-page-bg-blob--5 {
  bottom: 30%;
  right: 30%;
  width: 15vw;
  height: 15vw;
  background: var(--brand-surface-strong);
  filter: blur(60px);
  opacity: 0.4;
  animation: apply-bg-roam-5 32s var(--ease-keyword-ease-in-out) infinite reverse;
}

.apply-page-bg-blob--6 {
  top: -20%;
  right: 10%;
  width: 30vw;
  height: 30vw;
  background: var(--it-green);
  filter: blur(150px);
  opacity: 0.03;
  animation: apply-bg-roam-4 45s var(--ease-keyword-ease-in-out) -20s infinite;
}

.apply-page-bg-blob--7 {
  bottom: -20%;
  left: 10%;
  width: 30vw;
  height: 30vw;
  background: var(--it-red);
  filter: blur(150px);
  opacity: 0.03;
  animation: apply-bg-roam-4 45s var(--ease-keyword-ease-in-out) infinite alternate-reverse;
}

.apply-page-bg-svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.apply-page-bg-grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  filter: url(#applyNoiseFilter);
}

@keyframes apply-bg-roam-1 {
  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: scale(1) translate(0, 0);
  }
  25% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: scale(1.1) translate(25vw, 15vh);
  }
  50% {
    border-radius: 70% 30% 50% 50% / 70% 50% 50% 30%;
    transform: scale(0.9) translate(40vw, -10vh);
  }
  75% {
    border-radius: 40% 60% 30% 70% / 40% 60% 70% 30%;
    transform: scale(1.05) translate(15vw, -25vh);
  }
}

@keyframes apply-bg-roam-2 {
  0%,
  100% {
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    transform: scale(1) translate(0, 0);
  }
  33% {
    border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    transform: scale(1.05) translate(-30vw, -20vh);
  }
  66% {
    border-radius: 30% 70% 70% 30% / 70% 30% 30% 70%;
    transform: scale(0.95) translate(-45vw, 15vh);
  }
}

@keyframes apply-bg-roam-3 {
  0%,
  100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: scale(1) translate(0, 0);
  }
  33% {
    border-radius: 60% 40% 30% 70% / 50% 60% 30% 60%;
    transform: scale(0.95) translate(-20vw, 30vh);
  }
  66% {
    border-radius: 50% 50% 60% 40% / 60% 40% 70% 30%;
    transform: scale(1.05) translate(25vw, 20vh);
  }
}

@keyframes apply-bg-roam-4 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(15vw, -15vh);
  }
}

@keyframes apply-bg-roam-5 {
  0%,
  100% {
    transform: scale(1) translate(0, 0);
  }
  33% {
    transform: scale(1.2) translate(30vw, -30vh);
  }
  66% {
    transform: scale(0.8) translate(-20vw, 20vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .apply-page-bg-blob {
    animation: none !important;
  }
  .apply-page-bg-blob--1 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--2 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--3 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--4 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--5 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--6 {
    border-radius: 50%;
    transform: none;
  }
  .apply-page-bg-blob--7 {
    border-radius: 50%;
    transform: none;
  }
}

html.apply-embedded .apply-page-bg,
html.apply-embedded .apply-page-bg-grain,
html.apply-embedded .apply-page-bg-svg-defs {
  display: none !important;
}

#site-footer {
  position: relative;
  z-index: 11;
}

.apply-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
}

.apply-card {
  width: 100%;
  max-width: 960px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(22px);
  border-radius: var(--radius-premium, 28px);
  border: 1px solid var(--brand-gold-border);
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.65);
  padding: clamp(1.8rem, 4vw, 2.5rem);
}

.apply-header-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--brand-gold);
  margin-bottom: 0.9rem;
}

.apply-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 0 0 0.5rem 0;
}

.apply-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 40rem;
  margin-bottom: 1.8rem;
}

.apply-grid {
  display: grid;
  /* Design-system: match .ie-form-shell (0.9fr 1.1fr) */
  grid-template-columns: 0.9fr 1.1fr;
  /* Design-system spacing rhythm */
  gap: 2.25rem;
}

/* Only step containers live inside apply-grid right now:
   span across both columns to avoid empty/uneven whitespace on desktop. */
.apply-grid > [data-step] {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .apply-main {
    padding-inline: 1.25rem;
  }

  .apply-card {
    padding-inline: 1.5rem;
    padding-block: 1.75rem 1.9rem;
    border-radius: 22px;
  }

  .apply-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .apply-main {
    padding-inline: 1rem;
  }

  .apply-card {
    padding-inline: 1.25rem;
    border-radius: 20px;
  }

  .apply-header-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
  }

  .apply-title {
    font-size: clamp(1.6rem, 7.2vw, 2rem);
  }

  .apply-subtitle {
    font-size: 0.82rem;
    margin-bottom: 1.3rem;
  }

  .apply-step-indicator {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .apply-steps-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
  }

  .apply-steps-badges {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .apply-step-pill {
    white-space: nowrap;
  }

  .apply-section-title {
    font-size: 1.12rem;
  }

  .apply-section-hint {
    font-size: 0.76rem;
    margin-bottom: 1.1rem;
  }

  .profile-group.ie-form-card {
    margin-bottom: 1rem;
  }

  .profile-group-title {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
  }

  .field-group {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .entry-card.ie-form-card {
    padding: 0.95rem 0.85rem 0.85rem;
  }

  .entry-card-remove {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.62rem;
    padding: 0.22rem 0.46rem;
  }

  .entry-card .field-group {
    margin-bottom: 0.65rem;
  }

  .field-hint {
    font-size: 0.68rem;
  }

  .btn-ghost--add,
  .btn-file {
    width: 100%;
    justify-content: center;
  }

  .apply-actions-right {
    width: 100%;
    flex-direction: column;
  }

  .apply-actions-right .ie-btn-primary,
  .apply-actions-right .ie-btn-outline {
    width: 100%;
    min-width: 0;
  }

  .apply-actions-left {
    width: 100%;
    justify-content: center;
  }
}

.apply-step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.apply-steps-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--brand-text-muted);
}

.apply-steps-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.apply-step-pill {
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--brand-gold-border);
  color: var(--brand-text-muted);
  background: rgba(0, 0, 0, 0.35);
}

.apply-step-pill--active {
  border-color: var(--brand-gold);
  color: #0f172a;
  background: linear-gradient(135deg, #facc6b, var(--brand-gold));
  font-weight: 600;
}

.apply-progress {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.apply-progress-bar {
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(to right, var(--brand-gold), rgba(248, 250, 252, 0.9));
  transform-origin: left center;
  transition: transform 220ms ease-out;
}

.apply-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.apply-section-hint {
  font-size: 0.8rem;
  color: var(--brand-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.apply-card .profile-group.ie-form-card {
  margin-bottom: 1.5rem;
}

.profile-group-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-gold);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--brand-gold-border);
  padding-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entry-card.ie-form-card {
  padding: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.entry-card.ie-form-card:hover {
  border-color: var(--brand-gold-border-strong);
}

.entry-card-remove {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: rgba(239, 68, 68, 0.1);
  color: rgba(248, 113, 113, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.entry-card-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.entry-card .field-group {
  margin-bottom: 0.8rem;
}

.entry-card .field-group:last-child {
  margin-bottom: 0;
}

.field-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.1rem;
}

.field-group--single {
  grid-template-columns: minmax(0, 1fr);
}

.field-group--compact {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
}

.field-group--compact > .apply-field {
  flex: 1;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.apply-card .apply-field > .ie-form-label {
  margin-bottom: 0;
}

.field-hint {
  font-size: 0.7rem;
  color: var(--brand-text-muted);
}

.file-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.file-pill {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--brand-gold) 40%, transparent);
  color: var(--brand-text-body);
}

.file-pill-empty {
  color: var(--brand-text-muted);
  border-style: dotted;
}

.apply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--brand-gold-border);
}

@media (max-width: 640px) {
  .apply-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

.apply-actions-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--brand-text-muted);
  flex-wrap: wrap;
}

.apply-actions-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.apply-actions-right .ie-btn-primary,
.apply-actions-right .ie-btn-outline {
  min-width: 8.5rem;
}

.btn-ghost--add {
  border-style: dashed;
  color: var(--brand-gold);
  border-color: var(--brand-gold-border);
  background: var(--brand-gold-soft);
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-ghost--add:hover {
  background: color-mix(in srgb, var(--brand-gold) 14%, var(--brand-obsidian));
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}

.btn-file {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: color-mix(in srgb, var(--brand-obsidian) 92%, var(--brand-surface));
  color: var(--brand-text-body);
  border: 1px solid var(--brand-gold-border-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, transform 80ms ease;
}

.btn-file:hover {
  border-color: var(--brand-gold);
  background: color-mix(in srgb, var(--brand-obsidian) 88%, var(--brand-gold-soft));
}

.btn-file:active {
  transform: translateY(1px);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--brand-text-body);
  line-height: 1.5;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 0.1rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.3rem;
  border: 1px solid var(--brand-gold-border-strong);
  background: color-mix(in srgb, var(--brand-obsidian) 92%, var(--brand-surface));
  accent-color: var(--brand-gold);
  cursor: pointer;
}

.checkbox-row a {
  color: var(--brand-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.apply-errors {
  margin-bottom: 1.1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(153, 27, 27, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: rgb(254, 242, 242);
  font-size: 0.78rem;
  display: none;
}

.apply-errors ul {
  margin: 0.15rem 0 0 1rem;
  padding: 0;
  list-style: disc;
}

.apply-errors strong {
  font-weight: 600;
}

.apply-success {
  display: none;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(34, 197, 94, 0.95);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 1rem;
  border-radius: 12px;
}

.honeypot-group {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Embedded mode: hide site chrome and redundant intro when inside iframe on job posting page */
html.apply-embedded #site-header,
html.apply-embedded #site-footer {
  display: none !important;
}
html.apply-embedded .apply-card > header {
  display: none !important;
}
html.apply-embedded .apply-main {
  /* In embedded mode we want the card to start at the top of the iframe */
  padding: env(safe-area-inset-top, 0px) 1rem 1.25rem 1rem;
  align-items: flex-start;
  background:
    radial-gradient(
      800px circle at 30% 0%,
      rgba(197, 160, 89, 0.14) 0%,
      rgba(197, 160, 89, 0) 55%
    ),
    linear-gradient(
      to bottom,
      rgba(8, 8, 8, 0.55) 0%,
      rgba(8, 8, 8, 0.95) 60%,
      rgba(8, 8, 8, 1) 100%
    );
}
html.apply-embedded .apply-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: none;
}
