/* ───────────────────────────────────────────────────────────────────────────
   Shraddha Pathology Laboratory — careers site.
   Aurora: slow luminous ribbons over ink, the way a drop diffuses in plasma.
   Self-hosted type (the brand's own faces), no external requests: helmet's CSP
   allows 'self' only.
   ─────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Jakarta";
  src: url("assets/fonts/PlusJakartaSans-800.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Jakarta";
  src: url("assets/fonts/PlusJakartaSans-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("assets/fonts/Inter-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("assets/fonts/Inter-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("assets/fonts/Inter-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #08080c;
  --ink-raised: #101018;
  --crimson: #d62027;
  --rose: #ff4d6d;
  --violet: #7b5cff;
  --cyan: #22d3ee;

  --paper: #f6f6fa;
  --muted: #a0a0b4;
  --faint: #6c6c80;
  --hairline: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.045);

  --display: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "InterVar", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: 22px;
  --max: 1080px;
}

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--crimson);
  color: #fff;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── The signature: drifting aurora ribbons ─────────────────────────────── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.aurora .a1 {
  top: -22vh;
  left: -10vw;
  width: 78vw;
  height: 78vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, var(--crimson), transparent 66%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.aurora .a2 {
  top: 4vh;
  right: -22vw;
  width: 66vw;
  height: 66vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(circle, var(--violet), transparent 64%);
  opacity: 0.42;
  animation: drift-b 41s ease-in-out infinite alternate;
}

.aurora .a3 {
  bottom: -26vh;
  left: 22vw;
  width: 58vw;
  height: 58vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, var(--rose), transparent 62%);
  opacity: 0.3;
  animation: drift-c 47s ease-in-out infinite alternate;
}

/* One cold edge keeps the warm ribbons from reading as a single red wash. */
.aurora .a4 {
  top: 42vh;
  left: -18vw;
  width: 40vw;
  height: 40vw;
  max-width: 460px;
  max-height: 460px;
  background: radial-gradient(circle, var(--cyan), transparent 62%);
  opacity: 0.16;
  animation: drift-b 39s ease-in-out infinite alternate-reverse;
}

/* Fine grain: stops the blurs from banding on cheap phone panels. */
.aurora::after {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  opacity: 0.28;
}

@keyframes drift-a {
  to {
    transform: translate3d(9vw, 7vh, 0) scale(1.14);
  }
}
@keyframes drift-b {
  to {
    transform: translate3d(-11vw, 9vh, 0) scale(1.1);
  }
}
@keyframes drift-c {
  to {
    transform: translate3d(7vw, -8vh, 0) scale(1.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora span {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

.page {
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(8, 8, 12, 0.62);
  border-bottom: 1px solid var(--hairline);
}

.masthead .shell {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 66px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}

.mark img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
}

.mark-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mark-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.mark-sub {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.masthead-spacer {
  flex: 1;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.btn:active {
  transform: scale(0.985);
}

.btn-solid {
  --btn-bg: var(--crimson);
  border-color: transparent;
  box-shadow: 0 10px 30px -12px rgba(214, 32, 39, 0.9);
}

.btn-solid:hover {
  --btn-bg: #e5262d;
  border-color: transparent;
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-lg {
  height: 54px;
  padding: 0 30px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  /* padding-block only — a `padding` shorthand here would cancel .shell's gutter. */
  padding-block: clamp(48px, 11vw, 104px) clamp(36px, 7vw, 64px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.6);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(255, 77, 109, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 109, 0);
  }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 9.5vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  max-width: 12ch;
}

/* The one warm-to-cold sweep in the type — echoes the ribbons behind it. */
.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--crimson), var(--rose) 52%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin-top: 24px;
  max-width: 46ch;
  font-size: clamp(16px, 2.6vw, 19px);
  color: var(--muted);
  line-height: 1.6;
}

.hero-lede strong {
  color: var(--paper);
  font-weight: 600;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Facts: a data row, not a card grid ─────────────────────────────────── */
.facts {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.facts dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.facts div {
  padding: 20px 0 20px 18px;
  border-left: 1px solid var(--hairline);
}

.facts div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--hairline);
}

.facts dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.facts dd {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(17px, 4.2vw, 21px);
  letter-spacing: -0.02em;
}

.facts dd small {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 3px;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.band {
  padding-block: clamp(44px, 9vw, 84px);
}

.band + .band {
  border-top: 1px solid var(--hairline);
}

.band-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 26px;
}

.band h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 5.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.list {
  margin-top: 30px;
  display: grid;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  overflow: hidden;
}

.list-item {
  background: var(--ink);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.list-item h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.list-item p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.tick {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
}

.tick::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid var(--paper);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

/* The one non-negotiable in the posting gets the only crimson item. */
.list-item.required {
  background: linear-gradient(100deg, rgba(214, 32, 39, 0.16), rgba(214, 32, 39, 0.02));
}

.list-item.required .tick {
  border-color: var(--crimson);
  background: var(--crimson);
}

.list-item.required h3 span {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--crimson);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* ── Closing call to action ─────────────────────────────────────────────── */
.closer {
  padding-block: clamp(44px, 9vw, 84px);
  border-top: 1px solid var(--hairline);
}

.closer-card {
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: clamp(28px, 6vw, 46px);
}

.closer h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.closer p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 42ch;
}

.closer .hero-actions {
  margin-top: 26px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--hairline);
  padding-block: 28px 40px;
  font-size: 13px;
  color: var(--faint);
}

.site-foot .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: baseline;
  justify-content: space-between;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--paper);
}

