:root {
  --bg: #f4fbff;
  --bg-deep: #e8f5fc;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #071c2f;
  --muted: #526b7e;
  --cyan: #00a9d6;
  --cyan-soft: rgba(0, 169, 214, 0.12);
  --blue: #246bfe;
  --green: #00b894;
  --danger: #ff7a90;
  --border: rgba(11, 92, 128, 0.14);
  --shadow: 0 24px 70px rgba(20, 80, 120, 0.16);
  color-scheme: light;
}

body.dark {
  --bg: #041225;
  --bg-deep: #020812;
  --panel: rgba(8, 28, 52, 0.68);
  --panel-strong: rgba(9, 36, 68, 0.86);
  --text: #eef9ff;
  --muted: #9ab2c9;
  --cyan: #19e6ff;
  --cyan-soft: rgba(25, 230, 255, 0.18);
  --blue: #247bff;
  --green: #4dffcf;
  --border: rgba(108, 230, 255, 0.22);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 14%, rgba(0, 169, 214, 0.18), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(36, 107, 254, 0.14), transparent 34%),
    linear-gradient(135deg, var(--bg-deep), var(--bg) 58%, #ffffff);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.page-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--blue));
  box-shadow: 0 0 18px var(--cyan);
}

.background,
.background span,
.robot-line {
  pointer-events: none;
  position: fixed;
}

.background {
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(58px);
  opacity: 0.2;
  animation: floatBlob 14s ease-in-out infinite alternate;
}

.blob-one {
  top: 8%;
  left: -9rem;
  background: #0ef0ff;
}

.blob-two {
  right: -10rem;
  top: 20%;
  background: #1d56ff;
  animation-delay: -4s;
}

.blob-three {
  bottom: -11rem;
  left: 26%;
  background: #36ffd1;
  animation-delay: -8s;
}

.particle {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: drift 9s linear infinite;
}

.p1 { left: 12%; top: 30%; }
.p2 { left: 32%; top: 16%; animation-delay: -3s; }
.p3 { left: 70%; top: 38%; animation-delay: -6s; }
.p4 { left: 85%; top: 72%; animation-delay: -2s; }
.p5 { left: 22%; top: 82%; animation-delay: -5s; }

.robot-line {
  width: min(28vw, 280px);
  fill: none;
  stroke: rgba(0, 115, 150, 0.12);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.robot-top {
  right: 6%;
  top: 18%;
}

.robot-bottom {
  left: 5%;
  bottom: 12%;
}

.hero {
  min-height: 92vh;
  padding: 28px clamp(18px, 5vw, 72px) 52px;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.8), rgba(222, 247, 255, 0.72), rgba(237, 245, 255, 0.72));
  background-size: 260% 260%;
  animation: gradientShift 10s ease infinite;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 36px rgba(0, 92, 130, 0.12);
}