/* ── Apply page ─────────────────────────────────────────────────────────── */
.apply-wrap {
  padding-block: clamp(30px, 6vw, 60px) clamp(48px, 9vw, 90px);
  display: grid;
  gap: 26px;
  align-items: start;
}

.apply-intro h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 7vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.apply-intro p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 40ch;
}

.summary {
  margin-top: 26px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 18px 20px;
  background: var(--glass);
}

.summary dl {
  display: grid;
  gap: 12px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.summary dt {
  color: var(--faint);
}

.summary dd {
  font-weight: 500;
  text-align: right;
}

.card {
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: rgba(16, 16, 24, 0.7);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  padding: clamp(22px, 5vw, 34px);
}

.form-group + .form-group {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.group-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}

.field {
  margin-bottom: 16px;
}

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

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #d8d8e4;
  margin-bottom: 7px;
}

label .opt {
  color: var(--faint);
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px; /* iOS Safari zooms below 16px */
  appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

textarea {
  height: auto;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.5;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 77, 109, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

input.invalid,
select.invalid {
  border-color: var(--crimson);
}

.prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.prefix:focus-within {
  border-color: rgba(255, 77, 109, 0.7);
}

.prefix span {
  padding: 0 4px 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.prefix input {
  border: 0;
  background: transparent;
  border-radius: 0;
}

.prefix input:focus {
  background: transparent;
}

.form-error {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid rgba(214, 32, 39, 0.55);
  border-radius: 13px;
  background: rgba(214, 32, 39, 0.14);
  color: #ffb9bd;
  font-size: 14px;
}

.form-foot {
  margin-top: 24px;
}

.fineprint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

/* ── Sent state ─────────────────────────────────────────────────────────── */
.sent {
  text-align: center;
  padding-block: clamp(20px, 5vw, 30px);
}

.sent-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--crimson), var(--violet));
  position: relative;
  box-shadow: 0 16px 40px -16px rgba(214, 32, 39, 0.9);
}

.sent-mark::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 18px;
  width: 13px;
  height: 24px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.sent h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 5.5vw, 32px);
  letter-spacing: -0.03em;
}

.sent p {
  margin: 12px auto 24px;
  max-width: 34ch;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

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

/* ── Entrance: one orchestrated reveal, then the page is still ──────────── */
.rise {
  animation: rise 0.7s cubic-bezier(0.22, 0.75, 0.3, 1) backwards;
}

.rise:nth-child(2) {
  animation-delay: 0.06s;
}
.rise:nth-child(3) {
  animation-delay: 0.12s;
}
.rise:nth-child(4) {
  animation-delay: 0.18s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ── Wider screens ──────────────────────────────────────────────────────── */
@media (min-width: 680px) {
  :root {
    --gutter: 32px;
  }

  .facts dl {
    grid-template-columns: repeat(4, 1fr);
  }

  .facts div:nth-child(-n + 2) {
    border-bottom: 0;
  }

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

  .list-item.required {
    grid-column: span 2;
  }
}

@media (min-width: 940px) {
  .apply-wrap {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
  }

  .apply-intro {
    position: sticky;
    top: 96px;
  }
}