.hiring-button,
.primary-cta,
.submit-button {
  border: 1px solid rgba(0, 169, 214, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #e8faff);
  color: #063047;
  box-shadow: 0 14px 34px rgba(0, 132, 174, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.84);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hiring-button {
  padding: 12px 18px;
  font-weight: 700;
  white-space: nowrap;
}

.hiring-button:hover,
.primary-cta:hover,
.submit-button:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 18px 42px rgba(0, 132, 174, 0.2);
}

.theme-toggle {
  position: relative;
  width: 58px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  transition: transform 0.25s ease;
}

body.dark .theme-toggle::after {
  transform: translateX(25px);
}

.toggle-sun,
.toggle-moon {
  position: absolute;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.toggle-sun {
  right: 9px;
  background: #ffd86b;
}

.toggle-moon {
  left: 10px;
  border: 3px solid #d5f8ff;
  border-left-color: transparent;
}

.hero-content {
  width: min(920px, 100%);
  align-self: center;
  padding: 7vh 0 4vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 16px 42px rgba(0, 132, 174, 0.18);
}

.subtitle {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.7;
}

.primary-cta {
  display: inline-flex;
  margin-top: 24px;
  padding: 16px 26px;
  font-weight: 800;
}

main {
  padding: 0 clamp(16px, 4vw, 56px) 44px;
}

.form-shell {
  width: min(1120px, 100%);
  margin: -8vh auto 0;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.form-intro {
  max-width: 760px;
}

.form-intro h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 4rem);
}

.form-intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.step-indicator {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px 0;
}

.step {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.step.active {
  color: var(--text);
  border-color: rgba(25, 230, 255, 0.7);
  background: var(--cyan-soft);
  box-shadow: 0 0 24px var(--cyan-soft);
}

.hiring-form {
  display: grid;
  gap: 22px;
}

.form-section,
.submit-section {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.form-section h3,
.submit-section p {
  margin-bottom: 20px;
  font-size: 1.15rem;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field,
.textarea-field {
  position: relative;
  display: block;
}

.field input,
.textarea-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

body.dark .field input,
body.dark .textarea-field textarea {
  background: rgba(1, 12, 25, 0.42);
}

.field input {
  height: 58px;
  padding: 18px 16px 8px;
}

.field span {
  position: absolute;
  top: 18px;
  left: 16px;
  color: var(--muted);
  transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

.field input:focus,
.field input:not(:placeholder-shown),
.textarea-field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(25, 230, 255, 0.12), 0 0 28px rgba(25, 230, 255, 0.12);
}

.field input:focus + span,
.field input:not(:placeholder-shown) + span {
  color: var(--cyan);
  font-size: 0.72rem;
  transform: translateY(-12px);
}

.error,
.group-error {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: var(--danger);
  font-size: 0.78rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.counter {
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

.textarea-field textarea {
  min-height: 170px;
  padding: 18px;
  resize: vertical;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
}

.role-card,
.hours-card,
.pill-option,
.switch-row,
.upload-box {
  cursor: pointer;
}

.role-card,
.hours-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(239, 249, 255, 0.72));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.role-card {
  min-height: 150px;
  padding: 18px;
}

.role-card::after,
.hours-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 80%;
  background: radial-gradient(circle, rgba(25, 230, 255, 0.24), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.role-card:hover,
.hours-card:hover {
  transform: translateY(-5px);
  border-color: rgba(25, 230, 255, 0.66);
  box-shadow: 0 18px 42px rgba(16, 82, 124, 0.14);
}

.role-card input,
.hours-card input,
.pill-option input,
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 16px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-weight: 800;
}

.role-card input:checked ~ .role-icon,
.role-card:has(input:checked),
.hours-card:has(input:checked),
.pill-option:has(input:checked) span {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(25, 230, 255, 0.24);
}

.role-card:has(input:checked)::after,
.hours-card:has(input:checked)::after {
  opacity: 1;
}

.option-row,
.hours-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pill-option span,
.hours-card span {
  display: grid;
  min-width: 118px;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.84);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hours-card {
  border-radius: 999px;
}

.project-details {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.project-details > * {
  overflow: hidden;
}

.project-details.show {
  grid-template-rows: 1fr;
  margin-top: 18px;
  opacity: 1;
}

.upload-grid,
.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.upload-box {
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed rgba(25, 230, 255, 0.5);
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.74);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.upload-box:hover,
.upload-box.dragover {
  transform: translateY(-4px);
  border-color: var(--green);
  background: rgba(77, 255, 207, 0.1);
}

.upload-box input {
  display: none;
}

.upload-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #031222;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(25, 230, 255, 0.32);
}

.upload-box small,
.upload-box em {
  color: var(--muted);
  font-style: normal;
}

.upload-box .upload-error {
  min-height: 18px;
  color: var(--danger);
}

.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border);
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s ease, background 0.25s ease;
}

.switch-row input:checked + .switch {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.switch-row input:checked + .switch::after {
  transform: translateX(22px);
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.submit-section {
  text-align: center;
}

.submit-section p {
  color: var(--muted);
}

.submit-button {
  position: relative;
  min-width: 230px;
  min-height: 58px;
  padding: 0 30px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.submit-button.loading .button-text {
  opacity: 0;
}

.loader {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.submit-button.loading .loader {
  opacity: 1;
}

.submit-note {
  display: block;
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
}

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(1, 8, 18, 0.72);
  backdrop-filter: blur(16px);
}

.success-modal.show {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 36px 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel-strong);
  text-align: center;
  box-shadow: var(--shadow);
  animation: popIn 0.28s ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
  cursor: pointer;
}

.success-ring {
  display: inline-grid;
  width: 68px;
  height: 68px;
  margin-bottom: 18px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow: 0 0 36px rgba(77, 255, 207, 0.35);
}

.success-ring::after {
  content: "";
  width: 28px;
  height: 14px;
  border-left: 4px solid var(--green);
  border-bottom: 4px solid var(--green);
  transform: rotate(-45deg) translate(2px, -2px);
}

footer {
  padding: 34px 20px 44px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(42px, -36px, 0) scale(1.08); }
}

@keyframes drift {
  from { transform: translateY(0); opacity: 0.2; }
  50% { opacity: 1; }
  to { transform: translateY(-110px); opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 920px) {
  .hero {
    min-height: 86vh;
  }

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

  .field-grid,
  .upload-grid,
  .question-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .hiring-button {
    padding: 10px 13px;
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(3rem, 20vw, 5.2rem);
  }

  .step-indicator {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .form-shell {
    border-radius: 22px;
  }

  .robot-line {
    width: 210px;
  }
}
